← Back to all sparks
C

censusapi

DEVOPS
Velocity0.0

Retrieve Data from the Census APIs

censusapi made API keys optional in 2025, then the Census Bureau made them mandatory.

census-dataapi-clientapi-keysopen-dataus-governmentr-package
Current state
censusapi is a general client for the US Census Bureau's APIs, letting users query any endpoint rather than a curated subset. Its release history is sparse — six entries spanning 2017 to 2026 — and driven almost entirely by upstream change. The May 2026 release exists because the Bureau began requiring an API key for both data and metadata retrieval, which reverses the headline feature of the previous release fourteen months earlier.
Where it's heading
The package's direction is set by the Census Bureau, not its maintainer. The 0.9.0 release invested in making keys optional and added helper functions for detecting and retrieving stored keys; 0.10.0 undoes the optionality while keeping the helpers, which now matter more than before. Between those upstream shocks the maintenance pattern is consistent: better type inference for returned columns, cleaner column naming, and converting the Bureau's malformed 'N/A' and 'NULL' strings into real NA values.
Prediction
Expect the next release to respond to another Bureau-side change — endpoint deprecations or new vintages — rather than to a planned feature. The entries contain no self-directed roadmap.

Recent moves

  1. 3mo ago

    API keys become mandatory upstream

    The Census Bureau now requires a key for data and metadata alike, so listCensusApis() and listCensusMetadata() take the key argument and the documentation stops describing keys as encouraged. A forced reversal of the optionality 0.9.0 had deliberately introduced.

    View source ↗
  2. 1y ago

    API keys made optional; key helpers added

    getCensus() drops its key requirement, with get_api_key() and has_api_key() added to find a stored key or warn when none exists. Column type inference also improves, converting all-numeric columns to numeric except known geography and string fields, with convert_variables = FALSE as the escape hatch.

    View source ↗
  3. 5y ago

    Malformed N/A strings converted to real NA

    Census data ships literal 'N/A' and 'NULL' strings that silently poison numeric columns; these now become true NA. Numeric parsing is corrected per-endpoint — 2017 NAICS codes stay character, several popular endpoints get proper numeric handling — and show_call surfaces the underlying request.

    View source ↗
  4. 7y ago

    Arbitrary parameters open every Census endpoint

    ⚡ SPARK

    The release that set the package's scope for the next seven years, converting a wrapper around known queries into a general client. Everything after it is data hygiene and upstream tracking on top of that surface.

    View source ↗
  5. 8y ago

    Column naming and annotation flag handling cleaned up

    ACS annotation flags stop being coerced to numeric, punctuation in returned column names normalizes to underscores, and geography columns move to the front. Output tidying with no change to what can be queried.

    View source ↗
  6. 9y ago

    First CRAN release

    A one-line announcement of the initial CRAN publication. No detail in the record about what shipped.

    View source ↗