censusapi2csv
v1.8.0
Published
A tool for downloading Census/ACS data from the API and parsing to CSV
Downloads
13
Readme
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 ofacs
(American Community Survey) ordc
(Decennial Census); default =acs
-l, --level
(OPTIONAL) Geographic level of desired results, one ofstate
,county
,place
,county subdivision
,zip code tabulation area
,tract
,block group
, orblock
. (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