Skip to content

IDUclub/Urbanomy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Urbanomy

Urbanomy

Tests status Documentation build status Supported Python version

Overview

Urbanomy is a research toolkit from the Institute of Design and Urban Studies (IDU) for assessing land parcels from spatial, economic, and scenario perspectives. The library bundles geospatial feature engineering, CatBoost-based land-price modelling, multi-criteria investment scoring, and socio-economic ripple analysis into one reproducible codebase.

Highlights

Installation

Urbanomy requires Python 3.10 and system libraries for GeoPandas (GEOS, GDAL, PROJ). We recommend working inside a virtual environment.

git clone https://github.com/iduclub/Urbanomy.git
cd Urbanomy
pip install -e .

Optional dependency groups:

  • pip install -e '.[dev]' – formatting, linting, pre-commit hooks.
  • pip install -e '.[test]' – pytest and coverage tooling.
  • pip install -e '.[docs]' – Sphinx stack for building the documentation.

Quickstart

Land-value modelling

import pandas as pd
import geopandas as gpd
from catboost import CatBoostRegressor
from urbanomy.methods.land_value_modeling import (
    LandDataPreparator,
    LandPriceEstimator,
    plot_land_price_maps,
)

scenario = gpd.read_file("data/scenario_blocks.geojson")
context = gpd.read_file("data/context_blocks.geojson")
accessibility = pd.read_pickle("data/accessibility.pkl")

preparator = LandDataPreparator(
    scenario_blocks_source=scenario,
    context_blocks_source=context,
    accessibility_matrix_source=accessibility,
)
prepared_blocks = preparator.prepare()

model = CatBoostRegressor()
model.load_model("models/land_price.cbm")

estimator = LandPriceEstimator(model=model, blocks=prepared_blocks)
price_map = estimator.predict()
plot_land_price_maps(blocks_pred=price_map, scenario_blocks=scenario)
Training the land-price model with spatial lags

Training the land-price model and generating spatial lag features

Price change map after scenario modification

Price change map after applying the scenario

Comparing investments and prices for scenario and context blocks

Comparing investments and prices for scenario and context blocks

Investment attractiveness

from urbanomy.methods.investment_potential import (
    InvestmentAttractivenessAnalyzer,
    LandUseScoreAnalyzer,
    prepare_investment_input,
)

# 1. Spatial potential scores per land-use
land_use_scores = LandUseScoreAnalyzer().compute_scores_long(prepared_blocks)

# 2. Merge scenario blocks with baseline scores
investment_ready = prepare_investment_input(
    prepared_blocks,
    base_gdf=land_use_scores,
    scenario_flag_column="is_scn",
)

# 3. Calculate economic metrics and final INV index
BENCHMARKS = {
    "residential": {"density": 1.2, "capex": 85_000, "rent_share": 0.75},
    "business": {"density": 3.0, "capex": 120_000, "rent_share": 0.65},
    # ... add other land-use profiles
}
analyzer = InvestmentAttractivenessAnalyzer(benchmarks=BENCHMARKS)
enriched_blocks, project_summary = analyzer.calculate_investment_metrics(investment_ready)
Investment metrics dashboard with INV index

Investment metrics dashboard with the final INV index

Socio-economic effects

import pandas as gpd
from urbanomy.methods.ser import SEREstimator

ser = SEREstimator(
    {
        "population": 52_000,
        "employment_base": 21_000,
        "avg_wage_base": 70_000,
    }
)

project_blocks = gpd.read_file('./data/test/blocks_investment.geojson')
ser_table = ser.compute(project_blocks)
print(ser_table)

Datasets and notebooks

Reproducible pipelines live in examples/:

Documentation

The latest documentation is published automatically from main:

https://iduclub.github.io/Urbanomy/

Build the docs locally with:

pip install -e '.[docs]'
sphinx-build docs/source docs/build

Development

We use the supplied Makefile shortcuts:

make install-dev   # install editable package with dev tools
make lint          # pylint on src/urbanomy
make test          # pytest tests/
make install-docs  # editable install with docs extras

Before opening a pull request:

  1. Format imports with isort and code with black (make format).
  2. Ensure make test passes.
  3. Run sphinx-build if documentation is affected.

License

Urbanomy is released under the BSD-3-Clause license. See LICENSE for the full text.

Contact

Maintainer: Maksim Natykin (mvin@itmo.ru) Issues & feature requests: https://github.com/iduclub/Urbanomy/issues

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors