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_statswith 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. Seeexamples/crash_density.jsonandexamples/heat_exposure.json. - Registry (
uw.registry()): one JSON description of every installed operator, generated from the code that runs them. - Compatibility:
urbanweave.compat.urbantraceruns UrbanTrace's operator names and column conventions on urbanweave;urbanweave.compat.curiohas 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.
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.
Metadata
Release files for urbanweave 0.1.0a1
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 |
|---|---|---|---|---|
| urbanweave-0.1.0a1.tar.gz | 128.4 kB | With provenance | Details for urbanweave-0.1.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| urbanweave-0.1.0a1-py3-none-any.whl | Python 3 | none | any | Details for urbanweave-0.1.0a1-py3-none-any.whl |
Total release size: 199.5 kB
Release files / urbanweave-0.1.0a1.tar.gz
| Download URL | urbanweave-0.1.0a1.tar.gz |
|---|---|
| Size | 128.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
365d52283ffd02a22765c4a152bfb5685f6bacaf96256bdb9a640653fd015874
|
|
BLAKE2b-256 checksum How to use checksums |
a4518a0773d5e9df0943b4a90cfcd0811be3eb16d2242da3b3b9961187ff3556
|
| 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 19, 2026.
Transparency logRelease files / urbanweave-0.1.0a1-py3-none-any.whl
| Download URL | urbanweave-0.1.0a1-py3-none-any.whl |
|---|---|
| Size | 71.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e039870813cc8520098ca506d7f2b5438c3ad8f0a910ff1b76e34f95760a0e58
|
|
BLAKE2b-256 checksum How to use checksums |
53284fd0b5284cead3281cef411c986619a060eae4d0d6fd3a30739626cb8949
|
| 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 19, 2026.
Transparency logSecurity for urbanweave 0.1.0a1
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 urbanweave-0.1.0a1.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 19, 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.