winstonyym / urbanity

A network-based python package to understand and model urban complexity
https://urbanity.readthedocs.io/en/latest/
MIT License
134 stars 12 forks source link

PyPI version PyPI - Downloads Open In Colab



Urbanity Logo Urbanity Logo



Urbanity

Urbanity is a network-based Python package developed at the NUS Urban Analytics Lab to automate the construction of feature rich (contextual and semantic) urban networks at any geographical scale. Through an accessible and simple to use interface, users can request heterogeneous urban information such as street view imagery, building morphology, population (including sub-group), and points of interest for target areas of interest.


Logo

Network of cities around the world

Features

Designed for urban planners

Urbanity is designed in an object-oriented approach that parallels the urban planning process. The urban data science pipeline starts with a base map which users can use to explore their site. Subsequently, there are two ways to specify geographical area of interest: 1) drawing with the polygon and box tools provided; or 2) providing your own polygon shapefiles (all common formats .shp/.geojson are supported).

Towards exploring complexities underlying urban systems and facilitating comparative study between cities, Urbanity is developed to facilitate downstream descriptive, modelling, and predictive urban analytical tasks.

Quickstart

How do I install Urbanity?

Urbanity is built on several geospatial packages (e.g., GeoPandas, ipyleaflet, rasterio, etc.,) that are best compiled through conda-forge. For seamless installation, we provide an environment.yml file for users to create their own conda environment. Please follow the steps below to ensure proper installation:

1) Navigate to a location of choice (e.g., Desktop or project folder). 2) Download environment.yml file and place it at the location of choice (Step 1). 3) Open up a terminal/command prompt and input the following command:

$ conda config --set channel_priority strict
$ conda env create -f environment.yml
$ conda activate urbanity

4) Installation completed and you should be able to use urbanity without issues.

(Optional) For JupyterLab / JupyterNotebook users, you can additionally add a notebook kernel via:

$ python -m ipykernel install --user --name=urbanity
$ jupyter lab

What can I do with Urbanity?

We demonstrate how you can conduct a diverse range of urban analytical tasks (such as graph machine learning, network assortativity analysis, and benchmarking across cities) with Urbanity. Check out the documentation and examples/tutorials in the documentation site examples.

Sample dataset and notebooks to follow examples can be accessed at this repository.

Citation

If you use Urbanity in your work, please cite:

Yap, W., Stouffs, R. & Biljecki, F. Urbanity: automated modelling and analysis of multidimensional networks in cities. npj Urban Sustain 3, 45 (2023). https://doi.org/10.1038/s42949-023-00125-w

Yap, W., Biljecki, F. A Global Feature-Rich Network Dataset of Cities and Dashboard for Comprehensive Urban Analyses. Sci Data 10, 667 (2023). https://doi.org/10.1038/s41597-023-02578-1

License

urbanity was created by winstonyym. It is licensed under the terms of the MIT license.

Credits




Logo