Registry / data / cityseer

cityseer

JSON →
library4.24.1pypypiunverified

Cityseer is a Python library providing computational tools for network-based pedestrian-scale urban analysis. It enables users to model urban environments, analyze accessibility, connectivity, and other urban metrics using spatial data and graph theory. The current version is 4.24.1, and it typically sees regular updates, often with significant changes between major versions.

pip install cityseer
INSTALL
IMPORT
SIG · CITYSEER
C
cityseer
datapythonv4.24.1
Install
24.5s avg
Import
Disk
732MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.24.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
build_error
glibc
py 3.103.920 runs
installs and imports cleanly · install 24.5s · import 0.000s · 709MB
732MB installed
● package 732MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

City
from cityseer import City
from cityseer import City

This quickstart demonstrates how to create a `Cityseer` `City` object from an `OSMnx` graph and perform a basic accessibility analysis. It highlights the primary entry point (`City.from_osmnx`) and a common analysis method (`analyze_accessibility`). Ensure `osmnx` is also installed (`pip install osmnx`).

import osmnx as ox from cityseer import City # Define a place and retrieve its street network using OSMnx place_name = 'Piedmont, California, USA' G = ox.graph_from_place(place_name, network_type='walk') # Create a Cityseer City object from the OSMnx graph city = City.from_osmnx(G, crs='EPSG:4326') # Perform a simple accessibility analysis accessibility_result = city.analyze_accessibility(target_points=city.nodes.geometry) # Print a sample of results (e.g., average accessibility) print(f"Average accessibility (example): {accessibility_result.mean():.2f}") # To save or visualize, you would typically use city.to_gdfs() or city.draw_network() # For example, to get nodes with accessibility data: # nodes_gdf = city.nodes.copy() # nodes_gdf['accessibility'] = accessibility_result # print(nodes_gdf.head())
Debug
Known issues
breakingVersion 4.0.0 introduced significant breaking changes, refactoring the library around a central `City` object. Many standalone functions and older `Graph` objects were removed or moved into methods of the `City` class.
fix
Review the official v4 migration guide. Replace direct `graph` object manipulation and standalone functions (e.g., `graph_from_bbox`, `accessibility`) with methods on the `cityseer.City` instance (e.g., `City.from_osmnx`, `city.analyze_accessibility`).
affects: 4.0.0+
gotchaCoordinate Reference System (CRS) handling is strict. You must explicitly provide a valid CRS (e.g., `crs='EPSG:4326'` for WGS84 or a projected CRS) when initializing a `City` object or importing data.
fix
Always pass the `crs` argument with a valid EPSG code or WKT string to `City` constructors (e.g., `City('place', crs='EPSG:4326')` or `City.from_osmnx(G, crs=G.graph['crs'])`). Ensure your input data also has a defined CRS.
affects: All v4+
gotchaAnalyzing very large urban areas or extremely dense networks can lead to high memory consumption and long processing times. Cityseer is designed for pedestrian-scale analysis.
fix
For initial development and testing, work with smaller, representative areas. Consider simplifying the network or processing in smaller chunks for very large regions. Monitor memory usage and execution time.
affects: All
Upgrade
Version history
4.24.1latest on PyPI · released Mar 19, 2026
Audit
Dependencies
geopandasrequiredCore geospatial data handling and operations.
networkxrequiredGraph theory foundation for network analysis.
osmnxrequiredFetching, constructing, and visualizing street networks from OpenStreetMap.
scipyrequiredScientific computing, particularly for spatial algorithms.
Agent activity
33 hits · last 30 days
node
30
OpenAI (training)
1
Resources