Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 1.66 KB

README.md

File metadata and controls

25 lines (19 loc) · 1.66 KB

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 or decennial census fields (e.g. B01001 = Total population)
  • -e, --endpoint (OPTIONAL) Desired endpoint, one of acs (American Community Survey) or dc (Decennial Census); default = acs
  • -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: 'state')
  • -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)
  • -y, --year (OPTIONAL) Census or ACS year (defaults: Census = 2010, ACS = 2017) - (Extra parenthetical notes on Census 2000: ZCTA level is not supported, and there's a different suite of codes)

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