Clean way to download census data.
Project description
Tool for downloading census data for 2020 as a csv in an easy way. Might add other years if there's interest.
Usage
To install this script run
pip3 install census-downloader
Then to run the script run
census-downloader --output <OUTPUT_PATH.csv> --columns <COLUMNS YOU WANT GO HERE> --states <STATES TO GO HERE>
You can see the spreadsheet at this link for a description of the columns.
For example, I ran
census-downloader --output out.csv --columns COUNTY COUSUB SUBMCD ESTATE CONCIT PLACE TRACT BLKGRP BLOCK CBSA MEMI CSA METDIV NECTA NMEMI UA UATYPE UR POP100 INTPTLAT INTPTLON P0010001 P0010002 P0010003 P0010004 P0010005 P0010006 P0010007 P0010008 P0010009 P0030001 P0030002 P0030003 P0030004 P0030005 P0030006 P0030007 P0030008 P0030009
Note that I didn't put a --states
argument. By default if you don't provide it it gives you all the states
On my machine this takes 8min to run, about 8.3GB of RAM and produces a file that is 1.9GB.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file census-downloader-1.3.0.tar.gz
.
File metadata
- Download URL: census-downloader-1.3.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.7.0 requests/2.25.1 setuptools/68.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e615f8ee33b2e4c587afb961758efb38a5782e9e69d8eb2ab4580b7794099b67 |
|
MD5 | 76e62632418e62243590a3e9e455d31d |
|
BLAKE2b-256 | 2c4f35c7bba05745956ecd5adb91738f60aa3d271ac4812cbb8f1db844198ddb |