{"id":8011,"library":"cityseer","title":"Cityseer: Urban Network Analysis","description":"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.","status":"active","version":"4.24.1","language":"python","source_language":"en","source_url":"https://github.com/cityseer/cityseer","tags":["urban analysis","geospatial","network analysis","city planning","transportation","accessibility"],"install":[{"cmd":"pip install cityseer","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Core geospatial data handling and operations.","package":"geopandas"},{"reason":"Graph theory foundation for network analysis.","package":"networkx"},{"reason":"Fetching, constructing, and visualizing street networks from OpenStreetMap.","package":"osmnx"},{"reason":"Scientific computing, particularly for spatial algorithms.","package":"scipy"}],"imports":[{"wrong":"from cityseer import City","symbol":"City","correct":"from cityseer import City"}],"quickstart":{"code":"import osmnx as ox\nfrom cityseer import City\n\n# Define a place and retrieve its street network using OSMnx\nplace_name = 'Piedmont, California, USA'\nG = ox.graph_from_place(place_name, network_type='walk')\n\n# Create a Cityseer City object from the OSMnx graph\ncity = City.from_osmnx(G, crs='EPSG:4326')\n\n# Perform a simple accessibility analysis\naccessibility_result = city.analyze_accessibility(target_points=city.nodes.geometry)\n\n# Print a sample of results (e.g., average accessibility)\nprint(f\"Average accessibility (example): {accessibility_result.mean():.2f}\")\n\n# To save or visualize, you would typically use city.to_gdfs() or city.draw_network()\n# For example, to get nodes with accessibility data:\n# nodes_gdf = city.nodes.copy()\n# nodes_gdf['accessibility'] = accessibility_result\n# print(nodes_gdf.head())","lang":"python","description":"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`)."},"warnings":[{"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`).","message":"Version 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.","severity":"breaking","affected_versions":"4.0.0+"},{"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.","message":"Coordinate 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.","severity":"gotcha","affected_versions":"All v4+"},{"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.","message":"Analyzing 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.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"search_vec":"'4.24.1':46 'access':30,68 'analysi':4,21,61,64 'analyz':29 'base':16 'chang':56 'citi':65 'citys':1,5 'comput':11 'connect':31 'current':43 'data':38 'enabl':23 'environ':28 'geospati':62 'graph':40 'librari':9 'major':58 'metric':35 'model':26 'network':3,15,63 'network-bas':14 'often':53 'pedestrian':18 'pedestrian-scal':17 'plan':66 'provid':10 'python':8 'regular':51 'scale':19 'see':50 'signific':55 'spatial':37 'theori':41 'tool':12 'transport':67 'typic':49 'updat':52 'urban':2,20,27,34,60 'use':36 'user':24 'version':44,59","created_at":"2026-04-16T16:59:59.024233+00:00","updated_at":"2026-04-16T16:59:59.024233+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'City' from 'cityseer' (/tmp/tmpdgfvgbkq/venv/lib/python3.12/site-packages/cityseer/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"4.24.1","cli_name":"","cli_version":null,"type":"library","homepage":"https://cityseer.benchmarkurbanism.com/","github":"https://github.com/benchmark-urbanism/cityseer-api","docs":"https://cityseer.benchmarkurbanism.com/","changelog":null,"pypi":"https://pypi.org/project/cityseer/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}