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.2.0.tar.gz
.
File metadata
- Download URL: census-downloader-1.2.0.tar.gz
- Upload date:
- Size: 3.8 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 | 832da462195c6be964dbf675f8f7fcc3c8431cb31bd731c9e91cbb9cf2cdc0d6 |
|
MD5 | 6da7693a4ec1f7442960960bc85548d3 |
|
BLAKE2b-256 | a07925be01249d958832b6883f14002204c2b45eac1db698e9c507239c1ef2a3 |