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](https://i.imgur.com/hZ2XkrN.png) ___ > [!IMPORTANT] > - 📹 `UrbanMapper` got its first Model Context Protocol (MCP) 👉https://www.youtube.com/watch?v=6gLkmKevj8Y 👈 > - 🤝 We support [JupyterGIS](https://github.com/geojupyter/jupytergis) following one of your `Urban Pipeline`'s analysis for collaborative in real-time exploration on Jupyter 🏂 Shout-out to [@mfisher87](https://github.com/mfisher87) and `JGIS` team for their tremendous help. ## 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](https://www.openstreetmap.org), you can compute accidents per street with a [Scikit-Learn](https://scikit-learn.org/stable/)–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): ```bash pip install urban-mapper ``` Then launch Jupyter Lab to explore `UrbanMapper`: ```bash 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](https://docs.astral.sh/uv/getting-started/installation/), [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/index.html) > or from source in the [UrbanMapper Installation Guide](https://urbanmapper.readthedocs.io/en/latest/getting-started/installation/). --- # Getting Started with UrbanMapper We highly recommend exploring the [UrbanMapper Documentation](https://urbanmapper.readthedocs.io/en/latest/), starting with the homepage general information and then the [Getting Started](https://urbanmapper.readthedocs.io/en/latest/getting-started/) section. Once you have grasped the basics, we recommend exploring the [Interactive Examples](https://urbanmapper.readthedocs.io/en/latest/examples/) or running yourself the notebooks through the `examples/` directory. --- ## Licence `UrbanMapper` is released under the [MIT Licence](./LICENCE). ## Acknowledgments This work is supported by the NSF and is part of the [OSCUR initiative]([url](https://oscur.org/)).