GeoPandas Spatial Analysis Guide
Opinionated GeoPandas guidance plus local audit CLIs for CRS, geometry validity, spatial joins, and safe exports.
Data & AnalyticsAdvanced★ 33,030⑂ 3,248AI score 8/10Last updated: Aug 9, 2026
What it does
Provides rules and deterministic tooling that catch the classic failure modes of Python vector geodata work with GeoPandas.
- Reproducible environment: a pinned
uv pip installsnapshot for GeoPandas 1.1.4 with numpy, pandas, shapely, pyproj, pyogrio, pyarrow - Eight correctness gates: provenance/hashes, separating null vs empty vs invalid geometries, required CRS metadata (
set_crsassigns,to_crstransforms), planar unit checks, transform accuracy, precision grids, join cardinality, and an output contract with reopen-and-verify - API decisions: directional
sjoinpredicates (within/contains/covers/dwithin),sjoin_nearestreturning all equidistant matches (nok=), type changes and slivers fromoverlay/clip/dissolve - I/O guidance: pyogrio default, GeoPackage for interchange, GeoParquet schema 1.0.0 and its
crskey semantics, parameterized SQL + transactions for PostGIS - Privacy contract: exact coordinates, addresses, parcels and trajectories treated as sensitive; generalize before publishing; no automatic URL/
/vsi*/archive loading - Six bundled local CLIs: vector inventory, CRS reprojection plan, geometry validity report, spatial join audit, export plan, sensitive-coordinates checklist
Who it's for
- Analysts and researchers working with administrative, real-estate, logistics, or environmental vector data
- Developers migrating code from GeoPandas 0.14 to 1.x (checklist covers PyGEOS removal,
op=→predicate=,unary_union→union_all()) - Anyone who has ever produced wrong areas or distances because of a CRS mistake
- Teams that must publish geodata containing personal location information
Examples
- "Why are the polygon areas in this GeoPackage wrong?" → checks whether the CRS is geographic (EPSG:4326), recommends a justified projected/equal-area CRS, and runs
geometry_validity_report.py - "My spatial join returned more rows than inputs" →
spatial_join_audit.pyinspects predicate semantics, duplicate IDs, and one-to-many multiplication, then proposes corrected code with stated cardinality - "I need a customer-location map in a public report" →
sensitive_coordinates_checklist.pyacts as a release gate, followed by a generalized local draft usingexplore(tiles=None, tooltip=False, popup=False)
· · · Install guide · · ·
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 Claude Skill Mart. Copy the skills/geopandas folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/geopandas/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git /tmp/scientific-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/scientific-agent-skills/skills/geopandas ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal with Claude Code installed.
- Clone the repository to a temp folder:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git /tmp/scientific-agent-skills - Create the skills directory:
mkdir -p ~/.claude/skills - Copy just this skill:
cp -r /tmp/scientific-agent-skills/skills/geopandas ~/.claude/skills/ - (Recommended) Prepare the analysis environment:
uv venv --python 3.12, then run theuv pip installblock from SKILL.md verbatim. - Restart Claude Code and try a prompt like "use the geopandas skill to audit this .gpkg file".
- Verify the bundled tools:
python ~/.claude/skills/geopandas/scripts/vector_inventory.py --help - If you already have a geospatial project, install the pinned stack in a separate virtualenv to avoid dependency conflicts.
View source on GitHub ↗License: MIT