sdc-redistribute
Redistribute values between geographies — direct area-weighted interpolation and parcel-weighted redistribution.
Part of the Social Data Commons
toolkit. Extracted from sdc_core.redistribute; used by SDC pipelines to move
measures from one geographic vintage/level onto another (e.g. 2010 tracts → 2020
block groups), producing _geo10/_geo20-suffixed measures.
Install
uv add sdc-redistribute # or: pip install sdc-redistribute
Quickstart
Split a tract's count onto two equal-area block groups (geometries generated inline so the example is self-contained):
import tempfile, pathlib
import geopandas as gpd
import pandas as pd
from shapely.geometry import box
from sdc_redistribute import redistribute_direct
tmp = pathlib.Path(tempfile.mkdtemp())
gpd.GeoDataFrame({"geoid": ["T1"]}, geometry=[box(0, 0, 2, 2)], crs="EPSG:4326").to_file(tmp / "tract.geojson", driver="GeoJSON")
gpd.GeoDataFrame({"geoid": ["BG1", "BG2"]}, geometry=[box(0, 0, 1, 2), box(1, 0, 2, 2)], crs="EPSG:4326").to_file(tmp / "bg.geojson", driver="GeoJSON")
source_df = pd.DataFrame({"geoid": ["T1"], "year": [2020], "measure": ["pop"], "value": [100.0]})
out = redistribute_direct(source_df, source_geo=tmp / "tract.geojson",
target_geos={"block_group": tmp / "bg.geojson"}, count_cols=["pop"])
print(out[["geoid", "measure", "value"]].to_string(index=False))
# geoid measure value
# BG1 pop_direct 50.0
# BG2 pop_direct 50.0
Public API
redistribute_direct— area-proportional redistribution between two geographies.redistribute_parcels— parcel-centroid-weighted redistribution.run_redistribution— high-level wrapper driven by a pipeline.yaml config block.
Documentation
Metadata
Release files for sdc-redistribute 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sdc_redistribute-0.1.1.tar.gz | 9.8 kB | With provenance | Details for sdc_redistribute-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sdc_redistribute-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for sdc_redistribute-0.1.1-py3-none-any.whl |
Total release size: 18.1 kB
Release files / sdc_redistribute-0.1.1.tar.gz
| Download URL | sdc_redistribute-0.1.1.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a87e2f99bedac121bd93f8161b20ddc4843f82a1fa8e7f3a436bd113c9f165eb
|
|
BLAKE2b-256 checksum How to use checksums |
27620f535185b84e1b463eeaea99b124bfc2c997ea1face197c89b535ac124c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.
Transparency logRelease files / sdc_redistribute-0.1.1-py3-none-any.whl
| Download URL | sdc_redistribute-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8184d4e3fbbbc126c82d24ac00f3946c7bf67842b2bd37f9171e5de00c5185e1
|
|
BLAKE2b-256 checksum How to use checksums |
3533d05d2e16487046ab6b38c2df5ec43a137d3ecb32055e21c0b91f7e1d1c42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.
Transparency logSecurity for sdc-redistribute 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sdc_redistribute-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.