US Census utilities for a variety of data loading, analysis, and mapping purposes.
Project description
censusdis
censusdis is a package for discovering, loading, and analyzing U.S. Census data. It is designed
- to support every dataset, every geography, and every year. It's not just about ACS data through the last time the software was updated and released;
- to support all geographies, on and off-spine, not just states, counties, and census tracts;
- to have integrated mapping capabilities that save you time and extra coding;
- to be intuitive, Pythonic, and fast.
Note:
For the full README, please visit the censusdis source repository.
Installation and First Example
censusdis can be installed with pip
:
pip install censusdis
Every censusdis query needs four things:
- What data set we want to query.
- What vintage, or year.
- What variables.
- What geographies.
Here is an example of how we can use censusdis to download data once we know those four things.
import censusdis.data as ced
from censusdis.datasets import ACS5
from censusdis import states
df_median_income = ced.download(
# Data set: American Community Survey 5-Year
dataset=ACS5,
# Vintage: 2022
vintage=2022,
# Variable: median household income
download_variables=['NAME', 'B19013_001E'],
# Geography: All counties in New Jersey.
state=states.NJ,
county='*'
)
There are many more examples in the tuturial and in the sample notebooks.
Tutorial (A Great Place to Start!)
For a tutorial, please see the censusdis-tutorial repository. This tutorial was presented at PyData Seattle 2023. If you want to try it out for yourself, the README.md contains links that let you run the tutorial notebooks live on mybinder.org in your browser without needing to set up a local development environment or download or install any code.
Tutorial Video
A 86 minute video of the tutorial as presented at PyData Seattle 2023 is also available.
More Details
For the full README, lots of maps, demo notebooks, and more, please visit the censusdis source repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file censusdis-1.2.2.tar.gz
.
File metadata
- Download URL: censusdis-1.2.2.tar.gz
- Upload date:
- Size: 389.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.4 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c0834619bc1eb5ef439f1b71f6f44961fc4af2e2f5863c3f7ea6b935eb59df1 |
|
MD5 | 9c3e366e03b6e8da06b39fc96cdba06c |
|
BLAKE2b-256 | edc234400a03aad75f906f90181383c63e1af1cdd9c206bac4d781effb42e012 |
File details
Details for the file censusdis-1.2.2-py3-none-any.whl
.
File metadata
- Download URL: censusdis-1.2.2-py3-none-any.whl
- Upload date:
- Size: 427.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.4 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60094fa3cd2cbff590f414b6e45f811aa06a0d4b598abcca90231d9c359e10c4 |
|
MD5 | 6ef9b105985760297b192925f5bf4753 |
|
BLAKE2b-256 | dd74288badfc8309c1f3fc628fc31583607ceadf4e12eab2d0e8f8b821475455 |