Claude Skill MartBrowse skillsWhat is a Skill?
Back to list

GeoPandas Spatial Analysis Guide

Opinionated GeoPandas guidance plus local audit CLIs for CRS, geometry validity, spatial joins, and safe exports.

Data & AnalyticsAdvanced33,0303,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 install snapshot 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_crs assigns, to_crs transforms), planar unit checks, transform accuracy, precision grids, join cardinality, and an output contract with reopen-and-verify
  • API decisions: directional sjoin predicates (within/contains/covers/dwithin), sjoin_nearest returning all equidistant matches (no k=), type changes and slivers from overlay/clip/dissolve
  • I/O guidance: pyogrio default, GeoPackage for interchange, GeoParquet schema 1.0.0 and its crs key 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_unionunion_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

  1. "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
  2. "My spatial join returned more rows than inputs" → spatial_join_audit.py inspects predicate semantics, duplicate IDs, and one-to-many multiplication, then proposes corrected code with stated cardinality
  3. "I need a customer-location map in a public report" → sensitive_coordinates_checklist.py acts as a release gate, followed by a generalized local draft using explore(tiles=None, tooltip=False, popup=False)

· · · Install guide · · ·

Install in the Claude app (no terminal)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Download 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.

  1. Open a terminal with Claude Code installed.
  2. Clone the repository to a temp folder: git clone https://github.com/K-Dense-AI/scientific-agent-skills.git /tmp/scientific-agent-skills
  3. Create the skills directory: mkdir -p ~/.claude/skills
  4. Copy just this skill: cp -r /tmp/scientific-agent-skills/skills/geopandas ~/.claude/skills/
  5. (Recommended) Prepare the analysis environment: uv venv --python 3.12, then run the uv pip install block from SKILL.md verbatim.
  6. Restart Claude Code and try a prompt like "use the geopandas skill to audit this .gpkg file".
  7. Verify the bundled tools: python ~/.claude/skills/geopandas/scripts/vector_inventory.py --help
  8. If you already have a geospatial project, install the pinned stack in a separate virtualenv to avoid dependency conflicts.