Skip to main content

cendat

A Python helper for the U.S. Census Bureau API.

cendat provides a high-level, chainable interface for discovering datasets, filtering geographies and variables, and fetching data concurrently.

Installation

pip install cendat

Optional Dependencies

pip install cendat[pandas]     # pandas support
pip install cendat[polars]     # polars support
pip install cendat[geopandas]  # geopandas support
pip install cendat[all]        # all of the above

Quick Example

from cendat import CenDatHelper

# Initialize with your API key
cdh = CenDatHelper(years=[2023], key="your-api-key")

# Find and select a product
cdh.list_products(patterns=r"acs/acs5\)")
cdh.set_products()

# Select geography and variables
cdh.set_geos(["050"])  # Counties
cdh.set_variables(["B01001_001E"])  # Total population

# Fetch data
response = cdh.get_data(include_names=True)
df = response.to_polars(concat=True, destring=True)

Documentation

📖 Full documentation: mostlyunoriginal.github.io/cendat

Metadata

Release files for cendat 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cendat 0.8.1
File Size Uploaded
cendat-0.8.1.tar.gz 7.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for cendat 0.8.1
File Interpreter ABI Platform
cendat-0.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.9 MB

Release files / cendat-0.8.1.tar.gz

Download URL cendat-0.8.1.tar.gz
Size 7.9 MB
Tags Source
SHA-256 checksum
How to use checksums
5647582833be5843a6c0459223282bd5720f710ca3788625722b1a81856a7ec7
BLAKE2b-256 checksum
How to use checksums
4dbb6c89cb27e7fb4e962d449fc41f6f49de6a542a78ea9968268cba4a3762fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / cendat-0.8.1-py3-none-any.whl

Download URL cendat-0.8.1-py3-none-any.whl
Size 29.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4044d8c1becac42b0c03f472500b168839b6c6610f4d796b90d4a1fcb128f40d
BLAKE2b-256 checksum
How to use checksums
f19b102a98b64699efa83c095656744b06215e1fe0ceb8a49dc2606f26d07aac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page