Project: Spatial Accessibility Analysis
This capstone turns the 24-lesson path into one auditable local workflow. It validates CRS, units, geometry, identifiers, link endpoints, lengths, and uncertainty; filters the network to a declared accessibility requirement; computes nearest-service routes; and writes byte-stable JSON evidence.
Prerequisites
Complete cloud-native geospatial data and the preceding lessons. You should distinguish Euclidean, network, and travel-time distance, and exploratory summaries from predictive or causal evidence.
Learning goals
- Validate projected geometry and network semantics before routing.
- Compute nominal shortest paths under an explicit step-free edge contract.
- Propagate simple link bounds without mislabeling them probability intervals.
- Preserve synthetic-data, population, policy, prediction, and causal limitations in the artifact.
Project contract
- Input: one repository-owned GeoJSON feature collection in
EPSG:32633; no account, credential, API, download, or external population data. - Geometry: six unique point nodes and seven valid lines; each line must meet its declared endpoints and its metre length must equal projected endpoint distance.
- Network: undirected links, nominal distance cost, and
step_free == true; the stairs link is excluded rather than assigned an arbitrary penalty. - Service rule: choose the minimum nominal distance to clinic or library; service ID breaks exact ties; the teaching threshold is 1,500 m.
- Uncertainty: sum declared absolute link bounds along the selected nominal route. The result is a stress interval, not a confidence or credible interval, and does not examine route switching.
- Evidence: stable key and row order, explicit route paths, unweighted summary, claim boundaries, and limitations; two runs must be byte-identical.
Run the capstone
From the repository root:
npm run project:geospatial-accessibility -- --output /tmp/geospatial-accessibility.json
Review the artifact itself. input_contract records validation and units; routing_contract states costs and exclusions; origin_results exposes every selected path; summary says it is unweighted; uncertainty names what its bounds mean; and claim_boundaries prevents the synthetic scenario from becoming a population or policy claim.
Worked example
import json
import subprocess
import sys
import tempfile
from pathlib import Path
command = Path("scripts/run-geospatial-accessibility-project.py")
with tempfile.TemporaryDirectory() as directory:
first = Path(directory) / "first.json"
second = Path(directory) / "second.json"
for output in (first, second):
subprocess.run([sys.executable, str(command), "--output", str(output)],
check=True, capture_output=True)
evidence = json.loads(first.read_text(encoding="utf-8"))
west = next(result for result in evidence["origin_results"] if result["origin"] == "west")
print(f"byte_stable={first.read_bytes() == second.read_bytes()} crs={evidence['input_contract']['crs']} geometry_validated={evidence['input_contract']['geometry_validated']}")
print(f"origins={evidence['summary']['origins']} within_1500m={evidence['summary']['within_threshold']} unweighted_share={evidence['summary']['unweighted_share']:.3f}")
print(f"west_service={west['nearest_service']} distance_m={west['nominal_distance_m']} interval_m={west['distance_interval_m']}")
print(f"excluded={evidence['routing_contract']['excluded_links']} causal={evidence['claim_boundaries']['causal_interpretation']} policy={evidence['claim_boundaries']['policy_recommendation']}")
Expected output:
byte_stable=True crs=EPSG:32633 geometry_validated=True
origins=3 within_1500m=2 unweighted_share=0.667
west_service=clinic distance_m=2000 interval_m=[1950, 2050]
excluded=['west-north-stairs'] causal=False policy=False
East and north are within the nominal threshold; west is not. No population weighting is possible because the fixture contains no population observations. Equal origin weighting is a transparent teaching summary, not a statement about people served.
Extending the project responsibly
A real analysis needs a versioned network, direction and turn rules, travel mode, impedance or timetable, service hours and capacity, origin construction, population coverage and uncertainty, barriers, disconnected cases, privacy review, validation against observed travel, and sensitivity to thresholds and zoning. Equity questions require substantively justified groups and denominators. Policy evaluation requires a counterfactual design; an accessibility map alone is descriptive.
Limitations and common mistakes
- Straight link length omits slope, crossings, surface, safety, delay, closures, and user-specific constraints.
- A shortest nominal route can change when link costs vary; the interval does not solve robust routing.
- Facility proximity does not measure availability, quality, affordability, eligibility, or realized use.
- Area or origin summaries must not be used to infer individual behavior.
- Byte stability proves reproducibility in the declared environment, not factual validity or fairness.
Practice
Add a time-varying closure without changing the original fixture. First define the observation time, fallback behavior, unreachable representation, route-switching sensitivity, and evidence-schema version. Then check that two runs remain byte-identical.
Next steps
The 24-lesson Geospatial Data Science path is complete. Revisit coordinates, geometry, and spatial questions and trace how feature support, CRS, uncertainty, privacy, dependence, validation, aggregation, and deployment claims constrain this final result.
Primary sources
Checked 2026-10-18: OGC, Simple Features Access; OGC, Topic 2—Referencing by Coordinates; NetworkX 3.7, shortest paths reference; W3C/OGC, Responsible Use of Spatial Data.