City2Graph Urban Spatial Network Analysis
Turns streets, buildings, transit, zones and mobility flows into GeoDataFrame-based graphs for accessibility, isochrone and centrality analysis in Python.
Data & AnalyticsAdvanced★ 2,073⑂ 218AI score 9/10Last updated: Dec 6, 2026
What it does
- Guides Claude through the
city2graphPython library to convert GIS files, CSVs, Overture Maps, GTFS and GBFS data into graphs stored as plain node/edge GeoDataFrames. - Provides a three-step lookup: the data you have → the relation to model (junctions, contiguity, proximity, OD flows) → the analysis or output (isochrones, travel costs, centrality, NetworkX/PyTorch Geometric export).
- Can synthesise timetables from OpenStreetMap or custom route tables where no GTFS feed exists.
- Ships a "silent mistakes" table covering errors that raise no exception but produce plausible wrong numbers (one-way handling, MultiLineString roads, CRS units, missing unreachable pairs).
Who it's for
- Spatial data analysts in urban planning, transport, or site selection.
- GeoPandas users who want to move into network analysis or graph machine learning.
- Researchers building urban graph datasets for GNN models.
Example uses
- "From roads.gpkg and facilities.gpkg, compute walking time to the 3 nearest facilities and export 2- and 5-minute catchments."
- "Combine Overture streets for Liverpool with an OSM-generated rail timetable and compare multimodal access areas."
- "Build a flow graph from my OD commuting CSV plus zone polygons, run PageRank, and write the top hub zones to a GeoPackage."
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/c2g-dev/city2graph/HEAD/skills/city2graph/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on AI Skill Mart. Copy the skills/city2graph folder from the GitHub repo c2g-dev/city2graph into my ~/.claude/skills/city2graph/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/c2g-dev/city2graph.git /tmp/city2graph && mkdir -p ~/.claude/skills && cp -r /tmp/city2graph/skills/city2graph ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and confirm you have Python 3.12–3.14 with
python --version. - Install the library:
pip install city2graph matplotlib(addpip install "city2graph[cpu]"for PyTorch Geometric conversion). - Clone the repository:
git clone https://github.com/c2g-dev/city2graph.git /tmp/city2graph - Copy the skill folder:
mkdir -p ~/.claude/skills && cp -r /tmp/city2graph/skills/city2graph ~/.claude/skills/ - Check that
~/.claude/skills/city2graph/contains SKILL.md and thereferences/directory. - Restart Claude Code and try a prompt such as "analyse walking access from my roads layer".
- Verify the version with
python -c "import city2graph; print(city2graph.__version__)"(the skill was written for 1.2.0).
View source on GitHub ↗License: BSD-3-Clause