diff --git a/.Rhistory b/.Rhistory new file mode 100644 index 0000000..bc93b12 --- /dev/null +++ b/.Rhistory @@ -0,0 +1,512 @@ +34, "CR07", "Num", "Number of jobs for workers with Race: Two or More Race Groups", +35, "CT01", "Num", "Number of jobs for workers with Ethnicity: Not Hispanic or Latino", +36, "CT02", "Num", "Number of jobs for workers with Ethnicity: Hispanic or Latino", +37, "CD01", "Num", "Number of jobs for workers with Educational Attainment: Less than high school", +38, "CD02", "Num", "Number of jobs for workers with Educational Attainment: High school or equivalent, no college", +39, "CD03", "Num", "Number of jobs for workers with Educational Attainment: Some college or Associate degree", +40, "CD04", "Num", "Number of jobs for workers with Educational Attainment: Bachelor's degree or advanced degree", +41, "CS01", "Num", "Number of jobs for workers with Sex: Male", +42, "CS02", "Num", "Number of jobs for workers with Sex: Female", +43, "CFA01", "Num", "Number of jobs for workers at firms with Firm Age: 0-1 Years", +44, "CFA02", "Num", "Number of jobs for workers at firms with Firm Age: 2-3 Years", +45, "CFA03", "Num", "Number of jobs for workers at firms with Firm Age: 4-5 Years", +46, "CFA04", "Num", "Number of jobs for workers at firms with Firm Age: 6-10 Years", +47, "CFA05", "Num", "Number of jobs for workers at firms with Firm Age: 11+ Years", +48, "CFS01", "Num", "Number of jobs for workers at firms with Firm Size: 0-19 Employees", +49, "CFS02", "Num", "Number of jobs for workers at firms with Firm Size: 20-49 Employees", +50, "CFS03", "Num", "Number of jobs for workers at firms with Firm Size: 50-249 Employees", +51, "CFS04", "Num", "Number of jobs for workers at firms with Firm Size: 250-499 Employees", +52, "CFS05", "Num", "Number of jobs for workers at firms with Firm Size: 500+ Employees", +## OD-specific variables +53, "S000", "Num", "Total number of jobs", +54, "SA01", "Num", "Number of jobs for workers age 29 or younger", +55, "SA02", "Num", "Number of jobs for workers age 30 to 54", +56, "SA03", "Num", "Number of jobs for workers age 55 or older", +57, "SE01", "Num", "Number of jobs with earnings $1250/month or less", +58, "SE02", "Num", "Number of jobs with earnings $1251/month to $3333/month", +59, "SE03", "Num", "Number of jobs with earnings greater than $3333/month", +60, "SI01", "Num", "Number of jobs industry Goods Producing", +61, "SI02", "Num", "Number of jobs industry Trade, Transportation, Utilities", +62, "SI03", "Num", "Number of jobs industry All Other Services") %>% +dplyr::mutate( +Explanation = Explanation %>% +stringr::str_to_lower() %>% +stringr::str_replace_all(c( +" " = "_", +"-" = "_", +"[^[:alnum:]_]" = "", +"number_of_jobs" = "jobs", +"jobs_in_naics_sector_[0-9]{2}" = "jobs_industry", +"^jobs_[0-9]{2}" = "jobs", +"33_manufacturing" = "manufacturing", +"45_retail" = "retail", +"49_transportation" = "transportation")) %>% +stringr::str_remove_all("for_|with_|workers_at_firms_")) %>% +dplyr::filter(Variable %in% (.df %>% colnames())) +renaming_vector = stats::setNames(variable_metadata$Variable, variable_metadata$Explanation) +.df %>% dplyr::rename(!!!renaming_vector) +} +source("~/GitHub/climateapi/R/get_lodes.R", echo=TRUE) +test <- get_lodes() +getOption("browser") +options(browser = NULL) +getOption("browser") +test <- get_lodes() +source("~/GitHub/climateapi/R/get_lodes.R", echo=TRUE) +test <- get_lodes(lodes_type = "rac") +rename_lodes_variables = function(.df) { +## renaming code from GH Copilot (in small part--just translating the codebook to a tribble) +## variable definitions/metadata from: https://lehd.ces.census.gov/data/lodes/LODES7/LODESTechDoc7.2.pdf +## table of variable definitions +variable_metadata <- tibble::tribble( +~Pos, ~Variable, ~Type, ~Explanation, +1, "GEOID", "Char15", "GEOID", +2, "C000", "Num", "Total number of jobs", +3, "CA01", "Num", "Number of jobs for workers age 29 or younger", +4, "CA02", "Num", "Number of jobs for workers age 30 to 54", +5, "CA03", "Num", "Number of jobs for workers age 55 or older", +6, "CE01", "Num", "Number of jobs with earnings $1250/month or less", +7, "CE02", "Num", "Number of jobs with earnings $1251/month to $3333/month", +8, "CE03", "Num", "Number of jobs with earnings greater than $3333/month", +9, "CNS01", "Num", "Number of jobs in NAICS sector 11 (Agriculture, Forestry, Fishing and Hunting)", +10, "CNS02", "Num", "Number of jobs in NAICS sector 21 (Mining, Quarrying, and Oil and Gas Extraction)", +11, "CNS03", "Num", "Number of jobs in NAICS sector 22 (Utilities)", +12, "CNS04", "Num", "Number of jobs in NAICS sector 23 (Construction)", +13, "CNS05", "Num", "Number of jobs in NAICS sector 31-33 (Manufacturing)", +14, "CNS06", "Num", "Number of jobs in NAICS sector 42 (Wholesale Trade)", +15, "CNS07", "Num", "Number of jobs in NAICS sector 44-45 (Retail Trade)", +16, "CNS08", "Num", "Number of jobs in NAICS sector 48-49 (Transportation and Warehousing)", +17, "CNS09", "Num", "Number of jobs in NAICS sector 51 (Information)", +18, "CNS10", "Num", "Number of jobs in NAICS sector 52 (Finance and Insurance)", +19, "CNS11", "Num", "Number of jobs in NAICS sector 53 (Real Estate and Rental and Leasing)", +20, "CNS12", "Num", "Number of jobs in NAICS sector 54 (Professional, Scientific, and Technical Services)", +21, "CNS13", "Num", "Number of jobs in NAICS sector 55 (Management of Companies and Enterprises)", +22, "CNS14", "Num", "Number of jobs in NAICS sector 56 (Administrative and Support and Waste Management and Remediation Services)", +23, "CNS15", "Num", "Number of jobs in NAICS sector 61 (Educational Services)", +24, "CNS16", "Num", "Number of jobs in NAICS sector 62 (Health Care and Social Assistance)", +25, "CNS17", "Num", "Number of jobs in NAICS sector 71 (Arts, Entertainment, and Recreation)", +26, "CNS18", "Num", "Number of jobs in NAICS sector 72 (Accommodation and Food Services)", +27, "CNS19", "Num", "Number of jobs in NAICS sector 81 (Other Services [except Public Administration])", +28, "CNS20", "Num", "Number of jobs in NAICS sector 92 (Public Administration)", +29, "CR01", "Num", "Number of jobs for workers with Race: White, Alone", +30, "CR02", "Num", "Number of jobs for workers with Race: Black or African American Alone", +31, "CR03", "Num", "Number of jobs for workers with Race: American Indian or Alaska Native Alone", +32, "CR04", "Num", "Number of jobs for workers with Race: Asian Alone", +33, "CR05", "Num", "Number of jobs for workers with Race: Native Hawaiian or Other Pacific Islander Alone", +34, "CR07", "Num", "Number of jobs for workers with Race: Two or More Race Groups", +35, "CT01", "Num", "Number of jobs for workers with Ethnicity: Not Hispanic or Latino", +36, "CT02", "Num", "Number of jobs for workers with Ethnicity: Hispanic or Latino", +37, "CD01", "Num", "Number of jobs for workers with Educational Attainment: Less than high school", +38, "CD02", "Num", "Number of jobs for workers with Educational Attainment: High school or equivalent, no college", +39, "CD03", "Num", "Number of jobs for workers with Educational Attainment: Some college or Associate degree", +40, "CD04", "Num", "Number of jobs for workers with Educational Attainment: Bachelor's degree or advanced degree", +41, "CS01", "Num", "Number of jobs for workers with Sex: Male", +42, "CS02", "Num", "Number of jobs for workers with Sex: Female", +43, "CFA01", "Num", "Number of jobs for workers at firms with Firm Age: 0-1 Years", +44, "CFA02", "Num", "Number of jobs for workers at firms with Firm Age: 2-3 Years", +45, "CFA03", "Num", "Number of jobs for workers at firms with Firm Age: 4-5 Years", +46, "CFA04", "Num", "Number of jobs for workers at firms with Firm Age: 6-10 Years", +47, "CFA05", "Num", "Number of jobs for workers at firms with Firm Age: 11+ Years", +48, "CFS01", "Num", "Number of jobs for workers at firms with Firm Size: 0-19 Employees", +49, "CFS02", "Num", "Number of jobs for workers at firms with Firm Size: 20-49 Employees", +50, "CFS03", "Num", "Number of jobs for workers at firms with Firm Size: 50-249 Employees", +51, "CFS04", "Num", "Number of jobs for workers at firms with Firm Size: 250-499 Employees", +52, "CFS05", "Num", "Number of jobs for workers at firms with Firm Size: 500+ Employees", +## OD-specific variables +53, "S000", "Num", "Total number of jobs", +54, "SA01", "Num", "Number of jobs for workers age 29 or younger", +55, "SA02", "Num", "Number of jobs for workers age 30 to 54", +56, "SA03", "Num", "Number of jobs for workers age 55 or older", +57, "SE01", "Num", "Number of jobs with earnings $1250/month or less", +58, "SE02", "Num", "Number of jobs with earnings $1251/month to $3333/month", +59, "SE03", "Num", "Number of jobs with earnings greater than $3333/month", +60, "SI01", "Num", "Number of jobs industry Goods Producing", +61, "SI02", "Num", "Number of jobs industry Trade, Transportation, Utilities", +62, "SI03", "Num", "Number of jobs industry All Other Services") %>% +dplyr::mutate( +Explanation = Explanation %>% +stringr::str_to_lower() %>% +stringr::str_replace_all(c( +" " = "_", +"-" = "_", +"[^[:alnum:]_]" = "", +"number_of_jobs" = "jobs", +"jobs_in_naics_sector_[0-9]{2}" = "jobs_industry", +"^jobs_[0-9]{2}" = "jobs", +"33_manufacturing" = "manufacturing", +"45_retail" = "retail", +"49_transportation" = "transportation")) %>% +stringr::str_remove_all("for_|with_|workers_at_firms_")) %>% +dplyr::filter(Variable %in% (.df %>% colnames())) +renaming_vector = stats::setNames(variable_metadata$Variable, variable_metadata$Explanation) +.df %>% dplyr::rename(!!!renaming_vector) +} +test <- get_lodes(lodes_type = "rac") +library(tidyverse) +test <- get_lodes(lodes_type = "rac") +test <- get_lodes(lodes_type = "rac", years = 2021) +options(browser = NULL) +test <- get_lodes(lodes_type = "rac", years = 2021) +options(browser = "false") +test <- get_lodes(lodes_type = "rac", years = 2021) +test <- get_lodes(lodes_type = "rac", years = 2021, states = "MN") +R.home() +Sys.getenv("R_PROFILE_USER") +R.home() +Sys.getenv("R_PROFILE_USER") +Sys.getenv("R_PROFILE_USER") +options(error = NULL) +test <- get_lodes(lodes_type = "rac", years = 2021, states = "MN") +rlang::last_trace() +source("~/GitHub/climateapi/R/get_lodes.R") +test <- get_lodes(lodes_type = "rac", years = 2021, states = "MN") +## both all jobs and all federal jobs +lodes_all_nonfederal_jobs = lodes_all_jobs %>% +dplyr::rename_with(.cols = -c(year, dplyr::matches("GEOID"), state), .fn = ~ stringr::str_c("all_", .x)) %>% +dplyr::mutate(year = as.numeric(year)) %>% +dplyr::left_join( +lodes_federal_jobs %>% +dplyr::select(-state) %>% +dplyr::rename_with(.cols = -c(year, dplyr::matches("GEOID")), .fn = ~ stringr::str_c("federal_", .x)) %>% +dplyr::mutate(year = as.numeric(year)), +by = join_by) %>% +dplyr::mutate( +dplyr::across( +## there are many fewer rows for the federal primary jobs data, so the join +## produces NAs for federal jobs for many tracts. however, these tracts in +## effect have zero federal jobs, so we replace the NAs with zeros. +.cols = dplyr::matches("federal"), +.fns = ~ dplyr::if_else(is.na(.x), 0, .x)), +## no federal data exists for years prior to 2010 +dplyr::across( +.cols = dplyr::matches("federal"), +.fns = ~ dplyr::if_else(year < 2010, NA_real_, .x))) %>% +tidyr::pivot_longer( +cols = -c(year, state, dplyr::matches("GEOID")), +names_pattern = "(all|federal)_(.*)", +names_to = c("job_type", "variable")) %>% +tidyr::pivot_wider(names_from = "variable", values_from = value) %>% +rename_lodes_variables() +## both all jobs and all federal jobs +lodes_all_nonfederal_jobs = lodes_all_jobs %>% +dplyr::rename_with(.cols = -c(year, dplyr::matches("GEOID"), state), .fn = ~ stringr::str_c("all_", .x)) %>% +dplyr::mutate(year = as.numeric(year)) %>% +dplyr::left_join( +lodes_federal_jobs %>% +dplyr::select(-state) %>% +dplyr::rename_with(.cols = -c(year, dplyr::matches("GEOID")), .fn = ~ stringr::str_c("federal_", .x)) %>% +dplyr::mutate(year = as.numeric(year)), +by = join_by) %>% +dplyr::mutate( +dplyr::across( +## there are many fewer rows for the federal primary jobs data, so the join +## produces NAs for federal jobs for many tracts. however, these tracts in +## effect have zero federal jobs, so we replace the NAs with zeros. +.cols = dplyr::matches("federal"), +.fns = ~ dplyr::if_else(is.na(.x), 0, .x)), +## no federal data exists for years prior to 2010 +dplyr::across( +.cols = dplyr::matches("federal"), +.fns = ~ dplyr::if_else(year < 2010, NA_real_, .x))) %>% +tidyr::pivot_longer( +cols = -c(year, state, dplyr::matches("GEOID")), +names_pattern = "(all|federal)_(.*)", +names_to = c("job_type", "variable")) %>% +tidyr::pivot_wider(names_from = "variable", values_from = value) #%>% +View(lodes_federal_jobs) +View(lodes_all_jobs) +source("~/GitHub/climateapi/R/get_lodes.R") +source("~/GitHub/climateapi/R/get_lodes.R") +test <- get_lodes(lodes_type = "rac", years = 2021, states = "MN") +source("~/GitHub/climateapi/R/get_lodes.R") +test <- get_lodes(lodes_type = "rac", years = 2021, states = "MN") +## both all jobs and all federal jobs +lodes_all_nonfederal_jobs = lodes_all_jobs %>% +dplyr::rename_with(.cols = -c(year, dplyr::matches("GEOID"), state), .fn = ~ stringr::str_c("all_", .x)) %>% +dplyr::mutate(year = as.numeric(year)) #%>% +View(lodes_all_nonfederal_jobs) +lodes_federal_jobs %>% +dplyr::select(-state) %>% +dplyr::rename_with(.cols = -c(year, dplyr::matches("GEOID")), .fn = ~ stringr::str_c("federal_", .x)) %>% +dplyr::mutate(year = as.numeric(year)) +## both all jobs and all federal jobs +lodes_all_nonfederal_jobs = lodes_all_jobs %>% +dplyr::rename_with(.cols = -c(year, dplyr::matches("GEOID"), state), .fn = ~ stringr::str_c("all_", .x)) %>% +dplyr::mutate(year = as.numeric(year)) %>% +dplyr::left_join( +lodes_federal_jobs %>% +dplyr::select(-state) %>% +dplyr::rename_with(.cols = -c(year, dplyr::matches("GEOID")), .fn = ~ stringr::str_c("federal_", .x)) %>% +dplyr::mutate(year = as.numeric(year)), +by = join_by) %>% +dplyr::mutate( +dplyr::across( +## there are many fewer rows for the federal primary jobs data, so the join +## produces NAs for federal jobs for many tracts. however, these tracts in +## effect have zero federal jobs, so we replace the NAs with zeros. +.cols = dplyr::matches("federal"), +.fns = ~ dplyr::if_else(is.na(.x), 0, .x)), +## no federal data exists for years prior to 2010 +dplyr::across( +.cols = dplyr::matches("federal"), +.fns = ~ dplyr::if_else(year < 2010, NA_real_, .x))) %>% +tidyr::pivot_longer( +cols = -c(year, state, dplyr::matches("GEOID")), +names_pattern = "(all|federal)_(.*)", +names_to = c("job_type", "variable")) %>% +tidyr::pivot_wider(names_from = "variable", values_from = value) %>% +rename_lodes_variables() +if (lodes_type == "od") { +join_by = c("year", "w_GEOID", "h_GEOID") } +if (lodes_type == "od") { +join_by = c("year", "w_GEOID", "h_GEOID") } +if (lodes_type == "od") { +join_by = c("year", "w_GEOID", "h_GEOID") +else if (lodes_type == "rac") +if (lodes_type == "od") { +join_by = c("year", "w_GEOID", "h_GEOID") } else if (lodes_type == "rac") +if (lodes_type == "od") { +join_by = c("year", "w_GEOID", "h_GEOID") } else if (lodes_type == "rac") { +join_by = c("year", "h_GEOID") +} +## both all jobs and all federal jobs +lodes_all_nonfederal_jobs = lodes_all_jobs %>% +dplyr::rename_with(.cols = -c(year, dplyr::matches("GEOID"), state), .fn = ~ stringr::str_c("all_", .x)) %>% +dplyr::mutate(year = as.numeric(year)) %>% +dplyr::left_join( +lodes_federal_jobs %>% +dplyr::select(-state) %>% +dplyr::rename_with(.cols = -c(year, dplyr::matches("GEOID")), .fn = ~ stringr::str_c("federal_", .x)) %>% +dplyr::mutate(year = as.numeric(year)), +by = join_by) %>% +dplyr::mutate( +dplyr::across( +## there are many fewer rows for the federal primary jobs data, so the join +## produces NAs for federal jobs for many tracts. however, these tracts in +## effect have zero federal jobs, so we replace the NAs with zeros. +.cols = dplyr::matches("federal"), +.fns = ~ dplyr::if_else(is.na(.x), 0, .x)), +## no federal data exists for years prior to 2010 +dplyr::across( +.cols = dplyr::matches("federal"), +.fns = ~ dplyr::if_else(year < 2010, NA_real_, .x))) %>% +tidyr::pivot_longer( +cols = -c(year, state, dplyr::matches("GEOID")), +names_pattern = "(all|federal)_(.*)", +names_to = c("job_type", "variable")) %>% +tidyr::pivot_wider(names_from = "variable", values_from = value) %>% +rename_lodes_variables() +source("~/GitHub/climateapi/R/get_lodes.R") +test <- get_lodes(lodes_type = "rac", years = 2021, states = "MN") +test2 <- get_lodes(lodes_type = "wac", years = 2021, states = "MN") +test2 <- get_lodes(lodes_type = "od", years = 2021, states = "MN") +View(test) +View(test2) +View(test) +View(test2) +source("~/GitHub/climateapi/R/get_lodes.R") +test2 <- get_lodes(lodes_type = "od", years = 2021, states = "MN") +test2 <- get_lodes(lodes_type = "wac", years = 2021, states = "MN") +View(lodes_all_jobs) +View(lodes_federal_jobs) +source("~/GitHub/climateapi/R/get_lodes.R") +test3 <- get_lodes(lodes_type = "wac", years = 2021, states = "MN") +source("~/GitHub/climateapi/R/get_lodes.R") +test3 <- get_lodes(lodes_type = "wac", years = 2021, states = "MN") +3004*3004 +source("~/GitHub/climateapi/R/get_business_patterns.R") +testthat::test_that("naics_code_digits errors clearly when not in c(2,3)", { +testthat::expect_error({get_business_patterns(year = 2022, naics_code_digits = 4)}) +}) +testthat::expect_error({get_business_patterns(year = 2022, naics_code_digits = 5)}) +testthat::test_that("naics_code_digits errors clearly when not in c(2,3)", { +testthat::expect_error({get_business_patterns(year = 2022, naics_code_digits = 7)}) +}) +test <- get_business_patterns() +library(tidyverse) +test <- get_business_patterns() +View(test) +test <- get_business_patterns(year = 2025) +source("~/GitHub/climateapi/R/get_business_patterns.R") +test <- get_business_patterns(year = 2025) +test <- get_business_patterns(year = 2025) +normalizePath("~") +file.edit("~/.Rprofile") +test <- get_business_patterns(year = 2025) +options(error = NULL) +test <- get_business_patterns(year = 2025) +test <- get_business_patterns(year = 2025) +View(test) +source("~/GitHub/climateapi/R/get_business_patterns.R") +test <- get_business_patterns(year = 2025) +source("~/GitHub/climateapi/R/get_business_patterns.R") +test <- get_business_patterns() +library(tidycensus) +library(tidyverse) +test <- get_business_patterns() +test <- get_business_patterns(year = 2025) +testthat::test_that("naics_code_digits errors clearly when year is outside accceptable range", { +testthat::expect_error({get_business_patterns(year = 2025, naics_code_digits = 3)}) +}) +source("~/GitHub/climateapi/tests/testthat/test-get_business_patterns.R") +devtools::test() +library(devtools) +install.packages("devtools") +library(devtools) +devtools::test() +View(test) +test2 <- get_business_patterns() +test2 <- censusapi::listCensusMetadata( +name = "cbp", +vintage = "2022", +type = "variables", +include_values = TRUE) +View(test2) +test3 <- censusapi::getCensus( +name = "cbp", +vintage = 2022, +vars = c( +"EMP", +"ESTAB", +"PAYANN", +"EMPSZES", +"NAICS2017_LABEL"), +region = "zipcode:*", +NAICS2017 = "00") +View(test3) +View(test3) +test3 <- censusapi::getCensus( +name = "cbp", +vintage = 2022, +vars = c( +"EMP", +"ESTAB", +"PAYANN", +"EMPSZES", +"NAICS2017_LABEL"), +region = "zipcode:*", +NAICS2017 = "00") +test3 <- censusapi::getCensus( +name = "cbp", +vintage = 2022, +vars = c( +"EMP", "YEAR", +"ESTAB", +"PAYANN", +"EMPSZES", +"NAICS2017_LABEL"), +region = "zipcode:*", +NAICS2017 = "00") +View(test) +View(test2) +View(test3) +View(test) +source("~/GitHub/climateapi/R/get_business_patterns.R") +test <- get_business_patterns() +source("~/GitHub/climateapi/R/get_business_patterns.R") +test <- get_business_patterns() +View(test) +test2 <- get_business_patterns(geo = "zipcode") +test_zip <-censusapi::getCensus( +name = "cbp", +vintage = 2022, +region = paste0("geo"zipcode, ":*"), +test_zip <-censusapi::getCensus( +name = "cbp", +vintage = 2022, +region = paste0("zipcode", ":*"), +NAICS2017 = "00") +test_zip <-censusapi::getCensus( +name = "cbp", +vintage = 2022, +vars = "all", +region = paste0("zipcode", ":*"), +NAICS2017 = "00") +View(test2) +?censusapi::getCensus +zbp_vars_2022 <- listCensusMetadata( +name = "zbp", +vintage = 2022, +type = "variables" +) +zbp_vars_2022 <- censusapi::listCensusMetadata( +name = "zbp", +vintage = 2022, +type = "variables" +) +zbp_vars_2022 <- censusapi::listCensusMetadata( +name = "zbp", +vintage = 2022, +type = "variables" +) +zbp_vars_2020 <- listCensusMetadata( +name = "zbp", +vintage = 2020, +type = "variables" +) +zbp_vars_2020 <- censusapi::listCensusMetadata( +name = "zbp", +vintage = 2020, +type = "variables" +) +zbp_vars_2022 <- censusapi::listCensusMetadata( +name = "zbp", +vintage = 2022, +type = "variables", include_values = TRUE +) +source("~/GitHub/climateapi/R/get_business_patterns.R") +test_zip <-censusapi::getCensus( +name = "cbp", +vintage = 2022, +vars = "all", +region = paste0("zipcode", ":*"), +NAICS2017 = "00") +test2 <- get_business_patterns(geo = "zipcode") +rlang::last_trace() +source("~/GitHub/climateapi/R/get_business_patterns.R") +test <- get_business_patterns() +source("~/GitHub/climateapi/R/get_business_patterns.R") +test <- get_business_patterns() +source("~/GitHub/climateapi/R/get_business_patterns.R") +test <- get_business_patterns() +test2 <- get_business_patterns(geo = "zipcode") +colnames(test3) +source("~/GitHub/climateapi/R/get_business_patterns.R") +test2 <- get_business_patterns(geo = "zipcode") +View(test2) +source("~/GitHub/climateapi/R/get_business_patterns.R") +test4 <- get_business_patterns(geo = "tract") +source("~/GitHub/climateapi/tests/testthat/test-get_business_patterns.R") +devtools::test() +load_all() +load_all() +devtools::load_all() +devtools::test() +devtools::test() +source("~/GitHub/climateapi/tests/testthat/test-get_business_patterns.R") +testthat::test_that("employees has no negative values", { +test <- get_business_patterns(geo = "county", naics_code_digits = 2) +# Ensure the column exists +testthat::expect_true( +"employees" %in% names(test), +info = "`employees` column is missing in the returned data." +) +# Assert no negative values (ignore NAs) +testthat::expect_true( +all(test$employees[!is.na(test$employees)] >= 0), +info = "Found negative values in `employees`." +) +}) +test <- get_business_patterns(geo = "county", naics_code_digits = 2) +source("~/GitHub/climateapi/R/get_business_patterns.R") +test <- get_business_patterns() +test <- get_business_patterns(geo = "zipcode") +source("~/GitHub/climateapi/R/get_business_patterns.R") +test <- get_business_patterns(geo = "zipcode") +rlang::last_trace() +library(tidyverse) +source("~/GitHub/climateapi/R/get_business_patterns.R") +test <- get_business_patterns() +View(test) +devtools::test() +source("~/GitHub/climateapi/tests/testthat/test-get_business_patterns.R") diff --git a/DESCRIPTION b/DESCRIPTION index f381b96..2128b9d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -64,5 +64,7 @@ Suggests: knitr, qualtRics, rmarkdown, + testthat (>= 3.0.0), tidyverse VignetteBuilder: knitr +Config/testthat/edition: 3 diff --git a/R/get_business_patterns.R b/R/get_business_patterns.R index e8a01d8..48566b1 100644 --- a/R/get_business_patterns.R +++ b/R/get_business_patterns.R @@ -1,9 +1,78 @@ +#' @importFrom magrittr %>% +#' #' Obtain County Business Patterns (CBP) Estimates per County #' -#' @param year The vintage of CBP data desired. Data are available from 1986, though this function likely only supports more recent years (it it tested on 2022-vintage data only). Default is 2022. -#' @param naics_code_digits One of c(2, 3). Default is 2. NAICS codes range in specificity; 2-digit codes describe the highest groupings of industries, while six-digit codes are exceedingly detailed. There are 20 2-digit NAICS codes and 196 3-digit codes. -#' @param naics_codes A vector of NAICS codes to query. If NULL, the function will query all available codes with the specified number of digits. If not NULL, this argument overrides the `naics_code_digits` argument. -#' @return A tibble with data on county-level employees, employers, and aggregate annual payrolls by industry and employer size +#' @param year The vintage of CBP data desired. Data are available from 1986, +#' though this function likely only supports more recent years (it it tested on 2022-vintage data only). +#' Default is 2022. +#' @param geo The level of geography of CBP data desired. Either "county" or "zipcode". Zipcode +#' level data only The ZIP Code Business Patterns (ZBP) dataset includes the number of establishments, +#' employment during the week of March 12th, first quarter and annual payroll for NAICS 00 (total for all sectors). +#' Additionally, the number of establishments (but not employment or payroll) are available by employment +#' size of the establishment for 2- through 6-digit NAICS. +#' @param naics_code_digits One of c(2, 3). Default is 2. NAICS codes range in +#' specificity; 2-digit codes describe the highest groupings of industries, +#' while six-digit codes are exceedingly detailed. There are 20 2-digit NAICS +#' codes and 196 3-digit codes. If more specific codes are desired, leave this +#' argument as NULL and supply the desired codes as the argument to `naics_codes`. +#' @param naics_codes A vector of NAICS codes to query. If NULL, the function will +#' query all available codes with the specified number of digits. If not NULL, +#' this argument overrides the `naics_code_digits` argument. +#' +#' +#' @details +#' County Business Patterns (CBP) is an annual series that provides subnational +#' economic data for establishments with paid employees by industry and employment size. +#' This series includes the number of establishments, employment during the week of +#' March 12, first quarter payroll, and annual payroll. Industry classification of business +#' establishments in CBP is according to the North American Industry Classification System (NAICS) +#' https://www.census.gov/naics/ +#' +#' CBP data are useful for studying economic activity of small areas. Federal agencies +#' use the data to determine employee concentrations and trends by industry. +#' State and local government offices use the data to assess business changes, develop +#' fiscal policies, and plan future policies and programs. CBP data are used to benchmark +#' public and private sector statistical series, surveys, and databases between economic census years. +#' +#' While similar to LEHD Origin-Destination Employment Statistics (LODES) data in it's coverage of employment +#' statistics, CBP differs mainly due to its broader geographies (county vs. tract) and +#' focus on framing the statistics at an establishment/company level rather than at the individual/job +#' level found in LODES data. CBP also does not offer information on locations of the jobs in relation to +#' where the employee actually resides. +#' +#' The series excludes data on self-employed individuals, employees of private households, +#' railroad employees, agricultural production employees, and most government employees. +#' A certain amount of undercoverage occurs in the universe, as the Census Bureau does +#' not create a multi-unit company structure in the Business Register for very small employers +#' (less than 10 employees) identified in the Economic Census. +#' +#' CBP covers most NAICS industries excluding Crop and Animal Production (NAICS 111,112); +#' Rail Transportation (NAICS 482); Postal Service (NAICS 491); Pension, Health, Welfare, +#' and Other Insurance Funds (NAICS 525110, 525120, 525190); Trusts, Estates, and Agency +#' Accounts (NAICS 525920); Offices of Notaries (NAICS 541120); Private Households (NAICS 814); +#' and Public Administration (NAICS 92) +#' +#' +#' +#' @return A tibble with data on county-level employees, employers, and aggregate +#' annual payrolls by industry and employer size +#' \describe{ +#' \item{year}{the year for which CBP data is pulled from} +#' \item{state}{A two-digit state identifier.} +#' \item{county}{A three-digit county identifier.} +#' \item{employees}{number of individual employees employed in that particular industry +#' and establishment size combination} +#' \item{employers}{number of establishments of each employment size} +#' \item{annual_payroll}{total annual payroll expenditures measured in $1,000's of USD} +#' \item{industry}{industry classification according to North American Industry Classification System. +#' Refer to details for additional information} +#' \item{employee_size_range_label}{range for the employment size of establishments included in each +#' given grouping} +#' \item{employee_size_range_code}{three-digit code used to categorize employment sizes} +#' \item{naics_code}{two to six-digit code used by the NAICS to categorize and sub-categorize industries} +#' } +#' +#' #' @export #' #' @examples @@ -17,16 +86,22 @@ #' naics_codes = c(221111, 221112)) #' } -get_business_patterns = function(year = 2022, naics_code_digits = 2, naics_codes = NULL) { +get_business_patterns = function(year = 2022, geo = "county", naics_code_digits = 2, naics_codes = NULL) { if (year < 1986) { stop("Year must be 1986 or later.") } + if (year > 2023) { stop("Most recent year for data is 2023.") } + if (! geo %in% c("county", "zipcode")) { stop("`geo` must be one of 'county' or 'zipcode'.") } if (! naics_code_digits %in% c(2, 3)) { stop("`naics_code_digits` must be one of c(2, 3). For more detailed codes, explicitly pass desired codes to the `naics_codes` parameter.") } naics_codes_metadata = censusapi::listCensusMetadata( - name = "cbp", - vintage = "2022", - type = "variables", - include_values = TRUE) + name = "cbp", + vintage = "2022", + type = "variables", + include_values = TRUE) %>% + #filter out codes 92 and 95 which do not appear to have data associated and + #don't appear on the census list of naics codes at + #https://www2.census.gov/programs-surveys/cbp/technical-documentation/reference/naics-descriptions/naics2017.txt + dplyr::filter(!stringr::str_starts(values_code, "92|95")) if (!is.null(naics_codes)) { naics_code_check = naics_codes_metadata %>% @@ -62,30 +137,34 @@ get_business_patterns = function(year = 2022, naics_code_digits = 2, naics_codes ~ tryCatch({ censusapi::getCensus( name = "cbp", - vintage = 2022, + vintage = year, vars = c( "EMP", + "YEAR", "ESTAB", "PAYANN", "EMPSZES", "NAICS2017_LABEL"), - region = "county:*", - NAICS2017 = .x)}, + region = paste0(geo, ":*"), + NAICS2017 = .x) %>% + mutate(naics_code = .x)}, error = function(e) { message("Error in NAICS2017: ", .x) return(tibble::tibble())})) %>% - dplyr::select( - state, - county, + dplyr::mutate( + # state, + # county, employees = EMP, employers = ESTAB, annual_payroll = PAYANN, employee_size_range = EMPSZES, - industry = NAICS2017_LABEL) %>% + industry = NAICS2017_LABEL, + naics_code) %>% dplyr::mutate( industry = industry %>% stringr::str_to_lower() %>% stringr::str_replace_all(c(" " = "_", ",|\\(|\\)|_for_all_sectors|and_" = "")), + year = year, ## this recoding is mapped from: https://www2.census.gov/programs-surveys/bds/technical-documentation/label_empszes.csv employee_size_range_label = dplyr::case_when( employee_size_range == "001" ~ "All establishments", @@ -137,7 +216,40 @@ get_business_patterns = function(year = 2022, naics_code_digits = 2, naics_codes stringr::str_extract(employee_size_range_label, "[0-9]{4}") %>% as.numeric >= 1000 ~ "1000+", TRUE ~ employee_size_range_label)) %>% dplyr::rename(employee_size_range_code = employee_size_range) %>% - dplyr::select(state, county, employees, employers, annual_payroll, industry, employee_size_range_label, employee_size_range_code) + { + if (geo == "county") { + dplyr::select(., + year, state, county, employees, employers, annual_payroll, + industry, employee_size_range_label, employee_size_range_code, naics_code + ) + } else if (geo == "zipcode") { + dplyr::select(., + year, zip_code, employees, employers, annual_payroll, + industry, employee_size_range_label, employee_size_range_code, naics_code) + } + } + +# dplyr::select(year, state, county, employees, employers, annual_payroll, industry, employee_size_range_label, employee_size_range_code, naics_code) + + high_missingness = cbp %>% + skimr::skim() %>% + dplyr::filter(complete_rate < .9) %>% + dplyr::pull(skim_variable) + + + if (length(high_missingness) > 0) { + base::warning( + stringr::str_c( + "Variables with high missingness in County Business Patterns", + ": ", + base::paste(high_missingness, collapse = ", ") + ), + call. = FALSE + ) + } else { + base::print("No variables have high missingness (complete_rate >= 0.9).") + } + return(cbp) } @@ -145,4 +257,4 @@ get_business_patterns = function(year = 2022, naics_code_digits = 2, naics_codes utils::globalVariables( c("EMP", "EMPSZES", "ESTAB", "NAICS2017_LABEL", "PAYANN", "annual_payroll", "employee_size_range", "employee_size_range_code", "employee_size_range_label", - "employees", "employers", "industry", "values_code")) + "employees", "employers", "industry", "values_code", "naics_code")) diff --git a/R/get_lodes.R b/R/get_lodes.R index 1047292..e6cb469 100644 --- a/R/get_lodes.R +++ b/R/get_lodes.R @@ -93,14 +93,72 @@ rename_lodes_variables = function(.df) { #' Get LEHD Origin-Destination Employment Statistics (LODES) data #' Returned data are from LODES Version 8, which is enumerated in 2020-vintage geometries. #' -#' @param lodes_type One of c("rac", "wac", "od"). "rac" = Residence Area Characteristics, where jobs are associated with employees' residences. "wac" = Workplace Area Characteristics, where jobs are associated with employees' workplaces. "od" = Origin-Destination data, where jobs are associated with both workers' residences and their workplaces. -#' @param jobs_type One of c("all", "primary"). Default is "all", which includes multiple jobs for workers with multiple jobs. "primary" includes only the highest-paying job per worker. +#' @param lodes_type One of c("rac", "wac", "od"). "rac" = Residence Area +#' Characteristics, where jobs are associated with employees' residences. +#' "wac" = Workplace Area Characteristics, where jobs are associated with +#' employees' workplaces. "od" = Origin-Destination data, where jobs are associated +#' with both workers' residences and their workplaces. +#' @param jobs_type One of c("all", "primary"). Default is "all", which includes +#' multiple jobs for workers with multiple jobs. "primary" includes only the +#' highest-paying job per worker. #' @param states A vector of state abbreviations. #' @param years A vector of years. -#' @param geography One of c("block", "block group", "tract", "county", "state"). Default is "tract". -#' @param state_part One of c("main", "aux"). Default is "main", which includes only workers who reside inside the state where they work. "aux" returns only workers who work in the specified state but live outside of that state. +#' @param geography One of c("block", "block group", "tract", "county", "state"). +#' Default is "tract". +#' @param state_part One of c("main", "aux"). Default is "main", which includes +#' only workers who reside inside the state where they work. "aux" returns +#' only workers who work in the specified state but live outside of that state. +#' +#' @details +#' The Longitudinal Employer-Household Dynamics (LEHD) data at the U.S. Census Bureau +#' is a quarterly database of linked employer-employee data covering over 95% of employment +#' in the United States. The LEHD data are generated by merging previously collected survey +#' and administrative data on jobs, businesses, and workers. +#' +#' LEHD Origin-Destination Employment Statistics (LODES)is a partially synthetic dataset +#' that describes geographic patterns of jobs by their employment locations and residential +#' locations as well as the connections between the two locations. The microdata link employee +#' and employer data by combining administrative state unemployment insurance wage records +#' with other administrative and survey data. The source data are aggregated and adjusted +#' to protect confidentiality. +#' +#' LODES data includes three datasets: +#' Residence Area Characteristics (RAC): +#' This file lists the total number of jobs by the census block where the employee lives. +#' +#' Workplace Area Characteristics (WAC): +#' This file lists the total number of jobs by the census block where the employee works. +#' +#' Origin-Destination (OD): +#' This file lists job totals by both the census block where the employee lives and the +#' census block where the employee works +#' +#' While similar to County Business Patterns (CBP) data in it's coverage of employment +#' statistics, LODES differs mainly due to its more granular geographies (tract vs. county) and +#' focus on framing the statistics at the individual/job level found in LODES data. +#' +#' @return A tibble with one record per geography per year per job type. Attributes +#' include total jobs and jobs by worker earnings, industry, and demographics; +#' the origin-destination results have more limited demographics compared to +#' the "wac" and "rac" results. +#' \describe{ +#' \item{year}{the year for which LODES data is pulled from} +#' \item{state}{A two-digit state identifier.} +#' \item{GEOID}{11 digit identifier denoted as either h_GEOID representing the employees' residence census block code or w_GEOID representing the employees' workplace census block code} +#' \item{job_type}{one of either 'all' jobs or only 'federal' jobs} +#' \item{total_jobs}{total number of jobs in a given tract} +#' \item{jobs_workers_age}{number of employees by given age range} +#' \item{jobs_earnings}{number of employees by given monthly earnings range} +#' \item{jobs_industry}{number of employees by given industry} +#' \item{jobs_workers_race}{number of employees by given race, inclusive of hispanic or latino; only available in 'wac' and 'rac' datasets} +#' \item{jobs_workers_ethnicity}{number of employess by hispanic or latino status, regardless of race; only available in 'wac' and 'rac' datasets} +#' \item{jobs_workers_educational_attainment}{number of employees by highest level of education attained; only available in 'wac' and 'rac' datasets} +#' \item{jobs_workers_sex}{number of employees by sex; only available in 'wac' and 'rac' datasets} +#' \item{jobs_firm_age}{number of employees by the age of employing firm; only available in 'wac' datasets} +#' \item{jobs_firm_size}{number of employees for a given range in employer size; only available in 'wac' datasets} +#' } +#' #' -#' @return A tibble with one record per geography per year per job type. Attributes include total jobs and jobs by worker earnings, industry, and demographics; the origin-destination results have more limited demographics compared to the "wac" and "rac" results. #' @export get_lodes = function( lodes_type, @@ -124,6 +182,12 @@ get_lodes = function( if (!state_part %in% c("main", "aux")) { stop("`state_part` must be one of 'main' or 'aux'.")} + + # if states == "all" then set states parameter as all 50 states plus DC + if ("all" %in% states) { + states <- c(state.abb, "DC") + } + years = years %>% as.numeric states = states %>% stringr::str_to_lower() @@ -147,6 +211,9 @@ form of multi-year job count comparison, we return by default federal job counts alongside those for all jobs; users can subtract federal job counts to create a temporally-consistent measure of total jobs.\n") } + +# list of state & year combinations that are missing data as of 12/2025. Sourced from +# here: https://lehd.ces.census.gov/doc/help/onthemap/LODESTechDoc.pdf state_years_missing = tibble::tribble( ~ year, ~ state, 2002, "AK", @@ -172,16 +239,15 @@ a temporally-consistent measure of total jobs.\n") } 2009, "DC", 2009, "MA", 2010, "MA", + 2017, "AK", 2018, "AK", 2019, "AK", - 2019, "MS", 2020, "AK", - 2020, "MS", 2021, "AK", - 2021, "MS", 2022, "AK", - 2022, "MS", - 2022, "MI") + 2022, "MI", + 2023, "AK", + 2023, "MI") state_years_supplied = expand.grid(years, states %>% stringr::str_to_upper()) %>% tibble::as_tibble() %>% @@ -202,7 +268,7 @@ Returning for only those states that are available for all specified years.\n") #https://lehd.ces.census.gov/doc/help/onthemap/LODESDataNote-FedEmp2015.pdf - ## geography identifying variables are variably-named across different geography + ## geography-identifying variables are variably named across different geography ## parameters; we standardize these to always be "GEOID" geoid_rename = c("_geocode|_tract|_bg|_county|_state" = "_GEOID") @@ -212,12 +278,7 @@ Returning for only those states that are available for all specified years.\n") jobs_type_all = "JT01" jobs_type_federal = "JT05" } - # states = "TX" - # years = 2022 - # agg_geo = "tract" - # lodes_type = "od" - - ## else this is noisy + ## supress messages/warnings else this is noisy suppressWarnings({suppressMessages({ lodes_all_jobs = lehdr::grab_lodes( state = states, @@ -239,6 +300,14 @@ Returning for only those states that are available for all specified years.\n") include federal jobs for 2010 and later. Records for pre-2010 federal jobs are listed as NA.\n") } + + ## if only years are pre-2010, returns jobs without federal job data + if (years %>% max < 2010) { + + return(lodes_all_jobs) + + } else { + suppressWarnings({suppressMessages({ lodes_federal_jobs = lehdr::grab_lodes( state = states, @@ -255,8 +324,14 @@ as NA.\n") } dplyr::select(-dplyr::matches("create")) })}) join_by = c("year", "GEOID") + if (lodes_type == "od") { - join_by = c("year", "w_GEOID", "h_GEOID") } + join_by = c("year", "w_GEOID", "h_GEOID") } else if (lodes_type == "rac") { + join_by = c("year", "h_GEOID") + } else if (lodes_type == "wac") { + join_by = c("year", "w_GEOID") + } + ## both all jobs and all federal jobs lodes_all_nonfederal_jobs = lodes_all_jobs %>% @@ -287,6 +362,7 @@ as NA.\n") } rename_lodes_variables() return(lodes_all_nonfederal_jobs) + } } utils::globalVariables(c( diff --git a/man/get_business_patterns.Rd b/man/get_business_patterns.Rd index 3c2f7a5..82b3e0c 100644 --- a/man/get_business_patterns.Rd +++ b/man/get_business_patterns.Rd @@ -7,14 +7,23 @@ get_business_patterns(year = 2022, naics_code_digits = 2, naics_codes = NULL) } \arguments{ -\item{year}{The vintage of CBP data desired. Data are available from 1986, though this function likely only supports more recent years (it it tested on 2022-vintage data only). Default is 2022.} +\item{year}{The vintage of CBP data desired. Data are available from 1986, +though this function likely only supports more recent years (it it tested on 2022-vintage data only). +Default is 2022.} -\item{naics_code_digits}{One of c(2, 3). Default is 2. NAICS codes range in specificity; 2-digit codes describe the highest groupings of industries, while six-digit codes are exceedingly detailed. There are 20 2-digit NAICS codes and 196 3-digit codes.} +\item{naics_code_digits}{One of c(2, 3). Default is 2. NAICS codes range in +specificity; 2-digit codes describe the highest groupings of industries, +while six-digit codes are exceedingly detailed. There are 20 2-digit NAICS +codes and 196 3-digit codes. If more specific codes are desired, leave this +argument as NULL and supply the desired codes as the argument to \code{naics_codes}.} -\item{naics_codes}{A vector of NAICS codes to query. If NULL, the function will query all available codes with the specified number of digits. If not NULL, this argument overrides the \code{naics_code_digits} argument.} +\item{naics_codes}{A vector of NAICS codes to query. If NULL, the function will +query all available codes with the specified number of digits. If not NULL, +this argument overrides the \code{naics_code_digits} argument.} } \value{ -A tibble with data on county-level employees, employers, and aggregate annual payrolls by industry and employer size +A tibble with data on county-level employees, employers, and aggregate +annual payrolls by industry and employer size } \description{ Obtain County Business Patterns (CBP) Estimates per County diff --git a/man/get_lodes.Rd b/man/get_lodes.Rd index a0427a8..990f96e 100644 --- a/man/get_lodes.Rd +++ b/man/get_lodes.Rd @@ -15,20 +15,32 @@ get_lodes( ) } \arguments{ -\item{lodes_type}{One of c("rac", "wac", "od"). "rac" = Residence Area Characteristics, where jobs are associated with employees' residences. "wac" = Workplace Area Characteristics, where jobs are associated with employees' workplaces. "od" = Origin-Destination data, where jobs are associated with both workers' residences and their workplaces.} +\item{lodes_type}{One of c("rac", "wac", "od"). "rac" = Residence Area +Characteristics, where jobs are associated with employees' residences. +"wac" = Workplace Area Characteristics, where jobs are associated with +employees' workplaces. "od" = Origin-Destination data, where jobs are associated +with both workers' residences and their workplaces.} -\item{jobs_type}{One of c("all", "primary"). Default is "all", which includes multiple jobs for workers with multiple jobs. "primary" includes only the highest-paying job per worker.} +\item{jobs_type}{One of c("all", "primary"). Default is "all", which includes +multiple jobs for workers with multiple jobs. "primary" includes only the +highest-paying job per worker.} \item{states}{A vector of state abbreviations.} \item{years}{A vector of years.} -\item{geography}{One of c("block", "block group", "tract", "county", "state"). Default is "tract".} +\item{geography}{One of c("block", "block group", "tract", "county", "state"). +Default is "tract".} -\item{state_part}{One of c("main", "aux"). Default is "main", which includes only workers who reside inside the state where they work. "aux" returns only workers who work in the specified state but live outside of that state.} +\item{state_part}{One of c("main", "aux"). Default is "main", which includes +only workers who reside inside the state where they work. "aux" returns +only workers who work in the specified state but live outside of that state.} } \value{ -A tibble with one record per geography per year per job type. Attributes include total jobs and jobs by worker earnings, industry, and demographics; the origin-destination results have more limited demographics compared to the "wac" and "rac" results. +A tibble with one record per geography per year per job type. Attributes +include total jobs and jobs by worker earnings, industry, and demographics; +the origin-destination results have more limited demographics compared to +the "wac" and "rac" results. } \description{ Get LEHD Origin-Destination Employment Statistics (LODES) data diff --git a/renv.lock b/renv.lock index ee3ab54..3cd59ed 100644 --- a/renv.lock +++ b/renv.lock @@ -1,6 +1,6 @@ { "R": { - "Version": "4.5.1", + "Version": "4.4.0", "Repositories": [ { "Name": "CRAN", @@ -24,8 +24,7 @@ "NeedsCompilation": "no", "Author": "Dirk Eddelbuettel [aut, cre] (), John W. Emerson [aut], Michael J. Kane [aut] ()", "Maintainer": "Dirk Eddelbuettel ", - "Repository": "RSPM", - "Encoding": "UTF-8" + "Repository": "CRAN" }, "DBI": { "Package": "DBI", @@ -99,7 +98,8 @@ "NeedsCompilation": "yes", "Author": "Matt Wand [aut], Cleve Moler [ctb] (LINPACK routines in src/d*), Brian Ripley [trl, cre, ctb] (R port and updates)", "Maintainer": "Brian Ripley ", - "Repository": "CRAN" + "Repository": "RSPM", + "Encoding": "UTF-8" }, "MASS": { "Package": "MASS", @@ -135,7 +135,8 @@ "NeedsCompilation": "yes", "Author": "Brian Ripley [aut, cre, cph], Bill Venables [aut, cph], Douglas M. Bates [ctb], Kurt Hornik [trl] (partial port ca 1998), Albrecht Gebhardt [trl] (partial port ca 1998), David Firth [ctb] (support functions for polr)", "Maintainer": "Brian Ripley ", - "Repository": "CRAN" + "Repository": "RSPM", + "Encoding": "UTF-8" }, "Matrix": { "Package": "Matrix", @@ -206,7 +207,7 @@ "NeedsCompilation": "no", "Author": "Winston Chang [aut, cre], Posit Software, PBC [cph, fnd]", "Maintainer": "Winston Chang ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "RColorBrewer": { "Package": "RColorBrewer", @@ -460,7 +461,7 @@ "NeedsCompilation": "yes", "Author": "Neal Richardson [aut], Ian Cook [aut], Nic Crane [aut], Dewey Dunnington [aut] (ORCID: ), Romain François [aut] (ORCID: ), Jonathan Keane [aut, cre], Dragoș Moldovan-Grünfeld [aut], Jeroen Ooms [aut], Jacob Wujciak-Jens [aut], Javier Luraschi [ctb], Karl Dunkle Werner [ctb] (ORCID: ), Jeffrey Wong [ctb], Apache Arrow [aut, cph]", "Maintainer": "Jonathan Keane ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "askpass": { "Package": "askpass", @@ -485,7 +486,7 @@ "NeedsCompilation": "yes", "Author": "Jeroen Ooms [aut, cre] ()", "Maintainer": "Jeroen Ooms ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "assertthat": { "Package": "assertthat", @@ -507,7 +508,7 @@ "NeedsCompilation": "no", "Author": "Hadley Wickham [aut, cre]", "Maintainer": "Hadley Wickham ", - "Repository": "RSPM", + "Repository": "https://packagemanager.posit.co/cran/latest", "Encoding": "UTF-8" }, "backports": { @@ -530,7 +531,7 @@ "Encoding": "UTF-8", "RoxygenNote": "7.3.1", "Author": "Michel Lang [cre, aut] (), Duncan Murdoch [aut], R Core Team [aut]", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "base64enc": { "Package": "base64enc", @@ -549,7 +550,8 @@ "License": "GPL-2 | GPL-3", "URL": "http://www.rforge.net/base64enc", "NeedsCompilation": "yes", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest", + "Encoding": "UTF-8" }, "bit": { "Package": "bit", @@ -647,7 +649,7 @@ "NeedsCompilation": "no", "Author": "Hadley Wickham [aut], Kirill Müller [cre], RStudio [cph, fnd]", "Maintainer": "Kirill Müller ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "brio": { "Package": "brio", @@ -794,7 +796,7 @@ "NeedsCompilation": "no", "Author": "David Robinson [aut], Alex Hayes [aut] (), Simon Couch [aut, cre] (), Posit Software, PBC [cph, fnd], Indrajeet Patil [ctb] (), Derek Chiu [ctb], Matthieu Gomez [ctb], Boris Demeshev [ctb], Dieter Menne [ctb], Benjamin Nutter [ctb], Luke Johnston [ctb], Ben Bolker [ctb], Francois Briatte [ctb], Jeffrey Arnold [ctb], Jonah Gabry [ctb], Luciano Selzer [ctb], Gavin Simpson [ctb], Jens Preussner [ctb], Jay Hesselberth [ctb], Hadley Wickham [ctb], Matthew Lincoln [ctb], Alessandro Gasparini [ctb], Lukasz Komsta [ctb], Frederick Novometsky [ctb], Wilson Freitas [ctb], Michelle Evans [ctb], Jason Cory Brunson [ctb], Simon Jackson [ctb], Ben Whalley [ctb], Karissa Whiting [ctb], Yves Rosseel [ctb], Michael Kuehn [ctb], Jorge Cimentada [ctb], Erle Holgersen [ctb], Karl Dunkle Werner [ctb] (), Ethan Christensen [ctb], Steven Pav [ctb], Paul PJ [ctb], Ben Schneider [ctb], Patrick Kennedy [ctb], Lily Medina [ctb], Brian Fannin [ctb], Jason Muhlenkamp [ctb], Matt Lehman [ctb], Bill Denney [ctb] (), Nic Crane [ctb], Andrew Bates [ctb], Vincent Arel-Bundock [ctb] (), Hideaki Hayashi [ctb], Luis Tobalina [ctb], Annie Wang [ctb], Wei Yang Tham [ctb], Clara Wang [ctb], Abby Smith [ctb] (), Jasper Cooper [ctb] (), E Auden Krauska [ctb] (), Alex Wang [ctb], Malcolm Barrett [ctb] (), Charles Gray [ctb] (), Jared Wilber [ctb], Vilmantas Gegzna [ctb] (), Eduard Szoecs [ctb], Frederik Aust [ctb] (), Angus Moore [ctb], Nick Williams [ctb], Marius Barth [ctb] (), Bruna Wundervald [ctb] (), Joyce Cahoon [ctb] (), Grant McDermott [ctb] (), Kevin Zarca [ctb], Shiro Kuriwaki [ctb] (), Lukas Wallrich [ctb] (), James Martherus [ctb] (), Chuliang Xiao [ctb] (), Joseph Larmarange [ctb], Max Kuhn [ctb], Michal Bojanowski [ctb], Hakon Malmedal [ctb], Clara Wang [ctb], Sergio Oller [ctb], Luke Sonnet [ctb], Jim Hester [ctb], Ben Schneider [ctb], Bernie Gray [ctb] (), Mara Averick [ctb], Aaron Jacobs [ctb], Andreas Bender [ctb], Sven Templer [ctb], Paul-Christian Buerkner [ctb], Matthew Kay [ctb], Erwan Le Pennec [ctb], Johan Junkka [ctb], Hao Zhu [ctb], Benjamin Soltoff [ctb], Zoe Wilkinson Saldana [ctb], Tyler Littlefield [ctb], Charles T. Gray [ctb], Shabbh E. Banks [ctb], Serina Robinson [ctb], Roger Bivand [ctb], Riinu Ots [ctb], Nicholas Williams [ctb], Nina Jakobsen [ctb], Michael Weylandt [ctb], Lisa Lendway [ctb], Karl Hailperin [ctb], Josue Rodriguez [ctb], Jenny Bryan [ctb], Chris Jarvis [ctb], Greg Macfarlane [ctb], Brian Mannakee [ctb], Drew Tyre [ctb], Shreyas Singh [ctb], Laurens Geffert [ctb], Hong Ooi [ctb], Henrik Bengtsson [ctb], Eduard Szocs [ctb], David Hugh-Jones [ctb], Matthieu Stigler [ctb], Hugo Tavares [ctb] (), R. Willem Vervoort [ctb], Brenton M. Wiernik [ctb], Josh Yamamoto [ctb], Jasme Lee [ctb], Taren Sanders [ctb] (), Ilaria Prosdocimi [ctb] (), Daniel D. Sjoberg [ctb] (), Alex Reinhart [ctb] ()", "Maintainer": "Simon Couch ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "bslib": { "Package": "bslib", @@ -879,7 +881,7 @@ "NeedsCompilation": "yes", "Author": "Winston Chang [aut, cre], Posit Software, PBC [cph, fnd]", "Maintainer": "Winston Chang ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "callr": { "Package": "callr", @@ -1048,7 +1050,8 @@ "NeedsCompilation": "yes", "Author": "Brian Ripley [aut, cre, cph], William Venables [cph]", "Maintainer": "Brian Ripley ", - "Repository": "CRAN" + "Repository": "RSPM", + "Encoding": "UTF-8" }, "classInt": { "Package": "classInt", @@ -1085,7 +1088,7 @@ "VignetteBuilder": "knitr", "Author": "Roger Bivand [aut, cre] (), Bill Denney [ctb] (), Richard Dunlap [ctb], Diego Hernangómez [ctb] (), Hisaji Ono [ctb], Josiah Parry [ctb] (), Matthieu Stigler [ctb] ()", "Maintainer": "Roger Bivand ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "cli": { "Package": "cli", @@ -1163,7 +1166,7 @@ "NeedsCompilation": "no", "Author": "Matthew Lincoln [aut, cre] (), Louis Maddox [ctb], Steve Simpson [ctb], Jennifer Bryan [ctb]", "Maintainer": "Matthew Lincoln ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "conflicted": { "Package": "conflicted", @@ -1200,7 +1203,7 @@ "NeedsCompilation": "no", "Author": "Hadley Wickham [aut, cre], RStudio [cph, fnd]", "Maintainer": "Hadley Wickham ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "coro": { "Package": "coro", @@ -1481,6 +1484,40 @@ "Author": "Gábor Csárdi [aut, cre], Kirill Müller [aut], Jim Hester [aut], Maëlle Salmon [ctb] (), Posit Software, PBC [cph, fnd]", "Repository": "CRAN" }, + "diffobj": { + "Package": "diffobj", + "Version": "0.3.6", + "Source": "Repository", + "Type": "Package", + "Title": "Diffs for R Objects", + "Description": "Generate a colorized diff of two R objects for an intuitive visualization of their differences.", + "Authors@R": "c( person( \"Brodie\", \"Gaslam\", email=\"brodie.gaslam@yahoo.com\", role=c(\"aut\", \"cre\")), person( \"Michael B.\", \"Allen\", email=\"ioplex@gmail.com\", role=c(\"ctb\", \"cph\"), comment=\"Original C implementation of Myers Diff Algorithm\"))", + "Depends": [ + "R (>= 3.1.0)" + ], + "License": "GPL-2 | GPL-3", + "URL": "https://github.com/brodieG/diffobj", + "BugReports": "https://github.com/brodieG/diffobj/issues", + "RoxygenNote": "7.2.3", + "VignetteBuilder": "knitr", + "Encoding": "UTF-8", + "Suggests": [ + "knitr", + "rmarkdown" + ], + "Collate": "'capt.R' 'options.R' 'pager.R' 'check.R' 'finalizer.R' 'misc.R' 'html.R' 'styles.R' 's4.R' 'core.R' 'diff.R' 'get.R' 'guides.R' 'hunks.R' 'layout.R' 'myerssimple.R' 'rdiff.R' 'rds.R' 'set.R' 'subset.R' 'summmary.R' 'system.R' 'text.R' 'tochar.R' 'trim.R' 'word.R'", + "Imports": [ + "crayon (>= 1.3.2)", + "tools", + "methods", + "utils", + "stats" + ], + "NeedsCompilation": "yes", + "Author": "Brodie Gaslam [aut, cre], Michael B. Allen [ctb, cph] (Original C implementation of Myers Diff Algorithm)", + "Maintainer": "Brodie Gaslam ", + "Repository": "CRAN" + }, "digest": { "Package": "digest", "Version": "0.6.37", @@ -1552,7 +1589,7 @@ "NeedsCompilation": "no", "Author": "Hadley Wickham [aut, cre], Posit Software, PBC [cph, fnd]", "Maintainer": "Hadley Wickham ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "CRAN" }, "dplyr": { "Package": "dplyr", @@ -1615,7 +1652,7 @@ "NeedsCompilation": "yes", "Author": "Hadley Wickham [aut, cre] (), Romain François [aut] (), Lionel Henry [aut], Kirill Müller [aut] (), Davis Vaughan [aut] (), Posit Software, PBC [cph, fnd]", "Maintainer": "Hadley Wickham ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "dtplyr": { "Package": "dtplyr", @@ -1693,7 +1730,7 @@ "NeedsCompilation": "yes", "Author": "David Meyer [aut, cre] (), Evgenia Dimitriadou [aut, cph], Kurt Hornik [aut] (), Andreas Weingessel [aut], Friedrich Leisch [aut], Chih-Chung Chang [ctb, cph] (libsvm C++-code), Chih-Chen Lin [ctb, cph] (libsvm C++-code)", "Maintainer": "David Meyer ", - "Repository": "https://packagemanager.posit.co/cran/latest", + "Repository": "RSPM", "Encoding": "UTF-8" }, "ellmer": { @@ -1829,7 +1866,7 @@ "NeedsCompilation": "no", "Author": "Hadley Wickham [aut, cre], Yihui Xie [aut] (ORCID: ), Michael Lawrence [ctb], Thomas Kluyver [ctb], Jeroen Ooms [ctb], Barret Schloerke [ctb], Adam Ryczkowski [ctb], Hiroaki Yutani [ctb], Michel Lang [ctb], Karolis Koncevičius [ctb], Posit Software, PBC [cph, fnd]", "Maintainer": "Hadley Wickham ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "extrafont": { "Package": "extrafont", @@ -1925,7 +1962,7 @@ "NeedsCompilation": "yes", "Author": "Thomas Lin Pedersen [cre, aut] (), Berendea Nicolae [aut] (Author of the ColorSpace C++ library), Romain François [aut] (), Posit, PBC [cph, fnd]", "Maintainer": "Thomas Lin Pedersen ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "fastmap": { "Package": "fastmap", @@ -1945,7 +1982,7 @@ "NeedsCompilation": "yes", "Author": "Winston Chang [aut, cre], Posit Software, PBC [cph, fnd], Tessil [cph] (hopscotch_map library)", "Maintainer": "Winston Chang ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "fontawesome": { "Package": "fontawesome", @@ -2523,7 +2560,7 @@ "NeedsCompilation": "yes", "Author": "Hadley Wickham [aut, cre], Evan Miller [aut, cph] (Author of included ReadStat code), Danny Smith [aut], Posit Software, PBC [cph, fnd]", "Maintainer": "Hadley Wickham ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "here": { "Package": "here", @@ -2561,7 +2598,7 @@ "NeedsCompilation": "no", "Author": "Kirill Müller [aut, cre] (), Jennifer Bryan [ctb] ()", "Maintainer": "Kirill Müller ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "highr": { "Package": "highr", @@ -2591,7 +2628,7 @@ "NeedsCompilation": "no", "Author": "Yihui Xie [aut, cre] (), Yixuan Qiu [aut], Christopher Gandrud [ctb], Qiang Li [ctb]", "Maintainer": "Yihui Xie ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "hipread": { "Package": "hipread", @@ -2628,7 +2665,7 @@ "NeedsCompilation": "yes", "Author": "Greg Freedman Ellis [aut], Derek Burk [aut, cre], Joe Grover [ctb], Mark Padgham [ctb], Hadley Wickham [ctb] (Code adapted from readr), Jim Hester [ctb] (Code adapted from readr), Romain Francois [ctb] (Code adapted from readr), R Core Team [ctb] (Code adapted from readr), RStudio [cph, fnd] (Code adapted from readr), Jukka Jylänki [ctb, cph] (Code adapted from readr), Mikkel Jørgensen [ctb, cph] (Code adapted from readr), University of Minnesota [cph]", "Maintainer": "Derek Burk ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "hms": { "Package": "hms", @@ -2663,7 +2700,7 @@ "NeedsCompilation": "no", "Author": "Kirill Müller [aut, cre] (), R Consortium [fnd], RStudio [fnd]", "Maintainer": "Kirill Müller ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "htmltools": { "Package": "htmltools", @@ -2706,7 +2743,7 @@ "NeedsCompilation": "yes", "Author": "Joe Cheng [aut], Carson Sievert [aut, cre] (), Barret Schloerke [aut] (), Winston Chang [aut] (), Yihui Xie [aut], Jeff Allen [aut], Posit Software, PBC [cph, fnd]", "Maintainer": "Carson Sievert ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "httr": { "Package": "httr", @@ -2804,7 +2841,7 @@ "NeedsCompilation": "no", "Author": "Hadley Wickham [aut, cre], Posit Software, PBC [cph, fnd], Maximilian Girlich [ctb]", "Maintainer": "Hadley Wickham ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "ids": { "Package": "ids", @@ -2893,7 +2930,7 @@ "NeedsCompilation": "no", "Author": "Greg Freedman Ellis [aut], Derek Burk [aut, cre], Finn Roberts [aut], Joe Grover [ctb], Dan Ehrlich [ctb], Renae Rodgers [ctb], Institute for Social Research and Data Innovation [cph]", "Maintainer": "Derek Burk ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "isoband": { "Package": "isoband", @@ -2929,7 +2966,7 @@ "NeedsCompilation": "yes", "Author": "Hadley Wickham [aut, cre] (), Claus O. Wilke [aut] (Original author, ), Thomas Lin Pedersen [aut] ()", "Maintainer": "Hadley Wickham ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "janitor": { "Package": "janitor", @@ -2997,7 +3034,7 @@ "NeedsCompilation": "no", "Author": "Carson Sievert [aut, cre] (), Joe Cheng [aut], RStudio [cph], jQuery Foundation [cph] (jQuery library and jQuery UI library), jQuery contributors [ctb, cph] (jQuery library; authors listed in inst/lib/jquery-AUTHORS.txt)", "Maintainer": "Carson Sievert ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "jsonlite": { "Package": "jsonlite", @@ -3110,7 +3147,8 @@ "stats", "graphics" ], - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest", + "Encoding": "UTF-8" }, "later": { "Package": "later", @@ -3182,7 +3220,8 @@ "NeedsCompilation": "yes", "Author": "Deepayan Sarkar [aut, cre] (), Felix Andrews [ctb], Kevin Wright [ctb] (documentation), Neil Klepeis [ctb], Johan Larsson [ctb] (miscellaneous improvements), Zhijian (Jason) Wen [cph] (filled contour code), Paul Murrell [ctb], Stefan Eng [ctb] (violin plot improvements), Achim Zeileis [ctb] (modern colors), Alexandre Courtiol [ctb] (generics for larrows, lpolygon, lrect and lsegments)", "Maintainer": "Deepayan Sarkar ", - "Repository": "CRAN" + "Repository": "RSPM", + "Encoding": "UTF-8" }, "lehdr": { "Package": "lehdr", @@ -3262,7 +3301,7 @@ "NeedsCompilation": "no", "Author": "Lionel Henry [aut, cre], Hadley Wickham [aut] (), Posit Software, PBC [cph, fnd]", "Maintainer": "Lionel Henry ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "lubridate": { "Package": "lubridate", @@ -3339,7 +3378,7 @@ "NeedsCompilation": "yes", "Author": "Stefan Milton Bache [aut, cph] (Original author and creator of magrittr), Hadley Wickham [aut], Lionel Henry [cre], RStudio [cph, fnd]", "Maintainer": "Lionel Henry ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "memoise": { "Package": "memoise", @@ -3369,7 +3408,7 @@ "NeedsCompilation": "no", "Author": "Hadley Wickham [aut], Jim Hester [aut], Winston Chang [aut, cre], Kirill Müller [aut], Daniel Cook [aut], Mark Edmondson [ctb]", "Maintainer": "Winston Chang ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "mgcv": { "Package": "mgcv", @@ -3402,7 +3441,8 @@ "NeedsCompilation": "yes", "Author": "Simon Wood [aut, cre]", "Maintainer": "Simon Wood ", - "Repository": "CRAN" + "Repository": "RSPM", + "Encoding": "UTF-8" }, "mime": { "Package": "mime", @@ -3529,7 +3569,7 @@ "NeedsCompilation": "yes", "Author": "Jeroen Ooms [aut, cre] (ORCID: ), Oliver Keyes [ctb]", "Maintainer": "Jeroen Ooms ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "openxlsx": { "Package": "openxlsx", @@ -3574,7 +3614,7 @@ "NeedsCompilation": "yes", "Author": "Philipp Schauberger [aut], Alexander Walker [aut], Luca Braglia [ctb], Joshua Sturm [ctb], Jan Marvin Garbuszus [ctb, cre], Jordan Mark Barbone [ctb] (), David Zimmermann [ctb], Reinhold Kainhofer [ctb]", "Maintainer": "Jan Marvin Garbuszus ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "CRAN" }, "pdftools": { "Package": "pdftools", @@ -3663,6 +3703,45 @@ "NeedsCompilation": "no", "Author": "Kirill Müller [aut, cre] (ORCID: ), Hadley Wickham [aut], RStudio [cph]", "Maintainer": "Kirill Müller ", + "Repository": "https://packagemanager.posit.co/cran/latest" + }, + "pkgbuild": { + "Package": "pkgbuild", + "Version": "1.4.8", + "Source": "Repository", + "Title": "Find Tools Needed to Build R Packages", + "Authors@R": "c( person(\"Hadley\", \"Wickham\", role = \"aut\"), person(\"Jim\", \"Hester\", role = \"aut\"), person(\"Gábor\", \"Csárdi\", , \"csardi.gabor@gmail.com\", role = c(\"aut\", \"cre\")), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\"), comment = c(ROR = \"03wc8by49\")) )", + "Description": "Provides functions used to build R packages. Locates compilers needed to build R packages on various platforms and ensures the PATH is configured appropriately so R can use them.", + "License": "MIT + file LICENSE", + "URL": "https://github.com/r-lib/pkgbuild, https://pkgbuild.r-lib.org", + "BugReports": "https://github.com/r-lib/pkgbuild/issues", + "Depends": [ + "R (>= 3.5)" + ], + "Imports": [ + "callr (>= 3.2.0)", + "cli (>= 3.4.0)", + "desc", + "processx", + "R6" + ], + "Suggests": [ + "covr", + "cpp11", + "knitr", + "Rcpp", + "rmarkdown", + "testthat (>= 3.2.0)", + "withr (>= 2.3.0)" + ], + "Config/Needs/website": "tidyverse/tidytemplate", + "Config/testthat/edition": "3", + "Config/usethis/last-upkeep": "2025-04-30", + "Encoding": "UTF-8", + "RoxygenNote": "7.3.2", + "NeedsCompilation": "no", + "Author": "Hadley Wickham [aut], Jim Hester [aut], Gábor Csárdi [aut, cre], Posit Software, PBC [cph, fnd] (ROR: )", + "Maintainer": "Gábor Csárdi ", "Repository": "CRAN" }, "pkgconfig": { @@ -3687,7 +3766,7 @@ "BugReports": "https://github.com/r-lib/pkgconfig/issues", "Encoding": "UTF-8", "NeedsCompilation": "no", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "pkgdown": { "Package": "pkgdown", @@ -3756,7 +3835,56 @@ "NeedsCompilation": "no", "Author": "Hadley Wickham [aut, cre] (ORCID: ), Jay Hesselberth [aut] (ORCID: ), Maëlle Salmon [aut] (ORCID: ), Olivier Roy [aut], Salim Brüggemann [aut] (ORCID: ), Posit Software, PBC [cph, fnd] (ROR: )", "Maintainer": "Hadley Wickham ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" + }, + "pkgload": { + "Package": "pkgload", + "Version": "1.4.1", + "Source": "Repository", + "Title": "Simulate Package Installation and Attach", + "Authors@R": "c( person(\"Hadley\", \"Wickham\", role = \"aut\"), person(\"Winston\", \"Chang\", role = \"aut\"), person(\"Jim\", \"Hester\", role = \"aut\"), person(\"Lionel\", \"Henry\", , \"lionel@posit.co\", role = c(\"aut\", \"cre\")), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\")), person(\"R Core team\", role = \"ctb\", comment = \"Some namespace and vignette code extracted from base R\") )", + "Description": "Simulates the process of installing a package and then attaching it. This is a key part of the 'devtools' package as it allows you to rapidly iterate while developing a package.", + "License": "MIT + file LICENSE", + "URL": "https://github.com/r-lib/pkgload, https://pkgload.r-lib.org", + "BugReports": "https://github.com/r-lib/pkgload/issues", + "Depends": [ + "R (>= 3.4.0)" + ], + "Imports": [ + "cli (>= 3.3.0)", + "desc", + "fs", + "glue", + "lifecycle", + "methods", + "pkgbuild", + "processx", + "rlang (>= 1.1.1)", + "rprojroot", + "utils" + ], + "Suggests": [ + "bitops", + "jsonlite", + "mathjaxr", + "pak", + "Rcpp", + "remotes", + "rstudioapi", + "testthat (>= 3.2.1.1)", + "usethis", + "withr" + ], + "Config/Needs/website": "tidyverse/tidytemplate, ggplot2", + "Config/testthat/edition": "3", + "Config/testthat/parallel": "TRUE", + "Config/testthat/start-first": "dll", + "Encoding": "UTF-8", + "RoxygenNote": "7.3.2", + "NeedsCompilation": "no", + "Author": "Hadley Wickham [aut], Winston Chang [aut], Jim Hester [aut], Lionel Henry [aut, cre], Posit Software, PBC [cph, fnd], R Core team [ctb] (Some namespace and vignette code extracted from base R)", + "Maintainer": "Lionel Henry ", + "Repository": "CRAN" }, "plogr": { "Package": "plogr", @@ -3778,7 +3906,7 @@ "NeedsCompilation": "no", "Author": "Kirill Müller [aut, cre], Sergey Podobry [cph] (Author of the bundled plog library)", "Maintainer": "Kirill Müller ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "plyr": { "Package": "plyr", @@ -3817,6 +3945,26 @@ "Maintainer": "Hadley Wickham ", "Repository": "https://packagemanager.posit.co/cran/latest" }, + "praise": { + "Package": "praise", + "Version": "1.0.0", + "Source": "Repository", + "Title": "Praise Users", + "Author": "Gabor Csardi, Sindre Sorhus", + "Maintainer": "Gabor Csardi ", + "Description": "Build friendly R packages that praise their users if they have done something good, or they just need it to feel better.", + "License": "MIT + file LICENSE", + "LazyData": "true", + "URL": "https://github.com/gaborcsardi/praise", + "BugReports": "https://github.com/gaborcsardi/praise/issues", + "Suggests": [ + "testthat" + ], + "Collate": "'adjective.R' 'adverb.R' 'exclamation.R' 'verb.R' 'rpackage.R' 'package.R'", + "NeedsCompilation": "no", + "Repository": "https://packagemanager.posit.co/cran/latest", + "Encoding": "UTF-8" + }, "prettyunits": { "Package": "prettyunits", "Version": "1.2.0", @@ -3840,7 +3988,7 @@ "NeedsCompilation": "no", "Author": "Gabor Csardi [aut, cre], Bill Denney [ctb] (), Christophe Regouby [ctb]", "Maintainer": "Gabor Csardi ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "processx": { "Package": "processx", @@ -3913,7 +4061,7 @@ "NeedsCompilation": "no", "Author": "Gábor Csárdi [aut, cre], Rich FitzJohn [aut], Posit Software, PBC [cph, fnd]", "Maintainer": "Gábor Csárdi ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "promises": { "Package": "promises", @@ -4102,7 +4250,7 @@ "NeedsCompilation": "yes", "Author": "Jeroen Ooms [aut, cre] (ORCID: ), Ben Raymond [ctb], Jay Berkenbilt [cph] (Author of libqpdf)", "Maintainer": "Jeroen Ooms ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "ragg": { "Package": "ragg", @@ -4138,7 +4286,7 @@ "Config/build/compilation-database": "true", "NeedsCompilation": "yes", "Author": "Thomas Lin Pedersen [cre, aut] (), Maxim Shemanarev [aut, cph] (Author of AGG), Tony Juricic [ctb, cph] (Contributor to AGG), Milan Marusinec [ctb, cph] (Contributor to AGG), Spencer Garrett [ctb] (Contributor to AGG), Posit, PBC [cph, fnd]", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "rappdirs": { "Package": "rappdirs", @@ -4167,7 +4315,7 @@ "NeedsCompilation": "yes", "Author": "Hadley Wickham [trl, cre, cph], RStudio [cph], Sridhar Ratnakumar [aut], Trent Mick [aut], ActiveState [cph] (R/appdir.r, R/cache.r, R/data.r, R/log.r translated from appdirs), Eddy Petrisor [ctb], Trevor Davis [trl, aut], Gabor Csardi [ctb], Gregory Jefferis [ctb]", "Maintainer": "Hadley Wickham ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "readr": { "Package": "readr", @@ -4223,7 +4371,7 @@ "NeedsCompilation": "yes", "Author": "Hadley Wickham [aut], Jim Hester [aut], Romain Francois [ctb], Jennifer Bryan [aut, cre] (), Shelby Bearrows [ctb], Posit Software, PBC [cph, fnd], https://github.com/mandreyel/ [cph] (mio library), Jukka Jylänki [ctb, cph] (grisu3 implementation), Mikkel Jørgensen [ctb, cph] (grisu3 implementation)", "Maintainer": "Jennifer Bryan ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "readxl": { "Package": "readxl", @@ -4263,7 +4411,7 @@ "NeedsCompilation": "yes", "Author": "Hadley Wickham [aut] (), Jennifer Bryan [aut, cre] (), Posit, PBC [cph, fnd] (Copyright holder of all R code and all C/C++ code without explicit copyright attribution), Marcin Kalicinski [ctb, cph] (Author of included RapidXML code), Komarov Valery [ctb, cph] (Author of included libxls code), Christophe Leitienne [ctb, cph] (Author of included libxls code), Bob Colbert [ctb, cph] (Author of included libxls code), David Hoerl [ctb, cph] (Author of included libxls code), Evan Miller [ctb, cph] (Author of included libxls code)", "Maintainer": "Jennifer Bryan ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "rematch": { "Package": "rematch", @@ -4363,6 +4511,52 @@ "Maintainer": "Kevin Ushey ", "Repository": "CRAN" }, + "repr": { + "Package": "repr", + "Version": "1.1.7", + "Source": "Repository", + "Title": "Serializable Representations", + "Authors@R": "c( person('Philipp', 'Angerer', email = 'phil.angerer@gmail.com', role = c('aut', 'cre'), comment = c(ORCID = \"0000-0002-0369-2888\")), person('Thomas', 'Kluyver', email = 'thomas@kluyver.me.uk', role = 'aut'), person('Jan', 'Schulz', email = 'jasc@gmx.net', role = 'aut'), person('abielr', role = 'ctb'), person('Denilson', 'Figueiredo de Sa', role = 'ctb'), person('Jim', 'Hester', role = 'ctb'), person('karldw', role = 'ctb'), person('Dave', 'Foster', role = 'ctb'), person('Carson', 'Sievert', role = 'ctb') )", + "Maintainer": "Philipp Angerer ", + "Description": "String and binary representations of objects for several formats / mime types.", + "URL": "https://github.com/IRkernel/repr/", + "BugReports": "https://github.com/IRkernel/repr/issues/", + "Depends": [ + "R (>= 3.0.1)" + ], + "Imports": [ + "utils", + "grDevices", + "htmltools", + "jsonlite", + "pillar (>= 1.4.0)", + "base64enc" + ], + "Suggests": [ + "methods", + "highr", + "Cairo", + "stringr", + "testthat (>= 3.0.0)", + "leaflet" + ], + "Enhances": [ + "data.table", + "tibble", + "htmlwidgets", + "vegalite", + "plotly", + "geojsonio" + ], + "Config/testthat/edition": "3", + "License": "GPL (>= 3)", + "Encoding": "UTF-8", + "Collate": "'generics.r' 'options.r' 'package.r' 'repr_datatable.r' 'repr_datetime.r' 'utils.r' 'repr_list.r' 'repr_vector.r' 'repr_factor.r' 'repr_function.r' 'repr_help_files_with_topic.r' 'repr_htmlwidget.r' 'repr_matrix_df.r' 'repr_packageIQR.r' 'repr_plotly.r' 'repr_recordedplot.r' 'repr_spatial.r' 'repr_ts.r' 'repr_vega.r' 'zzz_onload.r'", + "RoxygenNote": "7.3.1", + "NeedsCompilation": "no", + "Author": "Philipp Angerer [aut, cre] (), Thomas Kluyver [aut], Jan Schulz [aut], abielr [ctb], Denilson Figueiredo de Sa [ctb], Jim Hester [ctb], karldw [ctb], Dave Foster [ctb], Carson Sievert [ctb]", + "Repository": "https://packagemanager.posit.co/cran/latest" + }, "reprex": { "Package": "reprex", "Version": "2.1.1", @@ -4413,7 +4607,7 @@ "NeedsCompilation": "no", "Author": "Jennifer Bryan [aut, cre] (), Jim Hester [aut] (), David Robinson [aut], Hadley Wickham [aut] (), Christophe Dervieux [aut] (), Posit Software, PBC [cph, fnd]", "Maintainer": "Jennifer Bryan ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "CRAN" }, "rfema": { "Package": "rfema", @@ -4446,7 +4640,7 @@ "VignetteBuilder": "knitr", "URL": "https://github.com/dylan-turner25/rfema", "BugReports": "https://github.com/dylan-turner25/rfema/issues", - "Author": "Dylan Turner [aut, cre] (ORCID: ), François Michonneau [rev, ctb] (reviewed the package for rOpenSci and patched several bugs in the prelease code, see https://github.com/ropensci/software-review/issues/484.), Marcus Beck [rev, ctb] (reviewed the package for rOpenSci, see https://github.com/ropensci/software-review/issues/484.)", + "Author": "Dylan Turner [aut, cre] (), François Michonneau [rev, ctb] (reviewed the package for rOpenSci and patched several bugs in the prelease code, see https://github.com/ropensci/software-review/issues/484.), Marcus Beck [rev, ctb] (reviewed the package for rOpenSci, see https://github.com/ropensci/software-review/issues/484.)", "Maintainer": "Dylan Turner ", "RemoteType": "github", "RemoteHost": "api.github.com", @@ -4619,7 +4813,7 @@ "Encoding": "UTF-8", "NeedsCompilation": "no", "Author": "Kevin Ushey [aut, cre], JJ Allaire [aut], Hadley Wickham [aut], Gary Ritchie [aut], RStudio [cph]", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "rvest": { "Package": "rvest", @@ -4668,7 +4862,7 @@ "NeedsCompilation": "no", "Author": "Hadley Wickham [aut, cre], Posit Software, PBC [cph, fnd]", "Maintainer": "Hadley Wickham ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "s2": { "Package": "s2", @@ -4704,7 +4898,7 @@ "NeedsCompilation": "yes", "Author": "Dewey Dunnington [aut] (ORCID: ), Edzer Pebesma [aut, cre] (ORCID: ), Ege Rubak [aut], Jeroen Ooms [ctb] (configure script), Google, Inc. [cph] (Original s2geometry.io source code)", "Maintainer": "Edzer Pebesma ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "sass": { "Package": "sass", @@ -4862,7 +5056,8 @@ "NeedsCompilation": "no", "Author": "Simon Potter [aut, trl, cre], Simon Sapin [aut], Ian Bicking [aut]", "Maintainer": "Simon Potter ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest", + "Encoding": "UTF-8" }, "sf": { "Package": "sf", @@ -4942,7 +5137,56 @@ "NeedsCompilation": "yes", "Author": "Edzer Pebesma [aut, cre] (ORCID: ), Roger Bivand [ctb] (ORCID: ), Etienne Racine [ctb], Michael Sumner [ctb], Ian Cook [ctb], Tim Keitt [ctb], Robin Lovelace [ctb], Hadley Wickham [ctb], Jeroen Ooms [ctb] (ORCID: ), Kirill Müller [ctb], Thomas Lin Pedersen [ctb], Dan Baston [ctb], Dewey Dunnington [ctb] (ORCID: )", "Maintainer": "Edzer Pebesma ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" + }, + "skimr": { + "Package": "skimr", + "Version": "2.2.2", + "Source": "Repository", + "Title": "Compact and Flexible Summaries of Data", + "Authors@R": "c(person(given = \"Elin\", family = \"Waring\", role = c(\"cre\", \"aut\"), email = \"elin.waring@gmail.com\"), person(given = \"Michael\", family = \"Quinn\", role = \"aut\", email = \"msquinn@google.com\"), person(given = \"Amelia\", family = \"McNamara\", role = \"aut\", email = \"amcnamara@smith.edu\"), person(given = \"Eduardo\", family = \"Arino de la Rubia\", role = \"aut\", email = \"earino@gmail.com\"), person(given = \"Hao\", family = \"Zhu\", role = \"aut\", email = \"haozhu233@gmail.com\"), person(given = \"Julia\", family = \"Lowndes\", role = \"ctb\", email = \"lowndes@nceas.ucsb.edu\"), person(given = \"Shannon\", family = \"Ellis\", role = \"aut\", email = \"sellis18@jhmi.edu\"), person(given = \"Hope\", family = \"McLeod\", role = \"ctb\", email = \"hmgit2@gmail.com\"), person(given = \"Hadley\", family = \"Wickham\", role = \"ctb\", email = \"hadley@rstudio.com\"), person(given = \"Kirill\", family = \"Müller\", role = \"ctb\", email = \"krlmlr+r@mailbox.org\"), person(family = \"RStudio, Inc.\", role = \"cph\", comment = \"Spark functions\"), person(given = \"Connor\", family = \"Kirkpatrick\", role = \"ctb\", email = \"hello@connorkirkpatrick.com\"), person(given = \"Scott\", family = \"Brenstuhl\", role = \"ctb\", email = \"brenstsr@miamioh.edu\"), person(given = \"Patrick\", family = \"Schratz\", role = \"ctb\", email = \"patrick.schratz@gmail.com\"), person(given = \"lbusett\", role = \"ctb\", email = \"lbusett@gmail.com\"), person(given = \"Mikko\", family = \"Korpela\", role = \"ctb\", email = \"mvkorpel@iki.fi\"), person(given = \"Jennifer\", family = \"Thompson\", role = \"ctb\", email = \"thompson.jennifer@gmail.com\"), person(given = \"Harris\", family = \"McGehee\", role = \"ctb\", email = \"mcgehee.harris@gmail.com\"), person(given = \"Mark\", family = \"Roepke\", role = \"ctb\", email = \"mroepke5@gmail.com\"), person(given = \"Patrick\", family = \"Kennedy\", role = \"ctb\", email = \"pkqstr@protonmail.com\"), person(given = \"Daniel\", family = \"Possenriede\", role = \"ctb\", email = \"possenriede@gmail.com\"), person(given = \"David\", family = \"Zimmermann\", role = \"ctb\", email = \"david_j_zimmermann@hotmail.com\"), person(given = \"Kyle\", family = \"Butts\", role =\"ctb\", email = \"buttskyle96@gmail.com\"), person(given = \"Bastian\", family = \"Torges\", role =\"ctb\", email = \"bastian.torges@gmail.com\"), person(given = \"Rick\", family = \"Saporta\", role = \"ctb\", email = \"Rick@TheFarmersDog.com\"), person(given = \"Henry\", family = \"Morgan Stewart\", role = \"ctb\", email = \"henry.morganstewart@gmail.com\"), person(given = \"Olivier\", family = \"Roy\", role = \"ctb\") )", + "Description": "A simple to use summary function that can be used with pipes and displays nicely in the console. The default summary statistics may be modified by the user as can the default formatting. Support for data frames and vectors is included, and users can implement their own skim methods for specific object types as described in a vignette. Default summaries include support for inline spark graphs. Instructions for managing these on specific operating systems are given in the \"Using skimr\" vignette and the README.", + "License": "GPL-3", + "URL": "https://docs.ropensci.org/skimr/, https://github.com/ropensci/skimr/", + "BugReports": "https://github.com/ropensci/skimr/issues", + "Depends": [ + "R (>= 4.1.0)" + ], + "Imports": [ + "cli", + "dplyr (>= 1.0.0)", + "knitr (>= 1.2)", + "pillar (>= 1.6.4)", + "purrr", + "repr", + "rlang", + "stats", + "stringr (>= 1.1)", + "tibble (>= 2.0.0)", + "tidyr (>= 1.0)", + "tidyselect (>= 1.0.0)", + "utils", + "vctrs (>= 0.5.0)" + ], + "Suggests": [ + "data.table", + "dtplyr", + "extrafont", + "haven", + "lubridate", + "rmarkdown", + "testthat (>= 3.0.0)", + "withr" + ], + "VignetteBuilder": "knitr", + "Encoding": "UTF-8", + "RoxygenNote": "7.3.3", + "Collate": "'deprecated.R' 'dplyr.R' 'stats.R' 'skim_with.R' 'get_skimmers.R' 'package.R' 'reshape.R' 'sfl.R' 'skim.R' 'skim_obj.R' 'skim_print.R' 'skimr-package.R' 'summary.R' 'utils.R' 'vctrs.R'", + "Config/testthat/edition": "3", + "NeedsCompilation": "no", + "Author": "Elin Waring [cre, aut], Michael Quinn [aut], Amelia McNamara [aut], Eduardo Arino de la Rubia [aut], Hao Zhu [aut], Julia Lowndes [ctb], Shannon Ellis [aut], Hope McLeod [ctb], Hadley Wickham [ctb], Kirill Müller [ctb], RStudio, Inc. [cph] (Spark functions), Connor Kirkpatrick [ctb], Scott Brenstuhl [ctb], Patrick Schratz [ctb], lbusett [ctb], Mikko Korpela [ctb], Jennifer Thompson [ctb], Harris McGehee [ctb], Mark Roepke [ctb], Patrick Kennedy [ctb], Daniel Possenriede [ctb], David Zimmermann [ctb], Kyle Butts [ctb], Bastian Torges [ctb], Rick Saporta [ctb], Henry Morgan Stewart [ctb], Olivier Roy [ctb]", + "Maintainer": "Elin Waring ", + "Repository": "CRAN" }, "snakecase": { "Package": "snakecase", @@ -5007,7 +5251,7 @@ "Author": "Marek Gagolewski [aut, cre, cph] (), Bartek Tartanus [ctb], Unicode, Inc. and others [ctb] (ICU4C source code, Unicode Character Database)", "Maintainer": "Marek Gagolewski ", "License_is_FOSS": "yes", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "stringr": { "Package": "stringr", @@ -5075,7 +5319,7 @@ "NeedsCompilation": "yes", "Author": "Jeroen Ooms [aut, cre] (), Gábor Csárdi [ctb]", "Maintainer": "Jeroen Ooms ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "systemfonts": { "Package": "systemfonts", @@ -5122,6 +5366,66 @@ "Maintainer": "Thomas Lin Pedersen ", "Repository": "CRAN" }, + "testthat": { + "Package": "testthat", + "Version": "3.3.1", + "Source": "Repository", + "Title": "Unit Testing for R", + "Authors@R": "c( person(\"Hadley\", \"Wickham\", , \"hadley@posit.co\", role = c(\"aut\", \"cre\")), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\")), person(\"R Core team\", role = \"ctb\", comment = \"Implementation of utils::recover()\") )", + "Description": "Software testing is important, but, in part because it is frustrating and boring, many of us avoid it. 'testthat' is a testing framework for R that is easy to learn and use, and integrates with your existing 'workflow'.", + "License": "MIT + file LICENSE", + "URL": "https://testthat.r-lib.org, https://github.com/r-lib/testthat", + "BugReports": "https://github.com/r-lib/testthat/issues", + "Depends": [ + "R (>= 4.1.0)" + ], + "Imports": [ + "brio (>= 1.1.5)", + "callr (>= 3.7.6)", + "cli (>= 3.6.5)", + "desc (>= 1.4.3)", + "evaluate (>= 1.0.4)", + "jsonlite (>= 2.0.0)", + "lifecycle (>= 1.0.4)", + "magrittr (>= 2.0.3)", + "methods", + "pkgload (>= 1.4.0)", + "praise (>= 1.0.0)", + "processx (>= 3.8.6)", + "ps (>= 1.9.1)", + "R6 (>= 2.6.1)", + "rlang (>= 1.1.6)", + "utils", + "waldo (>= 0.6.2)", + "withr (>= 3.0.2)" + ], + "Suggests": [ + "covr", + "curl (>= 0.9.5)", + "diffviewer (>= 0.1.0)", + "digest (>= 0.6.33)", + "gh", + "knitr", + "rmarkdown", + "rstudioapi", + "S7", + "shiny", + "usethis", + "vctrs (>= 0.1.0)", + "xml2" + ], + "VignetteBuilder": "knitr", + "Config/Needs/website": "tidyverse/tidytemplate", + "Config/testthat/edition": "3", + "Config/testthat/parallel": "true", + "Config/testthat/start-first": "watcher, parallel*", + "Encoding": "UTF-8", + "RoxygenNote": "7.3.3", + "NeedsCompilation": "yes", + "Author": "Hadley Wickham [aut, cre], Posit Software, PBC [cph, fnd], R Core team [ctb] (Implementation of utils::recover())", + "Maintainer": "Hadley Wickham ", + "Repository": "CRAN" + }, "textshaping": { "Package": "textshaping", "Version": "1.0.1", @@ -5164,7 +5468,7 @@ "NeedsCompilation": "yes", "Author": "Thomas Lin Pedersen [cre, aut] (ORCID: ), Posit Software, PBC [cph, fnd] (ROR: )", "Maintainer": "Thomas Lin Pedersen ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "tibble": { "Package": "tibble", @@ -5369,7 +5673,7 @@ "NeedsCompilation": "yes", "Author": "Lionel Henry [aut, cre], Hadley Wickham [aut], Posit Software, PBC [cph, fnd]", "Maintainer": "Lionel Henry ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "tidytable": { "Package": "tidytable", @@ -5404,7 +5708,7 @@ "NeedsCompilation": "no", "Author": "Mark Fairbanks [aut, cre], Abdessabour Moutik [ctb], Matt Carlson [ctb], Ivan Leung [ctb], Ross Kennedy [ctb], Robert On [ctb], Alexander Sevostianov [ctb], Koen ter Berg [ctb]", "Maintainer": "Mark Fairbanks ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "tidyverse": { "Package": "tidyverse", @@ -5539,7 +5843,7 @@ "NeedsCompilation": "yes", "Author": "Vitalie Spinu [aut, cre], Google Inc. [ctb, cph]", "Maintainer": "Vitalie Spinu ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "tinytex": { "Package": "tinytex", @@ -5638,7 +5942,7 @@ "NeedsCompilation": "yes", "Author": "Edzer Pebesma [aut, cre] (), Thomas Mailund [aut], Tomasz Kalinowski [aut], James Hiebert [ctb], Iñaki Ucar [aut] (), Thomas Lin Pedersen [ctb]", "Maintainer": "Edzer Pebesma ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "urbnindicators": { "Package": "urbnindicators", @@ -5834,7 +6138,7 @@ "NeedsCompilation": "yes", "Author": "Hadley Wickham [aut], Lionel Henry [aut], Davis Vaughan [aut, cre], data.table team [cph] (Radix sort based on data.table's forder() and their contribution to R's order()), Posit Software, PBC [cph, fnd]", "Maintainer": "Davis Vaughan ", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "viridisLite": { "Package": "viridisLite", @@ -5862,7 +6166,7 @@ "RoxygenNote": "7.2.3", "NeedsCompilation": "no", "Author": "Simon Garnier [aut, cre], Noam Ross [ctb, cph], Bob Rudis [ctb, cph], Marco Sciaini [ctb, cph], Antônio Pedro Camargo [ctb, cph], Cédric Scherer [ctb, cph]", - "Repository": "CRAN" + "Repository": "https://packagemanager.posit.co/cran/latest" }, "vroom": { "Package": "vroom", @@ -5932,6 +6236,43 @@ "NeedsCompilation": "yes", "Author": "Jim Hester [aut] (), Hadley Wickham [aut] (), Jennifer Bryan [aut, cre] (), Shelby Bearrows [ctb], https://github.com/mandreyel/ [cph] (mio library), Jukka Jylänki [cph] (grisu3 implementation), Mikkel Jørgensen [cph] (grisu3 implementation), Posit Software, PBC [cph, fnd]", "Maintainer": "Jennifer Bryan ", + "Repository": "https://packagemanager.posit.co/cran/latest" + }, + "waldo": { + "Package": "waldo", + "Version": "0.6.2", + "Source": "Repository", + "Title": "Find Differences Between R Objects", + "Authors@R": "c( person(\"Hadley\", \"Wickham\", , \"hadley@posit.co\", role = c(\"aut\", \"cre\")), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\")) )", + "Description": "Compare complex R objects and reveal the key differences. Designed particularly for use in testing packages where being able to quickly isolate key differences makes understanding test failures much easier.", + "License": "MIT + file LICENSE", + "URL": "https://waldo.r-lib.org, https://github.com/r-lib/waldo", + "BugReports": "https://github.com/r-lib/waldo/issues", + "Depends": [ + "R (>= 4.0)" + ], + "Imports": [ + "cli", + "diffobj (>= 0.3.4)", + "glue", + "methods", + "rlang (>= 1.1.0)" + ], + "Suggests": [ + "bit64", + "R6", + "S7", + "testthat (>= 3.0.0)", + "withr", + "xml2" + ], + "Config/Needs/website": "tidyverse/tidytemplate", + "Config/testthat/edition": "3", + "Encoding": "UTF-8", + "RoxygenNote": "7.3.2", + "NeedsCompilation": "no", + "Author": "Hadley Wickham [aut, cre], Posit Software, PBC [cph, fnd]", + "Maintainer": "Hadley Wickham ", "Repository": "CRAN" }, "whisker": { @@ -6019,7 +6360,7 @@ "LazyData": "true", "NeedsCompilation": "yes", "Author": "Dewey Dunnington [aut, cre] (), Edzer Pebesma [aut] (), Anthony North [ctb]", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "xfun": { "Package": "xfun", @@ -6155,7 +6496,7 @@ "NeedsCompilation": "no", "Author": "Nathan Teetor [aut, cre], Paul Teetor [ctb]", "Maintainer": "Nathan Teetor ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" }, "zip": { "Package": "zip", @@ -6183,7 +6524,7 @@ "NeedsCompilation": "yes", "Author": "Gábor Csárdi [aut, cre], Kuba Podgórski [ctb], Rich Geldreich [ctb], Posit Software, PBC [cph, fnd] (ROR: )", "Maintainer": "Gábor Csárdi ", - "Repository": "https://packagemanager.posit.co/cran/latest" + "Repository": "RSPM" } } } diff --git a/tests/testthat.R b/tests/testthat.R new file mode 100644 index 0000000..0fb3335 --- /dev/null +++ b/tests/testthat.R @@ -0,0 +1,12 @@ +# This file is part of the standard setup for testthat. +# It is recommended that you do not modify it. +# +# Where should you do additional test configuration? +# Learn more about the roles of various files in: +# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview +# * https://testthat.r-lib.org/articles/special-files.html + +library(testthat) +library(climateapi) + +test_check("climateapi") diff --git a/tests/testthat/test-get_business_patterns.R b/tests/testthat/test-get_business_patterns.R new file mode 100644 index 0000000..d69ffb0 --- /dev/null +++ b/tests/testthat/test-get_business_patterns.R @@ -0,0 +1,41 @@ + + +testthat::test_that("naics_code_digits errors clearly when not in c(2,3)", { + testthat::expect_error({get_business_patterns(year = 2022, naics_code_digits = 4)}) +}) + + +testthat::test_that("year errors clearly when year is outside accceptable range", { + testthat::expect_error({get_business_patterns(year = 2025, naics_code_digits = 3)}) +}) + +testthat::test_that("year errors clearly when year is outside accceptable range", { + testthat::expect_error({get_business_patterns(year = 1970, naics_code_digits = 3)}) +}) + + +testthat::test_that("geo errors clearly when geo is not 'county' or 'zipcode'", { + testthat::expect_error({get_business_patterns(geo = "tract", naics_code_digits = 3)}) +}) + + + + +testthat::test_that("employees has no negative values", { + test <- get_business_patterns(geo = "county", naics_code_digits = 2) + + # Ensure the column exists + testthat::expect_true( + "employees" %in% names(test), + info = "`employees` column is missing in the returned data." + ) + + # Assert no negative values (ignore NAs) + testthat::expect_true( + all(test$employees[!is.na(test$employees)] >= 0), + info = "Found negative values in `employees`." + ) +}) + + + diff --git a/tests/testthat/test-get_lodes.R b/tests/testthat/test-get_lodes.R new file mode 100644 index 0000000..7c15a5f --- /dev/null +++ b/tests/testthat/test-get_lodes.R @@ -0,0 +1,56 @@ +testthat::test_that("states clearly errors when invalid state abbreviation is supplied", { + + testthat::expect_error({get_lodes(lodes_type = "wac", year = 2022, states = "AB")}) + + testthat::expect_error({get_lodes(lodes_type = "rac", year = 2022, states = "AB")}) + + testthat::expect_error({get_lodes(lodes_type = "od", year = 2022, states = c("AL", "AM"))}) + + +}) + + +testthat::test_that("warning generated when missing state and year combination is supplied", { + + testthat::expect_warning({get_lodes(lodes_type = "od", year = 2022, states = c("AK", "MN"))}) + + testthat::expect_warning({get_lodes(lodes_type = "wac", year = 2009, states = c("DC", "MN"))}) + + +}) + + +testthat::test_that("error generated when invalid lodes_type is supplied", { + + testthat::expect_error({get_lodes(lodes_type = "dc", year = 2022, states = c("AK", "MN"))}) + + testthat::expect_error({get_lodes(lodes_type = "mac", year = 2009, states = c("DC", "MN"))}) + + +}) + + + +testthat::test_that("variables have no negative values", { + test <- get_lodes(lodes_type = "wac", year = 2022, states = "all") + + # Select numeric columns + num_df <- dplyr::select(test, where(is.numeric)) + + # Identify if any numeric columns have any negative values (ignoring NAs) + neg_cols <- num_df %>% + summarise(across(everything(), ~ any(.x < 0, na.rm = TRUE))) %>% + tidyr::pivot_longer(everything(), names_to = "col", values_to = "has_neg") %>% + filter(has_neg) %>% + pull(col) + + # Expect no negatives anywhere; if present, list the columns + testthat::expect_true( + length(neg_cols) == 0, + info = if (length(neg_cols) > 0) + sprintf("Negative values found in: %s", paste(bad_cols, collapse = ", ")) + else + NULL + ) + +})