| name | geospatial-viz-guide |
| description | Create maps, choropleths, and spatial data visualizations for research |
| metadata | {"openclaw":{"emoji":"🗺️","category":"analysis","subcategory":"dataviz","keywords":["geospatial","choropleth","maps","GIS","spatial visualization","geopandas"],"source":"wentor-research-plugins"}} |
Geospatial Visualization Guide
A skill for creating maps, choropleths, and spatial data visualizations for research publications. Covers coordinate systems, choropleth maps, point maps, Python geospatial libraries, and cartographic best practices for academic papers.
Geospatial Data Fundamentals
Common Spatial Data Formats
Vector data (discrete features):
- Shapefile (.shp): Legacy standard, multi-file
- GeoJSON (.geojson): Web-friendly, single file
- GeoPackage (.gpkg): Modern SQLite-based, recommended
- KML (.kml): Google Earth format
Raster data (continuous surfaces):
- GeoTIFF (.tif): Georeferenced image
- NetCDF (.nc): Climate and atmospheric data
- HDF5 (.h5): Satellite and remote sensing data
Key concepts:
- CRS (Coordinate Reference System): How 3D Earth maps to 2D
- EPSG:4326 (WGS84): Latitude/longitude (most GPS data)
- EPSG:3857: Web Mercator (Google Maps, web tiles)
- Always check and document your CRS
Choropleth Maps
Building a Choropleth with GeoPandas
import geopandas as gpd
import matplotlib.pyplot as plt
def create_choropleth(shapefile_path: str, data_column: ,
title: , cmap: = ) -> :
gdf = gpd.read_file(shapefile_path)
fig, ax = plt.subplots(, , figsize=(, ))
gdf.plot(
column=data_column,
cmap=cmap,
linewidth=,
edgecolor=,
legend=,
legend_kwds={
: data_column,
: ,
: ,
:
},
ax=ax
)
ax.set_title(title, fontsize=, fontweight=)
ax.axis()
plt.tight_layout()
plt.savefig(, bbox_inches=, dpi=)