https://github.com/faradayio/censusapi2csv
A tool for downloading Census/ACS data from the API and parsing to CSV
https://github.com/faradayio/censusapi2csv
Last synced: 24 days ago
JSON representation
A tool for downloading Census/ACS data from the API and parsing to CSV
- Host: GitHub
- URL: https://github.com/faradayio/censusapi2csv
- Owner: faradayio
- Created: 2017-11-28T18:58:01.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T17:48:40.000Z (over 3 years ago)
- Last Synced: 2025-02-27T23:11:11.507Z (over 1 year ago)
- Language: JavaScript
- Size: 23.4 KB
- Stars: 2
- Watchers: 5
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# censusapi2csv
A tool for downloading Census/ACS data from the API and parsing to CSV
### Installation
`npm install censusapi2csv -g`
### Usage
`censusapi2csv -f `
### Arguments
* `-f, --fields` (_REQUIRED_) Comma-separated list of [desired ACS fields](https://api.census.gov/data/2017/acs/acs5/variables.html) or [decennial census fields](https://api.census.gov/data/2010/sf1/variables.html) (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](https://api.census.gov/data/key_signup.html) (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](https://api.census.gov/data/2000/sf1/variables.html)_)
### 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