Skip to content

Releases: hrecht/censusapi

censusapi v0.9.0

06 Mar 13:07
Compare
Choose a tag to compare

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 requires key, 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. Use convert_variables = FALSE to leave all columns as characters.

Metadata

  • listCensusApis() now has optional name and vintage parameters 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.

censusapi v0.7.0

10 Sep 13:34
Compare
Choose a tag to compare
  • Adds show_call option to getCensus(), which shows the underlying API call (otherwise only shown on errors) and link to package documentation when used.
  • Converts improperly formatted string “N/A” and “NULL” values from underlying Census data to true NA values.
  • Improves parsing of columns as numeric or character, specifically:
    • Keeps 2017 NAICS variables as characters, instead of erroneously converting to numeric.
    • Parses endpoint numeric variables with all-character variable names as numeric for several popular endpoints: SAHIE, SAIPE, ZBP, CBP, PEP and Decennial Response Rates.
  • Removes examples from deprecated 1990 and 2000 Decennial endpoints.

censusapi v0.6.0

14 Apr 20:14
Compare
Choose a tag to compare
  • Allows the use of miscellaneous paramaters in getCensus(). This allows users to specify any valid API argument name and pass it a value, giving full access to all of the underlying Census Bureau APIs.
  • Adds a group parameter in listCensusMetadata(). This allows users to get variable metadata for a specified variable group.
  • Improves internal logic in listCensusMetadata().
  • Add documentation and examples using miscellaneous paramaters.
  • Returns underlying API call in error messages, particularly useful for users needing from the Census Bureau.
  • Specifies tract in block group example due to underlying API changes.
  • Adds Contributor Code of Conduct.

censusapi v0.3.0

03 May 13:15
Compare
Choose a tag to compare
  • Does not convert ACS annotation flag variables into numeric columns.
  • Puts lowercase variable name columns first (geographies), rather than all non-numeric columns.
  • Changes all punctuation in returned column names into underscores, removing repeated underscores and trailing punctuation.
  • Uses consistent spacing in examples.
  • Updates examples using ACS data to latest year using new acs/acs5 endpoint and adds variable group examples.

censusapi 0.2

14 Jun 16:02
Compare
Choose a tag to compare