Skip to content

Spatial Join & Enrich any urban layer given any external urban dataset of interest, streamline your urban analysis with Scikit-Learn-Like pipelines, and share your insights with the urban research community!

License

Notifications You must be signed in to change notification settings

VIDA-NYU/UrbanMapper

Repository files navigation

UrbanMapper

Enrich Urban Layers Given Urban Datasets

with ease-of-use API and Sklearn-alike Shareable & Reproducible Urban Pipeline

PyPI Version Beartype compliant UV compliant RUFF compliant Jupyter Python 3.10+ Compilation Status

UrbanMapper Cover


Important

UrbanMapper, In a Nutshell

UrbanMapper lets you link your data to spatial features—matching, for example, traffic events to streets—to enrich each location with meaningful, location-based information. Formally, it defines a spatial enrichment function $f(X, Y) = X \bowtie Y$, where $X$ represents urban layers (e.g., Streets, Sidewalks, Intersections and more) and $Y$ is a user-provided dataset (e.g., traffic events, sensor data). The operator $\bowtie$ performs a spatial join, enriching each feature in $X$ with relevant attributes from $Y$.

In short, UrbanMapper is a Python toolkit that enriches typically plain urban layers with datasets in a reproducible, shareable, and easily updatable way using minimal code. For example, given traffic accident data and a streets layer from OpenStreetMap, you can compute accidents per street with a Scikit-Learn–style pipeline called the Urban Pipeline—in under 15 lines of code. As your data evolves or team members want new analyses, you can share and update the Urban Pipeline like a trained model, enabling others to run or extend the same workflow without rewriting code.

There are more to UrbanMapper, explore!


Installation

Install UrbanMapper via pip (works in any environment):

pip install urban-mapper

Then launch Jupyter Lab to explore UrbanMapper:

jupyter lab

Tip

We recommend installing UrbanMapper in a virtual environment to keep things tidy and avoid dependency conflicts. You can find detailed instructions—including how to install within a virtual environment using uv, conda or from source in the UrbanMapper Installation Guide.


Urban Layers Currently Supported

UrbanMapper currently supports loading the following urban layers:

  • Street networks (roads and intersections) from OpenStreetMap via OSMNx
  • Pedestrian infrastructure (sidewalks and crosswalks) via Tile2Net ( automated mapping from aerial imagery)
  • City features (buildings, parks, bike lanes, etc.) from OpenStreetMap via OSMNx
  • Administrative boundaries (neighborhoods, cities, states, countries) from OpenStreetMap via OSMNx

More layers, like subway/tube networks, will be added in the future. If you have any suggestions, please feel free to open an issue or a pull request!

🚀 Getting Started with UrbanMapper

Are you ready to dive into urban data analysis in a couple of lines of code? The simplest approach to get started with UrbanMapper is to look through the two getting-started examples available in the documentation then walk through the hands-on examples in the examples/ directory. Documentation is available at UrbanMapper Documentation.


Licence

UrbanMapper is released under the MIT Licence.

About

Spatial Join & Enrich any urban layer given any external urban dataset of interest, streamline your urban analysis with Scikit-Learn-Like pipelines, and share your insights with the urban research community!

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •