BlocksNet is an open-source library that includes methods of modeling urbanized areas for the generation of value-oriented master planning requirements. The library is provided for generating a universal information city model based on the accessibility of urban blocks. The library also provides tools for working with the information city model, which allow: to generate a layer of urban blocks, to calculate provisioning based on regulatory requirements, to obtain optimal requirements for master planning of territories.
BlocksNet — a library for modeling urban development scenarios (e.g. creating a master plan), supporting the following tools:
- Method for generating a layer of urban blocks is the division of the territory into the smallest elements for the analysis of the urban area - blocks. The method of generating a layer of urban blocks is based on clustering algorithms taking into account additional data on land use.
- Method for generating an intermodal city graph based on open-data. The intermodal graph includes the information about public transport and pedestrian routes to better analyze city mobility.
- The Universal Information City Model is used to further analyze urban areas and to obtain information on the accessibility of urban blocks. The City Model includes aggregated information on services and buildings, intermodal accessibility, service types hierarchy, and urban blocks.
- Method for accessing the connectivity of the blocks based on intermodal accessibility.
- Methods for assessing urban provision of different types of services with regard to normative requirements and value attitudes of the population. The estimation of provisioning is performed by iterative algorithm on graphs, as well as by solving linear optimization problem.
- Method for computing the function for evaluating the optimality of master planning projects based on the value attitudes of the population and systems of external limitations. The method is based on solving an optimization problem: it is necessary to find an optimal development to increase the provision. The problem is solved with the help of genetic algorithm, user scenarios support is added.
- Method for identifying vacant areas based on open-data.
Main differences from existing solutions:
- The method of generating a layer of urban blocks considers the type of land use, which makes it possible to define limitations for the development of the territory in the context of master planning.
- The universal information city model can be built on open data; the smallest spatial unit for analysis is a block, which makes it possible to analyze on a city scale.
- Not only normative documents are taken into account when assessing provision, but also the value attitudes of the population.
- Genetic algorithm for optimization of development supports user-defined scenarios.
- Support for different regulatory requirements.
BlocksNet can be installed with pip
:
pip install blocksnet
Use the library by importing classes from blocksnet
:
from blocksnet import City
Next, use the necessary classes and modules:
city = City( blocks=blocks_gdf, adj_mx=adj_mx, ) city.plot()
For more detailed use case see our examples.
Before running the examples, one should download the input
data
and place it in the examples/data
directory. You can use your own
data, but it must follow the structure described in the
API documentation.
Next examples will help to get used to the library:
- Main pipeline of the library. Includes full
City
model initialization andGenetic
optimization. - City blocks generating using
BlocksGenerator
class based on city geometries data. - Intermodal graph generating - using
GraphGenerator
class. Includes adjacency matrix calculating usingAdjacencyCalculator
for given city blocks. - City model initialization and its methods usage.
The example explains, how to work with
City
model, accessServiceType
orBlock
information etc. Extremely helpful if you want to participate in developing. - Provision assessment - how
to assess provision of certain city
ServiceType
, - Development optimization method based on genetic
algorithm. The goal of the method is to optimize the search for master planning
requirements for a specific
Block
or the entireCity
in a specific scenario. - Vacant area identifying for a certain city
Block
.
Detailed information and description of BlocksNet is available in documentation.
The latest version of the library is available in the main
branch.
The repository includes the following directories and modules:
- blocksnet
- directory with the library code:
- preprocessing - data preprocessing module
- models - entities' classes used in library
- method - library tool methods on
City
model - utils - module for helping functions and consts
- tests
pytest
testing - examples examples of how methods work
- docs - documentation sources
To start developing the library, one must perform following actions:
Clone the repository:
$ git clone https://github.com/aimclub/blocksnet
(Optional) Create a virtual environment as the library demands exact package versions:
$ make venv
Activate the virtual environment if you created one:
$ source .venv/bin/activate
Install the library in editable mode with development dependencies:
$ make install-dev
Install pre-commit hooks:
$ pre-commit install
Create a new branch based on
develop
:$ git checkout -b develop <new_branch_name>
Start making changes on your newly created branch, remembering to never work on the
master
branch! Work on this copy on your computer using Git to do the version control.Update tests according to your changes and run the following command:
$ make test
Make sure that all tests pass.
Update the documentation and README files according to your changes.
- When you're done editing and local testing, run:
$ git add modified_files $ git committo record your changes in Git, then push them to GitHub with:
$ git push -u origin my-contributionFinally, go to the web page of your fork of the BlocksNet repo, and click 'Pull Request' (PR) to send your changes to the maintainers for review.
Check out the Contributing for more information.
The project has BSD-3-Clause license
The library was developed as the main part of the ITMO University project #622280 “Machine learning algorithms library for the tasks of generating value-oriented requirements for urban areas master planning”
You can contact us:
- NCCR - National Center for Cognitive Research
- IDU - Institute of Design and Urban Studies
- Tatiana Churiakova - project manager
- Vasilii Starikov - lead software engineer
Also, you are welcomed to our issues section!
Published:
- Churiakova T., Starikov V., Sudakova V., Morozov A. and Mityagin S. Digital Master Plan as a tool for generating territory development requirements // International Conference on Advanced Research in Technologies, Information, Innovation and Sustainability 2023 – ARTIIS 2023
- Morozov A. S. et al. Assessing the transport connectivity of urban territories, based on intermodal transport accessibility // Frontiers in Built Environment. – 2023. – Т. 9. – С. 1148708.
- Morozov A. et al. Assessment of Spatial Inequality Through the Accessibility of Urban Services // International Conference on Computational Science and Its Applications. – Cham : Springer Nature Switzerland, 2023. – С. 270-286.
- Natykin M.V., Morozov A., Starikov V. and Mityagin S.A. A method for automatically identifying vacant area in the current urban environment based on open source data // 12th International Young Scientists Conference in Computational Science – YSC 2023.
- Natykin M.V., Budenny S., Zakharenko N. and Mityagin S.A. Comparison of solution methods the maximal covering location problem of public spaces for teenagers in the urban environment // International Conference on Advanced Research in Technologies, Information, Innovation and Sustainability 2023 – ARTIIS 2023.
- Kontsevik G., Churiakova T., Markovskiy V., Antonov A. and Mityagin S. Urban blocks modelling method // 12th International Young Scientists Conference in Computational Science – YSC 2023.