diff --git a/R/Belgium.R b/R/Belgium.R index 0a30dc08..24b9775d 100644 --- a/R/Belgium.R +++ b/R/Belgium.R @@ -50,6 +50,11 @@ Belgium <- R6::R6Class("Belgium", ), #' @field source_data_cols existing columns within the raw data source_data_cols = c("cases_new", "deaths_new"), + #' @field source_text Plain text description of the source of the data + source_text = "Sciensano (Belgian institute of health)", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://epistat.wiv-isp.be/covid/", #' @description Set up a table of region codes for clean data #' @importFrom tibble tibble tribble diff --git a/R/Brazil.R b/R/Brazil.R index f44a0ebf..6be4ef3a 100644 --- a/R/Brazil.R +++ b/R/Brazil.R @@ -40,6 +40,11 @@ Brazil <- R6::R6Class("Brazil", ), #' @field source_data_cols existing columns within the raw data source_data_cols = c("cases_total", "deaths_total"), + #' @field source_text Plain text description of the source of the data + source_text = "Wesley Cota", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://github.com/wcota/covid19br/blob/master/README.en.md", #' @description Set up a table of region codes for clean data #' @importFrom tibble tribble diff --git a/R/Canada.R b/R/Canada.R index fff6ed6a..e5b09b53 100644 --- a/R/Canada.R +++ b/R/Canada.R @@ -37,7 +37,12 @@ Canada <- R6::R6Class("Canada", "cases_new", "cases_total", "deaths_new", "recovered_total", "tested_new" ), - + #' @field source_text Plain text description of the source of the data + source_text = "Public Health Infobase, Public Health Agency of Canada", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://open.canada.ca/data/en/dataset/261c32ab-4cfd-4f81-9dea-7b64065690dc", # nolint + #' @description Set up a table of region codes for clean data #' @importFrom tibble tibble set_region_codes = function() { diff --git a/R/Colombia.R b/R/Colombia.R index ca2b322b..c1a3154c 100644 --- a/R/Colombia.R +++ b/R/Colombia.R @@ -34,6 +34,11 @@ Colombia <- R6::R6Class("Colombia", # nolint end #' @field source_data_cols existing columns within the raw data source_data_cols = c("cases_total"), + #' @field source_text Plain text description of the source of the data + source_text = "Daniel C\u00e1rdenas", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://github.com/danielcs88/colombia_covid-19/", #' @description Set up a table of region codes for clean data #' @importFrom tibble tibble diff --git a/R/Covid19DataHub.R b/R/Covid19DataHub.R index 1c4b537e..32dca9ea 100644 --- a/R/Covid19DataHub.R +++ b/R/Covid19DataHub.R @@ -93,6 +93,11 @@ Covid19DataHub <- R6::R6Class("Covid19DataHub", # nolint end #' @field source_data_cols existing columns within the raw data source_data_cols = c("confirmed", "deaths", "recovered", "tested", "hosp"), + #' @field source_text Plain text description of the source of the data + source_text = "COVID-19 Data Hub", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://covid19datahub.io", #' @description Covid19 Data Hub specific data cleaning. #' This takes all the raw data, renames some columns and checks types. diff --git a/R/Cuba.R b/R/Cuba.R index 74feecd7..b286652a 100644 --- a/R/Cuba.R +++ b/R/Cuba.R @@ -34,6 +34,12 @@ Cuba <- R6::R6Class("Cuba", # 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 = "COVID19 Cuba Data team", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://covid19cubadata.github.io/#cuba", + #' @description Set up a table of region codes for clean data #' @importFrom tibble tibble diff --git a/R/ECDC.R b/R/ECDC.R index 039b2e5a..a15c75b8 100644 --- a/R/ECDC.R +++ b/R/ECDC.R @@ -36,6 +36,11 @@ ECDC <- R6::R6Class("ECDC", ), #' @field source_data_cols existing columns within the raw data source_data_cols = c("cases_new", "deaths_new"), + #' @field source_text Plain text description of the source of the data + source_text = "European Centre for Disease Prevention and Control (ECDC)", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://www.ecdc.europa.eu/en/publications-data/download-todays-data-geographic-distribution-covid-19-cases-worldwide", # nolint #' @description ECDC specific state level data cleaning #' @importFrom dplyr mutate rename select arrange filter diff --git a/R/France.R b/R/France.R index 5a20ed70..643f6536 100644 --- a/R/France.R +++ b/R/France.R @@ -42,6 +42,12 @@ France <- R6::R6Class("France", # nolint end #' @field source_data_cols existing columns within the raw data source_data_cols = c("cases_new", "tested_new"), + #' @field source_text Plain text description of the source of the data + source_text = "French Public Open Data Platform", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://www.data.gouv.fr/fr/pages/donnees-coronavirus", + #' @description Set up a table of region codes for clean data #' @importFrom tibble tibble diff --git a/R/Germany.R b/R/Germany.R index e639cce1..a4108765 100644 --- a/R/Germany.R +++ b/R/Germany.R @@ -36,6 +36,12 @@ Germany <- R6::R6Class("Germany", # nolint end #' @field source_data_cols existing columns within the raw data source_data_cols = c("cases_new", "deaths_new"), + #' @field source_text Plain text description of the source of the data + source_text = "Robert Koch-Institut (RKI)", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://hub.arcgis.com/datasets/dd4580c810204019a7b8eb3e0b329dd6_0/explore", # nolint + #' @description Set up a table of region codes for clean data #' @importFrom tibble tibble diff --git a/R/Google.R b/R/Google.R index b9de9902..9e4ef606 100644 --- a/R/Google.R +++ b/R/Google.R @@ -84,6 +84,12 @@ Google <- R6::R6Class("Google", "total_recovered", "total_tested" ), + #' @field source_text Plain text description of the source of the data + source_text = "O. Wahltinez et al.", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://github.com/GoogleCloudPlatform/covid-19-open-data", + #' @description GoogleData specific subregion2 level data cleaning. This #' takes all the raw data, puts into a single data frame, renames some #' columns and checks types. diff --git a/R/India.R b/R/India.R index 36321812..56903124 100644 --- a/R/India.R +++ b/R/India.R @@ -30,6 +30,11 @@ India <- R6::R6Class("India", ), #' @field source_data_cols existing columns within the raw data source_data_cols = c("cases_new", "deaths_new", "recovered_new"), + #' @field source_text Plain text description of the source of the data + source_text = "COVID19India", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://www.covid19india.org", #' @description Set up a table of region codes for clean data #' @importFrom tibble tibble diff --git a/R/Italy.R b/R/Italy.R index fc2fca92..30a5b731 100644 --- a/R/Italy.R +++ b/R/Italy.R @@ -35,6 +35,11 @@ Italy <- R6::R6Class("Italy", # nolint end #' @field source_data_cols existing columns within the raw data source_data_cols = c("cases_total", "deaths_total", "tested_total"), + #' @field source_text Plain text description of the source of the data + source_text = "Department of Civil Protection, Italy", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://github.com/pcm-dpc/COVID-19/blob/master/README_EN.md", #' @description Set up a table of region codes for clean data #' @importFrom tibble tibble diff --git a/R/JHU.R b/R/JHU.R index c05db715..4d303593 100644 --- a/R/JHU.R +++ b/R/JHU.R @@ -77,6 +77,11 @@ JHU <- R6::R6Class("JHU", # rename to country name # nolint end #' @field source_data_cols existing columns within the raw data source_data_cols = c("confirmed", "deaths", "recovered"), + #' @field source_text Plain text description of the source of the data + source_text = "Center for Systems Science and Engineering (CSSE) at Johns Hopkins University (JHU)", # nolint + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://github.com/CSSEGISandData/COVID-19/", #' @description Set up a table of region codes for clean data #' @importFrom tibble tibble diff --git a/R/JRC.R b/R/JRC.R index a6c2cf69..d378f5ab 100644 --- a/R/JRC.R +++ b/R/JRC.R @@ -61,6 +61,12 @@ JRC <- R6::R6Class("JRC", "Hospitalized", "IntensiveCare" ), + #' @field source_text Plain text description of the source of the data + source_text = "European Commission Joint Research Centre (JRC)", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://github.com/ec-jrc/COVID-19", + #' @description JRC specific data cleaning. The raw source data columns are #' converted to the correct type and renamed appropriately to match the diff --git a/R/Lithuania.R b/R/Lithuania.R index 68809495..a1b891fe 100644 --- a/R/Lithuania.R +++ b/R/Lithuania.R @@ -154,6 +154,12 @@ Lithuania <- R6::R6Class("Lithuania", source_data_cols = c( "cases_new", "tested_new", "recovered_total", "deaths_new" ), + #' @field source_text Plain text description of the source of the data + source_text = "Lithuanian Statistics Department", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://hub.arcgis.com/datasets/d49a63c934be4f65a93b6273785a8449_0/about", # nolint + # Additional attributes specific to the Lithuania functionality #' @field death_definition which criteria of deaths attributed to #' COVID to use diff --git a/R/Mexico.R b/R/Mexico.R index 6f529ed3..4c09e291 100644 --- a/R/Mexico.R +++ b/R/Mexico.R @@ -47,6 +47,11 @@ Mexico <- R6::R6Class("Mexico", ), #' @field source_data_cols existing columns within the raw data source_data_cols = c("cases_new", "deaths_new"), + #' @field source_text Plain text description of the source of the data + source_text = "Government of Mexico", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://datos.covid-19.conacyt.mx", #' @description Set up a table of region codes for clean data #' @importFrom tibble tibble diff --git a/R/Netherlands.R b/R/Netherlands.R index 0bfc4dcf..94a4fc55 100644 --- a/R/Netherlands.R +++ b/R/Netherlands.R @@ -39,6 +39,11 @@ Netherlands <- R6::R6Class("Netherlands", # nolint end #' @field source_data_cols existing columns within the raw data source_data_cols = c("cases_new", "deaths_new", "hosp_new"), + #' @field source_text Plain text description of the source of the data + source_text = "National Institute for Public Health and the Environment (RIVM), Netherlands", # nolint + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://data.rivm.nl/covid-19/", #' @description Set up a table of region codes for clean data #' @importFrom tibble tibble diff --git a/R/SouthAfrica.R b/R/SouthAfrica.R index 443607c0..152ca767 100644 --- a/R/SouthAfrica.R +++ b/R/SouthAfrica.R @@ -34,10 +34,14 @@ SouthAfrica <- R6::R6Class("SouthAfrica", # nolint end #' @field source_data_cols existing columns within the raw data source_data_cols = c("cases_new", "deaths_new", "recovered_new"), + #' @field source_text Plain text description of the source of the data + source_text = "Data Science for Social Impact research group, University of Pretoria", # nolint + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://github.com/dsfsi/covid19za", #' @description Set up a table of region codes for clean data #' @importFrom tibble tibble - #' @importFrom dplyr mutate set_region_codes = function() { self$codes_lookup$`1` <- tibble( code = c( diff --git a/R/Switzerland.R b/R/Switzerland.R index 0f6bcffa..f3124c47 100644 --- a/R/Switzerland.R +++ b/R/Switzerland.R @@ -62,6 +62,11 @@ Switzerland <- R6::R6Class("Switzerland", "cases_total", "tested_total" ), + #' @field source_text Plain text description of the source of the data + source_text = "Open Data, Canton of Zurich", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://github.com/openZH/covid_19/", #' @description Set up a table of region codes for clean data #' @importFrom tibble tibble diff --git a/R/UK.R b/R/UK.R index a974ad0c..3bbc2840 100644 --- a/R/UK.R +++ b/R/UK.R @@ -101,6 +101,11 @@ UK <- R6::R6Class("UK", "newPillarOneTestsByPublishDate", "newPillarTwoTestsByPublishDate", "newPillarThreeTestsByPublishDate", "newPillarFourTestsByPublishDate" ), + #' @field source_text Plain text description of the source of the data + source_text = "Public Health England", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://coronavirus.data.gov.uk/", #' @description Specific function for getting region codes for UK . set_region_codes = function() { diff --git a/R/USA.R b/R/USA.R index 94772e51..a00b9ece 100644 --- a/R/USA.R +++ b/R/USA.R @@ -42,6 +42,11 @@ USA <- R6::R6Class("USA", # nolint end #' @field source_data_cols existing columns within the raw data source_data_cols = c("cases_total", "deaths_total"), + #' @field source_text Plain text description of the source of the data + source_text = "New York Times", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://github.com/nytimes/covid-19-data", #' @description Set up a table of region codes for clean data #' @importFrom tibble tribble diff --git a/R/WHO.R b/R/WHO.R index c866f833..bf1513d4 100644 --- a/R/WHO.R +++ b/R/WHO.R @@ -38,6 +38,12 @@ WHO <- R6::R6Class("WHO", "deaths_new", "deaths_total" ), + #' @field source_text Plain text description of the source of the data + source_text = "World Health Organisation", + #' @field source_url Website address for explanation/introduction of the + #' data + source_url = "https://covid19.who.int", + #' @description WHO specific data cleaning #' @importFrom dplyr mutate rename diff --git a/R/shared-methods.R b/R/shared-methods.R index f4c3f46a..5e8468ef 100644 --- a/R/shared-methods.R +++ b/R/shared-methods.R @@ -510,7 +510,9 @@ DataClass <- R6::R6Class( "national", "regional" ), data_urls = paste(unlist(self$data_urls), collapse = ", "), - source_data_cols = paste(unlist(self$source_data_cols), collapse = ", ") + source_data_cols = paste(unlist(self$source_data_cols), collapse = ", "), + source_text = ifelse(is.null(self$source_text), NA, self$source_text), + source_url = ifelse(is.null(self$source_url), NA, self$source_url) ) return(sum_df) }, diff --git a/data/all_country_data.rda b/data/all_country_data.rda index 32f0dfb7..f95a7f51 100644 Binary files a/data/all_country_data.rda and b/data/all_country_data.rda differ diff --git a/man/Belgium.Rd b/man/Belgium.Rd index 1d8f3bcd..16578b4d 100644 --- a/man/Belgium.Rd +++ b/man/Belgium.Rd @@ -64,6 +64,11 @@ each level of regions. For Belgium, there are only additional data for level 1 regions.} \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{}} } diff --git a/man/Brazil.Rd b/man/Brazil.Rd index 5b625d98..1016a6aa 100644 --- a/man/Brazil.Rd +++ b/man/Brazil.Rd @@ -60,6 +60,11 @@ Subnational data sources available at the city level and is aggregated to provide state 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{}} } diff --git a/man/Canada.Rd b/man/Canada.Rd index 409f6b72..022d5277 100644 --- a/man/Canada.Rd +++ b/man/Canada.Rd @@ -57,6 +57,11 @@ Subnational data sources across levels.} \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{}} } diff --git a/man/Colombia.Rd b/man/Colombia.Rd index f80dbeda..e8ff1a8d 100644 --- a/man/Colombia.Rd +++ b/man/Colombia.Rd @@ -56,6 +56,11 @@ Subnational data sources \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{}} } diff --git a/man/Covid19DataHub.Rd b/man/Covid19DataHub.Rd index bad7084e..b305691f 100644 --- a/man/Covid19DataHub.Rd +++ b/man/Covid19DataHub.Rd @@ -113,6 +113,11 @@ Subnational data sources only entry, is be named main.} \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{}} } diff --git a/man/Cuba.Rd b/man/Cuba.Rd index 501d4547..4b688582 100644 --- a/man/Cuba.Rd +++ b/man/Cuba.Rd @@ -56,6 +56,11 @@ Subnational data sources \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{}} } diff --git a/man/ECDC.Rd b/man/ECDC.Rd index 5a434176..7b501efb 100644 --- a/man/ECDC.Rd +++ b/man/ECDC.Rd @@ -46,6 +46,11 @@ National data sources \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{}} } diff --git a/man/France.Rd b/man/France.Rd index 6ffa59c4..fb3d2b12 100644 --- a/man/France.Rd +++ b/man/France.Rd @@ -61,6 +61,11 @@ Subnational data sources specific.} \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{}} } diff --git a/man/Germany.Rd b/man/Germany.Rd index e42c2559..bca080b9 100644 --- a/man/Germany.Rd +++ b/man/Germany.Rd @@ -57,6 +57,11 @@ Subnational data sources only entry, is be named main.} \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{}} } diff --git a/man/Google.Rd b/man/Google.Rd index 3fbe62d2..a4ff31af 100644 --- a/man/Google.Rd +++ b/man/Google.Rd @@ -102,6 +102,11 @@ Subnational data sources \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{}} } diff --git a/man/India.Rd b/man/India.Rd index 0c7b4fcb..d676bd92 100644 --- a/man/India.Rd +++ b/man/India.Rd @@ -56,6 +56,11 @@ Subnational data sources \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{}} } diff --git a/man/Italy.Rd b/man/Italy.Rd index 8c90e2ec..1c527c0a 100644 --- a/man/Italy.Rd +++ b/man/Italy.Rd @@ -57,6 +57,11 @@ Subnational data sources only entry, is be named main.} \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{}} } diff --git a/man/JHU.Rd b/man/JHU.Rd index 2512b07b..53e56a88 100644 --- a/man/JHU.Rd +++ b/man/JHU.Rd @@ -107,6 +107,11 @@ Subnational data sources only entry, is be named main.} \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{}} } diff --git a/man/JRC.Rd b/man/JRC.Rd index 7db7544a..50cdcac7 100644 --- a/man/JRC.Rd +++ b/man/JRC.Rd @@ -59,6 +59,11 @@ National data sources \item{\code{level_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{}} } diff --git a/man/Lithuania.Rd b/man/Lithuania.Rd index a2d7b7c3..789460d5 100644 --- a/man/Lithuania.Rd +++ b/man/Lithuania.Rd @@ -172,6 +172,11 @@ across levels.} \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} + \item{\code{death_definition}}{which criteria of deaths attributed to COVID to use} diff --git a/man/Mexico.Rd b/man/Mexico.Rd index bb91e547..5c9c653f 100644 --- a/man/Mexico.Rd +++ b/man/Mexico.Rd @@ -69,6 +69,11 @@ Subnational data sources specific.} \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{}} } diff --git a/man/Netherlands.Rd b/man/Netherlands.Rd index 3506f813..d1fe4ff0 100644 --- a/man/Netherlands.Rd +++ b/man/Netherlands.Rd @@ -61,6 +61,11 @@ Subnational data sources only entry, is be named main.} \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{}} } diff --git a/man/SouthAfrica.Rd b/man/SouthAfrica.Rd index e4f59c88..78c0b096 100644 --- a/man/SouthAfrica.Rd +++ b/man/SouthAfrica.Rd @@ -56,6 +56,11 @@ Subnational data sources \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{}} } diff --git a/man/Switzerland.Rd b/man/Switzerland.Rd index aa01c448..90e35976 100644 --- a/man/Switzerland.Rd +++ b/man/Switzerland.Rd @@ -81,6 +81,11 @@ Subnational data sources \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{}} } diff --git a/man/UK.Rd b/man/UK.Rd index 05433eed..c70c18c1 100644 --- a/man/UK.Rd +++ b/man/UK.Rd @@ -108,6 +108,11 @@ specific.} \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} + \item{\code{query_filters}}{Set what filters to use to query the data} \item{\code{nhsregions}}{Whether to include NHS regions in the data} diff --git a/man/USA.Rd b/man/USA.Rd index 552c7b4e..ff36de2f 100644 --- a/man/USA.Rd +++ b/man/USA.Rd @@ -57,6 +57,11 @@ Subnational data sources specific.} \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{}} } diff --git a/man/WHO.Rd b/man/WHO.Rd index fbebb18b..6cc63911 100644 --- a/man/WHO.Rd +++ b/man/WHO.Rd @@ -45,6 +45,11 @@ National data sources only entry, is be named main.} \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{}} } diff --git a/man/all_country_data.Rd b/man/all_country_data.Rd index fbd43e34..d8dcc66b 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 8 columns. +An object of class \code{tbl_df} (inherits from \code{tbl}, \code{data.frame}) with 22 rows and 10 columns. } \usage{ all_country_data diff --git a/tests/testthat/test-DataClass.R b/tests/testthat/test-DataClass.R index e03415d0..4584550a 100644 --- a/tests/testthat/test-DataClass.R +++ b/tests/testthat/test-DataClass.R @@ -114,7 +114,7 @@ test_that("DataClass returns a summary", { names(sum), c( "origin", "class", "level_1_region", "level_2_region", "level_3_region", - "type", "data_urls", "source_data_cols" + "type", "data_urls", "source_data_cols", "source_text", "source_url" ) ) expect_true(sum$class[1] == "D") diff --git a/tests/testthat/test-get_available_datasets.R b/tests/testthat/test-get_available_datasets.R index d1a2b3c2..f6583a66 100644 --- a/tests/testthat/test-get_available_datasets.R +++ b/tests/testthat/test-get_available_datasets.R @@ -9,7 +9,8 @@ test_that( expected_names <- c( "origin", "class", "level_1_region", "level_2_region", "level_3_region", "type", - "data_urls", "source_data_cols" + "data_urls", "source_data_cols", + "source_text", "source_url" ) expect_identical(colnames(data), expected_names) } @@ -41,7 +42,11 @@ test_that( # test each column for na values for (name in colnames(data)) { - if (name %in% c("level_1_region", "level_2_region", "level_3_region")) { + if (name %in% c("level_1_region", + "level_2_region", + "level_3_region", + "source_text", + "source_url")) { next } test_that(