Skip to main content

Redistribute 2010-2019 census data onto 2020 census boundaries

Project description

sdc-census10to20

Redistribute 2010-2019 census data onto 2020 census boundaries.

This is the Python port of the R package sdc.census10to20, used by the Social Data Commons pipelines to standardize tract- and block-group-level data across the 2020 decennial census boundary changes.

Install

pip install sdc-census10to20

Quick start

import pandas as pd
from sdc_census10to20 import standardize_all

df = pd.DataFrame({
    "geoid": ["51059450100", "51059450200"],
    "year": [2018, 2018],
    "measure": ["population", "population"],
    "value": [3000, 4500],
    "moe": [pd.NA, pd.NA],
})

standardized = standardize_all(df)

See the documentation for the full API reference and a worked example with Virginia tract-level data.

Releasing

This package uses PyPI Trusted Publishing, so no API tokens are stored in GitHub.

One-time setup (done by a maintainer):

  1. Register the project name on TestPyPI and PyPI with a "pending publisher" pointing at this repo and workflow file (.github/workflows/publish.yml).
  2. Configure two GitHub environments on the repo: testpypi and pypi.

To cut a release:

  1. Bump version in pyproject.toml, update CHANGELOG.md.
  2. Commit and tag: git tag census10to20-v0.1.0 && git push --tags.
  3. The publish.yml workflow builds the wheel, uploads to TestPyPI first, then PyPI on success.

To publish docs:

The docs.yml workflow runs on every push to main that touches packages/sdc-census10to20/. No tag required.

License

MIT

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

sdc_census10to20-0.1.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sdc_census10to20-0.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file sdc_census10to20-0.1.0.tar.gz.

File metadata

  • Download URL: sdc_census10to20-0.1.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sdc_census10to20-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f8feb2cc09515a1710479fd861414b1af274e756e0f615cda2738ec53423f08c
MD5 04bd12a09634396d9c476b8f500bf80b
BLAKE2b-256 8cf11b2f66ad8889f02cb54f4ffe9fc09e2861eff23f14d5b323f356fcabd3c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for sdc_census10to20-0.1.0.tar.gz:

Publisher: publish-census10to20.yml on dads2busy/Social-Data-Commons

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sdc_census10to20-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sdc_census10to20-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e61587d3276dde8deb9a67e7b7a4745a3800708bafe4bd9a74cb90ec061825c4
MD5 e2abaa02d5a1fe99eada7704c87ccbe6
BLAKE2b-256 b9f5e86dc820c11cce1c84729aae5ac81f08965e6c5a948692563bfd2f5c0b45

See more details on using hashes here.

Provenance

The following attestation bundles were made for sdc_census10to20-0.1.0-py3-none-any.whl:

Publisher: publish-census10to20.yml on dads2busy/Social-Data-Commons

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page