Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

urbanweave

Spatial integration for urban analysis: weave data from many sources (points, lines, polygons, rasters, H3 cells) onto the places urban analysis asks about (zones, streets, grids), with explicit measurement, value kinds and reports of what each step did.

pip install --pre urbanweave                  # the core: vector and H3 (an alpha release)
pip install --pre "urbanweave[raster,osm]"    # with raster zonal statistics and OpenStreetMap streets
import urbanweave as uw

crashes = uw.points_from_columns(df, lat="latitude", lon="longitude")
cells = uw.targets.h3_cells(crashes, 9)

m = uw.match(crashes, cells, "contain")                   # who goes where, with what quantities
grid = uw.aggregate(m, None, [uw.count(as_="crashes", fill_empty=0), uw.sum("persons_injured")])
uw.report_of(grid)                                        # matched, unmatched by cause, totals, CRS

zones = uw.aggregate(uw.match(grid, nta, "area_overlap"), None, [uw.sum("crashes")])
  • Matching (uw.match): contain, centroid, representative_point, nearest, nearest_segment, nearest_node, within_distance, area_overlap, length_weighted, largest_overlap, polygon_to_lines, gaussian, sample. Each returns (source_id, target_id) pairs with allocation fractions, overlap areas or lengths in metres, sampling weights or distances.
  • Aggregation (uw.aggregate): count, weighted_count, sum, density, mean, weighted_mean, median, weighted_median, min, max, majority, shares, first, last, join, custom. Missing stays missing; integer sums stay exact; value kinds are checked.
  • Rasters (pip install urbanweave[raster]): uw.read_raster, uw.zonal_stats with exact coverage fractions (exactextract) or cell centers, per-band validity and coverage.
  • Streets (pip install urbanweave[osm]): physical street segments and intersections from OSMnx graphs, split_lines, along_lines (raster values by length along lines), reduce.
  • Plans (uw.Plan): versioned JSON recipes with preflight validation, run manifests, and replay from pinned, fingerprinted artifacts. See examples/crash_density.json and examples/heat_exposure.json.
  • Registry (uw.registry()): one JSON description of every installed operator, generated from the code that runs them.
  • Compatibility: urbanweave.compat.urbantrace runs UrbanTrace's operator names and column conventions on urbanweave; urbanweave.compat.curio has drop-in versions of Curio's UHVI and Weather zonal means.

Tutorials: eight notebooks in tutorials/ introduce the data models with schematic figures, then walk through matching, aggregation, H3, rasters, streets and plans on a synthetic town, with SVG maps; they run offline.

Example: NYC taxi pickups from zone counts recovers block-level taxi pickups for 2016–2021, when TLC published only taxi zones, by dasymetric disaggregation with 2013's coordinates as the prior: four match/aggregate calls, tested against a month with known locations. A second notebook carries every month of 2016–2025 (655 million trips, one dasymetric call) down to H3 cells and then to Manhattan's street segments.

The design, with the project's history and goals, is in DESIGN.md, the sequence and release gates in PLAN.md, and where each plan item stands in STATUS.md.

Development

uv venv --python 3.13 .venv
uv pip install --python .venv -e '.[raster,osm,dev]'
.venv/bin/python -m pytest -q                 # the regular suite
.venv/bin/python -m pytest -q -m slow         # comparisons on Curio's Milan sample data (minutes)
.venv/bin/python tools/urbantrace_corpus.py   # inventory and old/new comparison on UrbanTrace's catalog
.venv/bin/python tools/run_tutorials.py       # rerun the tutorial notebooks, refreshing their outputs
.venv/bin/python tools/benchmark.py points --n 2000000

Tests that compare with UrbanTrace and Curio run their code as copied into tests/legacy/ at the revisions recorded there; Curio's sample data is read in place from CURIO_REPO (default ../curio).

License and acknowledgements

MIT. Copyright (c) 2026 Claudio Silva and New York University. Developed by the OSCUR team at VIDA-NYU.

urbanweave is part of OSCUR, the Open-Source Cyberinfrastructure for Urban Computing project, supported by the National Science Foundation under Awards #2411221, #2411222 and #2411223. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.

OSCUR: Open-Source Cyberinfrastructure for Urban Computing

Metadata

Release files for urbanweave 0.1.0a2

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

Source distribution (sdist)

Source distribution for urbanweave 0.1.0a2
File Size Uploaded Provenance Actions
urbanweave-0.1.0a2.tar.gz 1.7 MB With provenance Details for urbanweave-0.1.0a2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for urbanweave 0.1.0a2
File Interpreter ABI Platform Actions
urbanweave-0.1.0a2-py3-none-any.whl Python 3 none any Details for urbanweave-0.1.0a2-py3-none-any.whl

Total release size: 1.7 MB

Release files / urbanweave-0.1.0a2.tar.gz

Download URL urbanweave-0.1.0a2.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
84eed7a09c1df7e4ff2c6c197cb8a552928cdf97433ed9f8cb2e88bd56d57280
BLAKE2b-256 checksum
How to use checksums
4fbb2b0fb7f67f729dd7d97f651055c0878dd51ca970403e819eb3f03dc59bae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 22, 2026.

Transparency log

Release files / urbanweave-0.1.0a2-py3-none-any.whl

Download URL urbanweave-0.1.0a2-py3-none-any.whl
Size 76.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d458f25567a41a6e2df3713f974eeb99276615bd2dccfd32e366f5d9ea3ea53
BLAKE2b-256 checksum
How to use checksums
94db9cafb233b6fbf162ab82d3fa3cf509b639f00c50220b4d2f7d76501cdbee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 22, 2026.

Transparency log

Security for urbanweave 0.1.0a2

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.

Select from 2 files

Attestation for urbanweave-0.1.0a2.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 Nov 22, 2026.

Transparency log

A 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.

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