Skip to content

Commit

Permalink
bump version, add explicit typing for Household Pulse Survey endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
hrecht committed Feb 21, 2024
1 parent 55f702e commit 8b04b01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: censusapi
Version: 0.8.0
Version: 0.9.9000
Title: Retrieve Data from the Census APIs
Authors@R: person("Hannah", "Recht", email = "[email protected]", role = c("aut", "cre"))
Description: A wrapper for the U.S. Census Bureau APIs that returns data frames of
Expand Down
5 changes: 5 additions & 0 deletions R/getcensus_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ getFunction <- function(apiurl, name, key, get, region, regionin, time, year, da
string_col_parts <- paste0(string_col_parts, "|UNIT_QY|_FLAG")
string_cols <- grep(string_col_parts, numeric_cols, value = TRUE, ignore.case = T)

# Household Pulse Survey
} else if (name == "timeseries/hps") {
numeric_cols <- grep("_RATE|_TOTAL|_UNIV|_MOE|WEEK", names(df), value=TRUE, ignore.case = T)
string_cols <- grep(string_col_parts, numeric_cols, value = TRUE, ignore.case = T)

# Microdata weighting variables
} else if (grepl("cps/", name, ignore.case = T) |
name %in% c("acs/acs5/pums", "acs/acs5/pumspr", "acs/acs1/pums", "acs/acs1/pumspr")) {
Expand Down

0 comments on commit 8b04b01

Please sign in to comment.