diff --git a/.github/workflows/Vietnam.yaml b/.github/workflows/Vietnam.yaml new file mode 100644 index 00000000..1425587e --- /dev/null +++ b/.github/workflows/Vietnam.yaml @@ -0,0 +1,48 @@ +on: + schedule: + - cron: '36 12 * * *' + workflow_dispatch: + +name: Vietnam + +jobs: + Vietnam: + runs-on: macOS-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-r@v1 + + - name: Query dependencies + run: | + install.packages('remotes') + saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) + writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") + shell: Rscript {0} + + - name: Cache R packages + uses: actions/cache@v2 + with: + path: ${{ env.R_LIBS_USER }} + key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} + restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- + + - name: Install dependencies + run: | + install.packages(c("remotes")) + remotes::install_deps(dependencies = TRUE) + install.packages("devtools") + shell: Rscript {0} + + - name: Install package + run: R CMD INSTALL . + + - name: Test dataset + run: | + options("testDownload" = TRUE) + options("testSource" = "Vietnam") + devtools::load_all() + testthat::test_file("tests/testthat/test-regional-datasets.R", reporter = c("summary", "fail")) + shell: Rscript {0} diff --git a/NAMESPACE b/NAMESPACE index ce3bcc43..37b43471 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -24,6 +24,7 @@ export(SouthAfrica) export(Switzerland) export(UK) export(USA) +export(Vietnam) export(WHO) export(expect_clean_cols) export(expect_columns_contain_data) diff --git a/R/Vietnam.R b/R/Vietnam.R new file mode 100644 index 00000000..3a9e0567 --- /dev/null +++ b/R/Vietnam.R @@ -0,0 +1,85 @@ +#' Vietnam Class for downloading, cleaning and processing +#' notification data +#' +#' @description Information for downloading, cleaning +#' and processing covid-19 region data for Vietnam. +#' +# nolint start +#' @source \url{https://github.com/biocyberman/covidregionaldata/} +# nolint end +#' @export +#' @concept dataset +#' @family subnational +#' @examples +#' \dontrun{ +#' region <- Vietnam$new(verbose = TRUE, steps = TRUE, get = TRUE) +#' region$return() +#' } +Vietnam <- R6::R6Class("Vietnam", + inherit = DataClass, + public = list( + + # Core Attributes (amend each paramater for country specific infomation) + #' @field origin name of country to fetch data for + origin = "Vietnam", + #' @field supported_levels List of supported levels. + supported_levels = list("1"), + #' @field supported_region_names List of region names in order of level. + supported_region_names = list("1" = "region"), + #' @field supported_region_codes List of region codes in order of level. + supported_region_codes = list("1" = "is_3166_2"), + #' @field common_data_urls List of named links to raw data. + # nolint start + common_data_urls = list( + "main" = "https://docs.google.com/spreadsheets/d/1_d7oK-SKj-7KrWAW7DbGYEad2JO4TyR7ApsUAuoiH5g/export?format=csv&gid=0" + ), + # nolint end + #' @field source_data_cols existing columns within the raw data + source_data_cols = c( + "cases_new" + ), + #' @field source_text Plain text description of the source of the data + source_text = "Public COVID-19 data curated by 5F team", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://datastudio.google.com/u/0/reporting/1cc8d45e-2c74-4084-af70-cbbe60f1660e/page/bLUVC", # nolint + + #' @description Set up a table of region codes for clean data + #' @importFrom tibble tibble + set_region_codes = function(){ + self$codes_lookup$`1` <- covidregionaldata::vietnam_codes + }, + + #' @description Provincial Level Data + #' cleaning + #' @param ... pass additional arguments + #' + #' @importFrom dplyr filter select mutate rename + #' @importFrom tidyr replace_na + #' @importFrom lubridate dmy + clean_common = function() { + self$data$clean <- self$data$raw[["main"]] %>% + `colnames<-`(c('date', 'region', 'cases_new', 'case_group')) %>% + select( + date, + region, + cases_new + ) %>% + rename(level_1_region = region) %>% + mutate( + date = dmy(date), + cases_new = as.numeric(cases_new) + )%>% + mutate( + level_1_region = stringi::stri_trans_general(level_1_region, "latin-ascii"), + level_1_region = stringi::stri_trim_both(level_1_region), + level_1_region = stringr::str_replace_all(level_1_region, '\\(.*\\)|-| ', ''), + level_1_region = stringr::str_to_title(level_1_region) + ) %>% + left_join( + self$codes_lookup$`1`, + by = c("level_1_region" = "level_1_region") + ) + } + ) +) diff --git a/R/datasets.R b/R/datasets.R index efd04202..3c1ad8a2 100644 --- a/R/datasets.R +++ b/R/datasets.R @@ -33,6 +33,12 @@ #' @return A tibble of region codes and related information. "france_codes" +#' Region Codes for Vietnam Dataset. +#' +#' @description The region codes for Viet Nam +#' @return A tibble of region codes and related information. +"vietnam_codes" + #' Region Codes for JHU Dataset. Taken from the region codes provided as #' part of the WHO dataset. #' diff --git a/README.md b/README.md index b1700d62..b452cac6 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ the temporary directory by default), ``` r start_using_memoise() -#> Using a cache at: /tmp/RtmprTOAdV +#> Using a cache at: /tmp/RtmpPgZXiv ``` To stop using `memoise` use, @@ -105,7 +105,7 @@ the Google COVID-19 open data project), use: ``` r nots <- get_national_data() #> Downloading data from https://covid19.who.int/WHO-COVID-19-global-data.csv -#> Rows: 132483 Columns: 8 +#> Rows: 142911 Columns: 8 #> ── Column specification ──────────────────────────────────────────────────────── #> Delimiter: "," #> chr (3): Country_code, Country, WHO_region @@ -117,20 +117,20 @@ nots <- get_national_data() #> Cleaning data #> Processing data nots -#> # A tibble: 132,483 x 15 -#> date un_region who_region country iso_code cases_new cases_total -#> -#> 1 2020-01-03 Asia EMRO Afghanistan AF 0 0 -#> 2 2020-01-03 Europe EURO Albania AL 0 0 -#> 3 2020-01-03 Africa AFRO Algeria DZ 0 0 -#> 4 2020-01-03 Oceania WPRO American Samoa AS 0 0 -#> 5 2020-01-03 Europe EURO Andorra AD 0 0 -#> 6 2020-01-03 Africa AFRO Angola AO 0 0 -#> 7 2020-01-03 Americas AMRO Anguilla AI 0 0 -#> 8 2020-01-03 Americas AMRO Antigua & Bar… AG 0 0 -#> 9 2020-01-03 Americas AMRO Argentina AR 0 0 -#> 10 2020-01-03 Asia EURO Armenia AM 0 0 -#> # … with 132,473 more rows, and 8 more variables: deaths_new , +#> # A tibble: 142,911 × 15 +#> date un_region who_region country iso_code cases_new cases_total +#> +#> 1 2020-01-03 Asia EMRO Afghanistan AF 0 0 +#> 2 2020-01-03 Europe EURO Albania AL 0 0 +#> 3 2020-01-03 Africa AFRO Algeria DZ 0 0 +#> 4 2020-01-03 Oceania WPRO American Samoa AS 0 0 +#> 5 2020-01-03 Europe EURO Andorra AD 0 0 +#> 6 2020-01-03 Africa AFRO Angola AO 0 0 +#> 7 2020-01-03 Americas AMRO Anguilla AI 0 0 +#> 8 2020-01-03 Americas AMRO Antigua & Barbuda AG 0 0 +#> 9 2020-01-03 Americas AMRO Argentina AR 0 0 +#> 10 2020-01-03 Asia EURO Armenia AM 0 0 +#> # … with 142,901 more rows, and 8 more variables: deaths_new , #> # deaths_total , recovered_new , recovered_total , #> # hosp_new , hosp_total , tested_new , tested_total ``` @@ -171,7 +171,7 @@ for example by level 1 region in the UK, use: ``` r uk_nots <- get_regional_data(country = "UK", verbose = FALSE) uk_nots -#> # A tibble: 6,916 x 26 +#> # A tibble: 7,501 × 26 #> date region region_code cases_new cases_total deaths_new deaths_total #> #> 1 2020-01-30 East Mi… E12000004 NA NA NA NA @@ -184,16 +184,13 @@ uk_nots #> 8 2020-01-30 Scotland S92000003 NA NA NA NA #> 9 2020-01-30 South E… E12000008 NA NA NA NA #> 10 2020-01-30 South W… E12000009 NA NA NA NA -#> # … with 6,906 more rows, and 19 more variables: recovered_new , +#> # … with 7,491 more rows, and 19 more variables: recovered_new , #> # recovered_total , hosp_new , hosp_total , tested_new , #> # tested_total , areaType , cumCasesByPublishDate , #> # cumCasesBySpecimenDate , newCasesByPublishDate , #> # newCasesBySpecimenDate , cumDeaths28DaysByDeathDate , #> # cumDeaths28DaysByPublishDate , newDeaths28DaysByDeathDate , -#> # newDeaths28DaysByPublishDate , newPillarFourTestsByPublishDate , -#> # newPillarOneTestsByPublishDate , -#> # newPillarThreeTestsByPublishDate , -#> # newPillarTwoTestsByPublishDate +#> # newDeaths28DaysByPublishDate , … ``` Now we have the data we can create plots, for example the time-series of diff --git a/data-raw/vietnam_codes.R b/data-raw/vietnam_codes.R new file mode 100644 index 00000000..59a32f5d --- /dev/null +++ b/data-raw/vietnam_codes.R @@ -0,0 +1,33 @@ +# Set vietnam region codes +# +# Level 1 codes: ISO-3166-2 +# Source: https://en.wikipedia.org/wiki/ISO_3166-2:VN +# +library(rvest) +library(stringi) +library(stringr) +library(dplyr) +library(tibble) + +# Level 1 ----------------------------------------------------------------- +# Get ISO codes +vn_iso <- "https://en.wikipedia.org/wiki/ISO_3166-2:VN" + +level_1_region_df <- read_html(vn_iso) %>% + html_element(css="table.wikitable:nth-child(11)") %>% + html_table() + +vietnam_codes <- data.frame( + level_1_region_code = level_1_region_df$Code, + level_1_region = level_1_region_df$`Subdivision name (vi)`, + stringsAsFactors = FALSE +) %>% + mutate( + level_1_region = stringi::stri_trans_general(level_1_region, "latin-ascii"), + level_1_region = stringi::stri_trim_both(level_1_region), + level_1_region = stringr::str_replace_all(level_1_region, '\\(.*\\)|-| ', ''), + level_1_region = stringr::str_to_title(level_1_region) + ) + +# update package region_codes +usethis::use_data(vietnam_codes, overwrite = TRUE) diff --git a/data/all_country_data.rda b/data/all_country_data.rda index f95a7f51..68b9a1c3 100644 Binary files a/data/all_country_data.rda and b/data/all_country_data.rda differ diff --git a/data/vietnam_codes.rda b/data/vietnam_codes.rda new file mode 100644 index 00000000..f13d7abd Binary files /dev/null and b/data/vietnam_codes.rda differ diff --git a/man/Belgium.Rd b/man/Belgium.Rd index 16578b4d..8398fee7 100644 --- a/man/Belgium.Rd +++ b/man/Belgium.Rd @@ -35,7 +35,8 @@ Subnational data sources \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{dataset} \concept{subnational} diff --git a/man/Brazil.Rd b/man/Brazil.Rd index 1016a6aa..d473f811 100644 --- a/man/Brazil.Rd +++ b/man/Brazil.Rd @@ -38,7 +38,8 @@ Subnational data sources \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{dataset} \concept{subnational} diff --git a/man/Canada.Rd b/man/Canada.Rd index 022d5277..f6df1154 100644 --- a/man/Canada.Rd +++ b/man/Canada.Rd @@ -35,7 +35,8 @@ Subnational data sources \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{dataset} \concept{subnational} diff --git a/man/Colombia.Rd b/man/Colombia.Rd index e8ff1a8d..61da7d18 100644 --- a/man/Colombia.Rd +++ b/man/Colombia.Rd @@ -35,7 +35,8 @@ Subnational data sources \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{dataset} \concept{subnational} diff --git a/man/Covid19DataHub.Rd b/man/Covid19DataHub.Rd index b305691f..4de3ce87 100644 --- a/man/Covid19DataHub.Rd +++ b/man/Covid19DataHub.Rd @@ -89,7 +89,8 @@ Subnational data sources \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{aggregations} \concept{dataset} diff --git a/man/Cuba.Rd b/man/Cuba.Rd index 4b688582..1d3cbca7 100644 --- a/man/Cuba.Rd +++ b/man/Cuba.Rd @@ -35,7 +35,8 @@ Subnational data sources \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{dataset} \concept{subnational} diff --git a/man/France.Rd b/man/France.Rd index fb3d2b12..785bf98f 100644 --- a/man/France.Rd +++ b/man/France.Rd @@ -39,7 +39,8 @@ Subnational data sources \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{dataset} \concept{subnational} diff --git a/man/Germany.Rd b/man/Germany.Rd index bca080b9..adad966c 100644 --- a/man/Germany.Rd +++ b/man/Germany.Rd @@ -35,7 +35,8 @@ Subnational data sources \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{dataset} \concept{subnational} diff --git a/man/Google.Rd b/man/Google.Rd index a4ff31af..ea97aec4 100644 --- a/man/Google.Rd +++ b/man/Google.Rd @@ -79,7 +79,8 @@ Subnational data sources \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{aggregations} \concept{dataset} diff --git a/man/India.Rd b/man/India.Rd index d676bd92..ecd4b9bb 100644 --- a/man/India.Rd +++ b/man/India.Rd @@ -35,7 +35,8 @@ Subnational data sources \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{dataset} \concept{subnational} diff --git a/man/Italy.Rd b/man/Italy.Rd index 1c527c0a..980111be 100644 --- a/man/Italy.Rd +++ b/man/Italy.Rd @@ -35,7 +35,8 @@ Subnational data sources \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{dataset} \concept{subnational} diff --git a/man/JHU.Rd b/man/JHU.Rd index 53e56a88..cd29ab69 100644 --- a/man/JHU.Rd +++ b/man/JHU.Rd @@ -83,7 +83,8 @@ Subnational data sources \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{aggregations} \concept{dataset} diff --git a/man/Lithuania.Rd b/man/Lithuania.Rd index 789460d5..bff621bc 100644 --- a/man/Lithuania.Rd +++ b/man/Lithuania.Rd @@ -149,7 +149,8 @@ Subnational data sources \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{dataset} \concept{subnational} diff --git a/man/Mexico.Rd b/man/Mexico.Rd index 5c9c653f..aee92847 100644 --- a/man/Mexico.Rd +++ b/man/Mexico.Rd @@ -45,7 +45,8 @@ Subnational data sources \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{dataset} \concept{subnational} diff --git a/man/Netherlands.Rd b/man/Netherlands.Rd index d1fe4ff0..6a9bc8a5 100644 --- a/man/Netherlands.Rd +++ b/man/Netherlands.Rd @@ -39,7 +39,8 @@ Subnational data sources \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{dataset} \concept{subnational} diff --git a/man/SouthAfrica.Rd b/man/SouthAfrica.Rd index 78c0b096..0f3590ee 100644 --- a/man/SouthAfrica.Rd +++ b/man/SouthAfrica.Rd @@ -35,7 +35,8 @@ Subnational data sources \code{\link{Netherlands}}, \code{\link{Switzerland}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{dataset} \concept{subnational} diff --git a/man/Switzerland.Rd b/man/Switzerland.Rd index 90e35976..cbb265dd 100644 --- a/man/Switzerland.Rd +++ b/man/Switzerland.Rd @@ -60,7 +60,8 @@ Subnational data sources \code{\link{Netherlands}}, \code{\link{SouthAfrica}}, \code{\link{UK}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{dataset} \concept{subnational} diff --git a/man/UK.Rd b/man/UK.Rd index c70c18c1..25006ce3 100644 --- a/man/UK.Rd +++ b/man/UK.Rd @@ -82,7 +82,8 @@ Subnational data sources \code{\link{Netherlands}}, \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, -\code{\link{USA}} +\code{\link{USA}}, +\code{\link{Vietnam}} } \concept{dataset} \concept{subnational} diff --git a/man/USA.Rd b/man/USA.Rd index ff36de2f..ed122eff 100644 --- a/man/USA.Rd +++ b/man/USA.Rd @@ -35,7 +35,8 @@ Subnational data sources \code{\link{Netherlands}}, \code{\link{SouthAfrica}}, \code{\link{Switzerland}}, -\code{\link{UK}} +\code{\link{UK}}, +\code{\link{Vietnam}} } \concept{dataset} \concept{subnational} diff --git a/man/Vietnam.Rd b/man/Vietnam.Rd new file mode 100644 index 00000000..20f22e4b --- /dev/null +++ b/man/Vietnam.Rd @@ -0,0 +1,138 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/Vietnam.R +\name{Vietnam} +\alias{Vietnam} +\title{Vietnam Class for downloading, cleaning and processing +notification data} +\source{ +\url{https://github.com/biocyberman/covidregionaldata/} +} +\description{ +Information for downloading, cleaning +and processing covid-19 region data for Vietnam. +} +\examples{ +\dontrun{ +region <- Vietnam$new(verbose = TRUE, steps = TRUE, get = TRUE) +region$return() +} +} +\seealso{ +Subnational data sources +\code{\link{Belgium}}, +\code{\link{Brazil}}, +\code{\link{Canada}}, +\code{\link{Colombia}}, +\code{\link{Covid19DataHub}}, +\code{\link{Cuba}}, +\code{\link{France}}, +\code{\link{Germany}}, +\code{\link{Google}}, +\code{\link{India}}, +\code{\link{Italy}}, +\code{\link{JHU}}, +\code{\link{Lithuania}}, +\code{\link{Mexico}}, +\code{\link{Netherlands}}, +\code{\link{SouthAfrica}}, +\code{\link{Switzerland}}, +\code{\link{UK}}, +\code{\link{USA}} +} +\concept{dataset} +\concept{subnational} +\section{Super class}{ +\code{\link[covidregionaldata:DataClass]{covidregionaldata::DataClass}} -> \code{Vietnam} +} +\section{Public fields}{ +\if{html}{\out{
}} +\describe{ +\item{\code{origin}}{name of country to fetch data for} + +\item{\code{supported_levels}}{List of supported levels.} + +\item{\code{supported_region_names}}{List of region names in order of level.} + +\item{\code{supported_region_codes}}{List of region codes in order of level.} + +\item{\code{common_data_urls}}{List of named links to raw data.} + +\item{\code{source_data_cols}}{existing columns within the raw data} + +\item{\code{source_text}}{Plain text description of the source of the data} + +\item{\code{source_url}}{Website address for explanation/introduction of the +data} +} +\if{html}{\out{
}} +} +\section{Methods}{ +\subsection{Public methods}{ +\itemize{ +\item \href{#method-set_region_codes}{\code{Vietnam$set_region_codes()}} +\item \href{#method-clean_common}{\code{Vietnam$clean_common()}} +\item \href{#method-clone}{\code{Vietnam$clone()}} +} +} +\if{html}{ +\out{
Inherited methods} +\itemize{ +\item \out{}\href{../../covidregionaldata/html/DataClass.html#method-available_regions}{\code{covidregionaldata::DataClass$available_regions()}}\out{} +\item \out{}\href{../../covidregionaldata/html/DataClass.html#method-clean}{\code{covidregionaldata::DataClass$clean()}}\out{} +\item \out{}\href{../../covidregionaldata/html/DataClass.html#method-download}{\code{covidregionaldata::DataClass$download()}}\out{} +\item \out{}\href{../../covidregionaldata/html/DataClass.html#method-filter}{\code{covidregionaldata::DataClass$filter()}}\out{} +\item \out{}\href{../../covidregionaldata/html/DataClass.html#method-get}{\code{covidregionaldata::DataClass$get()}}\out{} +\item \out{}\href{../../covidregionaldata/html/DataClass.html#method-initialize}{\code{covidregionaldata::DataClass$initialize()}}\out{} +\item \out{}\href{../../covidregionaldata/html/DataClass.html#method-process}{\code{covidregionaldata::DataClass$process()}}\out{} +\item \out{}\href{../../covidregionaldata/html/DataClass.html#method-return}{\code{covidregionaldata::DataClass$return()}}\out{} +\item \out{}\href{../../covidregionaldata/html/DataClass.html#method-summary}{\code{covidregionaldata::DataClass$summary()}}\out{} +\item \out{}\href{../../covidregionaldata/html/DataClass.html#method-test}{\code{covidregionaldata::DataClass$test()}}\out{} +} +\out{
} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-set_region_codes}{}}} +\subsection{Method \code{set_region_codes()}}{ +Set up a table of region codes for clean data +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{Vietnam$set_region_codes()}\if{html}{\out{
}} +} + +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-clean_common}{}}} +\subsection{Method \code{clean_common()}}{ +Provincial Level Data +cleaning +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{Vietnam$clean_common()}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{...}}{pass additional arguments} +} +\if{html}{\out{
}} +} +} +\if{html}{\out{
}} +\if{html}{\out{}} +\if{latex}{\out{\hypertarget{method-clone}{}}} +\subsection{Method \code{clone()}}{ +The objects of this class are cloneable with this method. +\subsection{Usage}{ +\if{html}{\out{
}}\preformatted{Vietnam$clone(deep = FALSE)}\if{html}{\out{
}} +} + +\subsection{Arguments}{ +\if{html}{\out{
}} +\describe{ +\item{\code{deep}}{Whether to make a deep clone.} +} +\if{html}{\out{
}} +} +} +} diff --git a/man/all_country_data.Rd b/man/all_country_data.Rd index d8dcc66b..052c4727 100644 --- a/man/all_country_data.Rd +++ b/man/all_country_data.Rd @@ -6,7 +6,7 @@ \title{Table of available datasets along with level and other information. Rendered from the individual R6 class objects included in this package.} \format{ -An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 22 rows and 10 columns. +An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 23 rows and 10 columns. } \usage{ all_country_data diff --git a/man/figures/README-g7_plot-1.png b/man/figures/README-g7_plot-1.png index 51e78de4..75fa7c69 100644 Binary files a/man/figures/README-g7_plot-1.png and b/man/figures/README-g7_plot-1.png differ diff --git a/man/figures/README-uk_plot-1.png b/man/figures/README-uk_plot-1.png index 7f0f3d83..8a19f88a 100644 Binary files a/man/figures/README-uk_plot-1.png and b/man/figures/README-uk_plot-1.png differ diff --git a/man/vietnam_codes.Rd b/man/vietnam_codes.Rd new file mode 100644 index 00000000..00bf8534 --- /dev/null +++ b/man/vietnam_codes.Rd @@ -0,0 +1,19 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/datasets.R +\docType{data} +\name{vietnam_codes} +\alias{vietnam_codes} +\title{Region Codes for Vietnam Dataset.} +\format{ +An object of class \code{data.frame} with 63 rows and 2 columns. +} +\usage{ +vietnam_codes +} +\value{ +A tibble of region codes and related information. +} +\description{ +The region codes for Viet Nam +} +\keyword{datasets}