Skip to content

Commit

Permalink
Add source fields for country and global sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardMN committed Jun 29, 2021
1 parent 1de2205 commit 40d0b9d
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 1 deletion.
5 changes: 5 additions & 0 deletions R/Covid19DataHub.R
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions R/ECDC.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions R/Google.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 and others",
#' @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.
Expand Down
5 changes: 5 additions & 0 deletions R/JHU.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions R/JRC.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion R/SouthAfrica.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ SouthAfrica <- R6::R6Class("SouthAfrica",

#' @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(
Expand Down
6 changes: 6 additions & 0 deletions R/WHO.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file modified data/all_country_data.rda
Binary file not shown.
5 changes: 5 additions & 0 deletions man/Covid19DataHub.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions man/ECDC.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions man/Google.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions man/JHU.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions man/JRC.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions man/WHO.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 40d0b9d

Please sign in to comment.