censusapi v0.9.0
CRAN release: 2025-03-05
Breaking changes
- Increases required version of R from >=3.0 to >=3.5 (released in 2018) based on httr dependency.
New features
API keys
getCensus()no longer requireskey, the use of a Census Bureau API key. Users are still encouraged to register for and use an API key because the Census Bureau may rate limit IP addresses, but it is not required. (#87)- New
get_api_key()helper function retrieves the value of a user's stored Census Bureau API key from a saved environment variable or provides a warning message if none is found. - New
has_api_key()helper function detects if there is a stored Census Bureau API key in the Renviron, intended mainly for internal use.
Variable typing
getCensus()uses improved logic to automatically convert columns that contain all numbers to numeric, unless the column name is in a specific list of geography names or other string type columns. Useconvert_variables = FALSEto leave all columns as characters.
Metadata
listCensusApis()now has optionalnameandvintageparameters to get metadata for a subset of datasets or a single dataset. (#103)
# Get metadata for all 2020 Decennial Census datasets
apis_decennial_2020 <- listCensusApis(name = "dec", vintage = 2020)
# Get metadata for all timeseries datasets
apis_timeseries <- listCensusApis(name = "timeseries")Documentation
- Function documentation is improved and better formatted.
- Examples are updated to use newly released datasets.
- A new online frequently asked questions article improves documentation.
- A new vignette included in the package build directs users to the website to read web-only articles.