Transport Frames is a Python library designed for spatial transport analysis, offering tools to:
- Generate transport frames based on drive graphs.
- Identify priority roads by evaluating the expected popularity of routes between exit pairs.
- Update drive graphs with new road connections, ensuring proper integration.
- Grade territory polygons by analyzing distances to federal and regional roads.
- Compute a weighted connectivity score for a region based on accessibility to transport services and road network quality.
- Interpret accessibility scores into textual descriptions.
- Aggregate administrative-level statistics by computing transport indicators at different spatial scales (regions, districts, etc.).
- Analyze territory-specific indicators by using buffer-based calculations around the center of a given territory.
- Constructs frames from drive graphs to analyze road connectivity.
- Investigates priority roads based on estimated route popularity.
- Updates transport graphs by adding new edges and ensuring seamless network connectivity.
- Grades territories based on proximity to federal and regional roads.
- Computes connectivity values from road networks and accessibility to key transport services (bus stops, railways, airports, ports).
- Assigns territory-wide scores to summarize transport accessibility.
The library calculates various transport indicators at different administrative levels (region, district, etc.), including:
- Distance to regional centers
- Distance to federal roads
- Connectivity score (measuring how well a region is connected to the transport network)
- Lengths of roads and railway paths
- Road density (road length per area)
- Service accessibility (bus routes, railway coverage, and general service accessibility)
- Number of services (number of services inside or near a given territory)
- Number of bus routes (number of bus routes intersecting the territory)
- Distance to nature objects (water objects, nature reserves, etc.)
Transport_frames can be installed with pip:
pip install transport-frames
For the detailed tutorial on usage case see our examples.
The following Jupyter Notebooks illustrate core library functions:
- Graph Frame Creation → 1_graph_frame_creation.ipynb - Created graph from territory polygon. - Generates transport frames from drive graphs. - Identifies priority roads using network analysis.
- Indicator Computation → 2_indicators.ipynb - Computes transport indicators (road density, connectivity, admin center distances, etc.). - Aggregates statistics at area and territory levels.
- Territory grading → 3_criteria.ipynb - Assigns territory scores based on federal and regional roads accessibility. - Analyzes proximity to key infrastructure (bus stops, ports, airports). - Analyzes connectivity metrics of the territory. - Converts numeric scores into textual interpretations.
- Road Graph Updates → 4_road_adder.ipynb - Updates transport graphs with new roads and edges. - Analyzes connectivity improvement after graph modifications.
- Transport Provision → 5_transport_provision.ipynb - Calculates a transport provision index for each territory polygon. - Combines road and railway density, airport accessibility, and settlement area share into one metric.
Before running the examples, one can use the data from examples/data directory. You can use your own
data, but it must follow the structure described in the
API documentation.
Detailed information and description of Transport Frames is available in documentation.
The latest version of the library is available in the main branch.
The repository includes the following directories and modules:
- transport_frames
- directory with the library code:
- graph - graph creation module
- frame - creation of the frame and priority roads module
- criteria - module for grading territory based on frame and criteria calculation
- indicators - module for area and territory indicators calculation
- road_adder - module for updating graph with new road edges
- utils - module containing utulity functions and consts
- tests
pytesttesting - examples examples of how methods work
- docs - documentation sources
The project has BSD-3-Clause license
You can contact us:
- IDU - Institute of Design and Urban Studies
- Alexander Morozov - project manager, software engineer
- Polina Krupenina - software engineer