From 59eba277d649e8266ade060c8aa1b4229ce8a8e4 Mon Sep 17 00:00:00 2001 From: Maggie Liu Date: Thu, 11 Aug 2022 17:14:38 -0700 Subject: [PATCH] fix data format --- R/data.R | 24 ------------------------ data-raw/statcan_employ_subset.R | 2 +- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/R/data.R b/R/data.R index 8092faad2..9c93506a3 100644 --- a/R/data.R +++ b/R/data.R @@ -33,27 +33,3 @@ #' June 7 is the average of the underlying data for June 1 through 7, #' inclusive. "case_death_rate_subset" - -#' Subset of Statistics Canada employment numbers by industry and province -#' -#' @format A tibble with 109,388 rows and 6 variables: -#' \describe{ -#' \item{geo_value}{The province in Canada associated with each -#' row of measurements.} -#' \item{time_value}{The time value, in YYYY-MM-01 format, -#' associated with each row of measurements.} -#' \item{ppl_count}{The number of people employed, seasonally -#' adjusted.} -#' \item{employee_type}{The type of employee} -#' \item{naics_industry}{The industry name and associated code -#' according to \href{https://www23.statcan.gc.ca/imdb/p3VD.pl?Function=getVD&TVD=1181553}{NAICS}} -#' } -#' @source This object contains modified data from the following Statistics Canada -#' data table: \href{https://www150.statcan.gc.ca/t1/tbl1/en/tv.action?pid=1410022001#data}{Table 14-10-0220-01 Employment and average weekly earnings (including overtime) for all employees by industry, monthly, seasonally adjusted, Canada} -#' -#' Modifications: -#' * From the given Statistics Canada table, the employee counts -#' are taken as-is. Only \href{https://www23.statcan.gc.ca/imdb/p3VD.pl?Function=getVD&TVD=1181553}{NAICS} codes at hierarchy level 2 are -#' filtered in. Only data rows that are \href{https://www.statcan.gc.ca/en/concepts/definitions/guide-symbol}{good quality or higher and not missing} -#' according to Statistics Canada are removed. -"statcan_employ_subset" \ No newline at end of file diff --git a/data-raw/statcan_employ_subset.R b/data-raw/statcan_employ_subset.R index f61120065..055d2fe36 100644 --- a/data-raw/statcan_employ_subset.R +++ b/data-raw/statcan_employ_subset.R @@ -80,7 +80,7 @@ employ <- statcan_employ %>% statcan_employ_subset <- employ %>% tsibble::as_tsibble(index=time_value, key=c(geo_value, employee_type, naics_industry)) %>% as_epi_df( - additional_metadata=c(other_keys=c("employee_type", "naics_industry"))) + additional_metadata=c(other_keys=list("employee_type", "naics_industry"))) usethis::use_data(statcan_employ_subset, overwrite = TRUE)