# network-accessibility-analysis

Replaces straight-line buffers with true network travel costs across walking, transit, and driving modes. Builds isochrones and origin-destination matrices.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · ★ 35
- Author: Muhammed Enes Duran
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/muend/geoai-skills/tree/HEAD/skills/network-accessibility-analysis/SKILL.md
- Updated: 2026-10-17
- HTML: https://affpapa.org/en/nevibecode/skills/network-accessibility-analysis

## What it does

This skill guides the agent to evaluate real travel impedance along transport networks instead of relying on straight-line Euclidean approximations. It selects libraries based on problem scale: OSMnx with NetworkX for local urban studies, and pandana or r5py when processing many-to-many origin-destination pairs exceeding 10⁴×10⁴.

The instructions enforce strict graph hygiene. That means matching `network_type` to the travel mode, projecting coordinates into a metric CRS, and keeping only the largest strongly connected component. Running pedestrian routing on a driving network misses alleys and stairs, while unchecked snapping to distant road nodes silently distorts travel times near rivers or gated boundaries.

It outputs edge-based service areas that do not bridge water barriers, computes 2SFCA spatial access indices for healthcare, and formulates facility location models with PuLP or OR-Tools. For public transit, verifying GTFS calendar dates is mandatory, because an expired transit feed collapses transit calculations into walking times.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add muend/geoai-skills --skill network-accessibility-analysis -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/network-accessibility-analysis/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/network-accessibility-analysis/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add muend/geoai-skills --skill network-accessibility-analysis -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/network-accessibility-analysis/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add muend/geoai-skills --skill network-accessibility-analysis -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/network-accessibility-analysis/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install muend/geoai-skills network-accessibility-analysis
```

2. **Manually: put the files in place**
- File: `.github/skills/network-accessibility-analysis/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add muend/geoai-skills --skill network-accessibility-analysis -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/muend/geoai-skills --path skills/network-accessibility-analysis
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/network-accessibility-analysis/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add muend/geoai-skills --skill network-accessibility-analysis -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/muend/geoai-skills/tree/HEAD/skills/network-accessibility-analysis/SKILL.md

## When to use it
- calculate large many-to-many origin-destination cost matrices in r5py or pandana
- generate realistic isochrones and service areas respecting natural barriers
- evaluate healthcare and facility coverage using the 2SFCA method
- solve facility location-allocation tasks using p-median or maximum coverage

## Example prompts
- Generate 15-minute walking isochrones around local clinics using OSMnx
- Compute transit accessibility to jobs across morning rush hour with r5py and GTFS
- Calculate spatial accessibility scores for hospitals using the 2SFCA method

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: c05e07d8cf90c7d4.

BEGIN THIRD-PARTY FILE c05e07d8cf90c7d4
````text
---
name: network-accessibility-analysis
description: >-
  Always invoke for access to facilities or opportunities by walking,
  driving, cycling, or public transport, even for a conceptual question with
  no routing terms or data yet. Covers hospital and service access,
  transit/GTFS, routes, isochrones, OD matrices, closest facility, 2SFCA,
  walkability, coverage, and equity. Invoke when Euclidean buffers proxy for
  network access. Use movement-trajectory for observed tracks and MCDA for
  suitability without network costs.
license: MIT
metadata:
  author: Muhammed Enes Duran
---

# Network & Accessibility Analysis

Purpose: replace as-the-crow-flies guesswork with network-true travel
costs, at the right scale and with honest assumptions about speeds and
modes. First decision on every task: Euclidean distance is only acceptable
as a declared approximation — flag it whenever you see it standing in for
access.

## Tool selection by scale

| Scale | Tool |
|---|---|
| Neighborhood-city, research flexibility | **OSMnx + NetworkX** |
| City-region, many-to-many OD (>10⁴×10⁴) | **r5py** (multimodal + transit w/ GTFS) or **pandana** (contraction-hierarchy speed) |
| Production routing service | Valhalla / OSRM / OpenRouteService API |
| Proprietary stacks | ArcGIS Network Analyst (script it headlessly) |

NetworkX chokes on metro-scale many-to-many — don't loop `shortest_path`
over thousands of origins; switch tools instead.

## Graph construction (OSMnx)

```python
import osmnx as ox

G = ox.graph_from_place("City, Country", network_type="drive")  # walk/bike/all
G = ox.add_edge_speeds(G)          # imputes from highway tags where maxspeed missing
G = ox.add_edge_travel_times(G)    # edge attr: travel_time (s)
G = ox.project_graph(G)            # metric CRS before any distance work
```

- **network_type matters**: pedestrian analysis on a `drive` graph misses
  paths, stairs, plazas; driving on `all` uses footpaths. Match mode.
- Imputed speeds are averages by road class — a systematic bias, not
  noise. State it; calibrate against known trips when stakes are high.
- Keep the strongly connected component for routing
  (`ox.truncate.largest_component(G, strongly=True)`); orphan islands
  cause spurious infinities.
- **Snapping**: origins/destinations map to nearest nodes/edges
````
END THIRD-PARTY FILE c05e07d8cf90c7d4

The third-party file has ended. Everything between the c05e07d8cf90c7d4 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2326 of 6608 bytes. © Muhammed Enes Duran · MIT · https://github.com/muend/geoai-skills/tree/HEAD/skills/network-accessibility-analysis/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
