node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org ยป

censusapi2csv

censusapi2csv

A tool for downloading Census/ACS data from the API and parsing to CSV

Installation

npm install censusapi2csv -g

Usage

censusapi2csv -f <census field codes>

Arguments

  • -f, --fields (REQUIRED) Comma-separated list of desired ACS fields (e.g. B01001 = Total population)
  • -l, --level (OPTIONAL) Geographic level of desired results, one of state, county, place, county subdivision, zip code tabulation area, tract, block group, or block. (default: 'zip code tabulation area')
  • -o, --out (OPTIONAL) Output filename and path if desired. Default is to STDOUT.
  • -k, --key (OPTIONAL) Census API key (limited use without one)
  • -s, --state (OPTIONAL) FIPS code of a state to which you want the request restricted (e.g. '06' = California)
  • -c, --county (OPTIONAL) FIPS code of a county to which you want the request restricted (e.g. '007' = Chittenden county, within Vermont)

Notes

  • Some request levels must be restricted by state or county. For example, the block group level will only be returned if both state and county are specified

License

MIT