microck/ordinary-claude-skills
Overview
This skill provides a compact, practical guide to using GeoPandas for geospatial vector data workflows. It covers reading and writing common formats, core data structures, CRS management, spatial analysis, and visualization. The content emphasizes concrete commands and typical workflows for transforming, analyzing, and exporting geographic data. It is aimed at Python users who need reliable, repeatable spatial data processing.
How this skill works
GeoPandas extends pandas with GeoSeries and GeoDataFrame to store and operate on geometry objects using Shapely under the hood. It reads/writes shapefiles, GeoJSON, GeoPackage, Parquet, and PostGIS, and performs spatial operations like joins, overlays, buffers, and dissolves. CRS handling and reprojection are built in to ensure correct area/distance calculations. Integration points include matplotlib/folium/cartopy for mapping and pyarrow for faster I/O.
When to use it
- Loading or converting vector geospatial files (Shapefile, GeoJSON, GPKG, Parquet, PostGIS)
- Performing spatial joins, overlays, or nearest-neighbor queries between datasets
- Calculating areas, distances, buffers, centroids, or dissolving boundaries
- Reprojecting data to the appropriate CRS for analysis or display
- Creating quick choropleth maps or interactive maps for exploration
- Preparing cleaned, aggregated spatial data for export or database load
Best practices
- Always inspect and set/check the CRS before spatial operations
- Use a projected CRS for area/distance calculations and geographic CRS for lat/lon display
- Validate geometries (.is_valid) and fix or drop invalid features before analysis
- Use GeoPackage or Parquet with Arrow for modern I/O instead of legacy Shapefiles
- Use spatial indexing and bbox/mask parameters to limit reads for large datasets
- Apply vectorized operations and .copy() when modifying geometry columns to avoid side effects
Example use cases
- Buffer analysis: create buffers around points/lines and intersect with polygons to find impacts
- Spatial join: attach polygon attributes to point incidents for aggregation and mapping
- Clipping and overlay: intersect two layers to produce a new feature set for targeted areas
- Reproject and calculate area: convert to EPSG:3857 (or appropriate local projection) and compute accurate areas
- Export workflows: read mixed sources, join/aggregate, and write results to a GeoPackage or PostGIS table
FAQ
Yes. Read/write with read_postgis/to_postgis using psycopg2 or geoalchemy2 for connections and ensure the geom column and CRS are handled correctly.
How do I speed up large file reads/writes?
Use use_arrow=True for Parquet/GPKG where supported, filter by bbox or SQL during read, and simplify geometries or use spatial indexes to reduce complexity.
5 skills
This skill helps you perform advanced geospatial analysis using GeoPandas, enabling reading, transforming, joining, and visualizing geographic data efficiently.
This skill helps you create interactive, publication-quality visualizations in Python using Plotly Express and graph objects for quick charts and fine-grained
This skill conducts comprehensive cryptocurrency research by coordinating multiple AI agents to analyze market trends, assets, and opportunities.
This skill enables rapid access to AlphaFold's predicted protein structures by UniProt, with download of mmCIF/PDB files and confidence metrics.
This skill helps you implement Stripe payments and subscriptions in Next.js projects, including checkout, webhooks, and customer management.