Guide for creating DAAF agent definition files. Covers 12-section template, hook registration, skills-in-frontmatter, integration checklist. Use when adding or revising agents. For SKILL.md files, use skill-authoring instead.
中文简介正在准备中。当前显示原文说明。
Spatial data: GeoDataFrames, spatial joins, CRS/projections, choropleth/interactive maps, spatial autocorrelation, PySAL. Use for geographic data, spatial files (Shapefile, GeoPackage, GeoParquet), or spatial stats. For charts without GIS use plotly. R equivalent: sf-terra (use when execution language is R).
中文简介正在准备中。当前显示原文说明。
实测评分 未实测
查看安装方法安装前可以查看交给 AI 代理的指令内容。
geopandas spatial data library for Python: manipulation, analysis, and visualization of geographic data. Covers GeoDataFrames, spatial joins, CRS/projections, vector operations, raster integration (rasterio, xarray), choropleth mapping, interactive maps (folium), basemap tiles (contextily), spatial autocorrelation, and the PySAL ecosystem. Use when working with geographic data, reading/writing spatial files (Shapefile, GeoPackage, GeoParquet), making maps, or running spatial statistics. For interactive web-based geographic charts without spatial analysis, use plotly.
Comprehensive skill for spatial data analysis with geopandas and the broader Python geospatial stack. Use the decision trees below to find the right guidance, then load detailed references as needed.
This skill targets geopandas 1.x (tested with 1.1.3). Key changes from earlier versions:
cascaded_union removed — use union_all() insteadGeoSeries.unary_union property renamed to GeoSeries.union_all() methodGeoPandas extends pandas with spatial data types and operations:
.explore()), and GPU-accelerated rendering (lonboard)| File | Purpose | When to Read |
|---|---|---|
quickstart.md | Installation, GeoDataFrame creation, basic I/O and plotting | Starting with geopandas |
data-io.md | File formats, pyogrio, web data, spatial databases | Loading/saving spatial data |
crs-projections.md | CRS fundamentals, reprojecting, choosing projections | CRS errors or projection decisions |
spatial-operations.md | Spatial joins, overlays, dissolve, clip, buffer, distance | Combining or transforming spatial data |
raster-integration.md | rasterio, xarray/rioxarray, zonal statistics | Working with raster data |
visualization.md | Static maps, interactive maps, basemaps, classification | Making maps and figures |
pysal-spatial-stats.md | Spatial weights, autocorrelation, LISA, spatial regression | Spatial statistics and modeling |
gotchas.md | CRS mismatches, invalid geometries, common errors | Debugging spatial issues |
quickstart.md then spatial-operations.mdvisualization.md (relies on crs-projections.md for projection choices)pysal-spatial-stats.md (for methodology context, also load data-scientist skill's geospatial-analysis.md)gotchas.md firstThe reference-file routing in this skill applies to advisory and brainstorming turns as much as implementation. Recommending an approach, reviewing a plan, or answering a question that touches a routed topic calls for reading the routed reference file just as much as writing code does — the reference files carry curated caveats and environment-specific constraints that this overview and general knowledge lack.
geospatial-analysis.md, geospatial-operations.md): Spatial methodology — when/why to use spatial methods, interpretation guidance, MAUP, ecological fallacy. Load alongside this skill for research workflows.Loading/saving spatial data?
├─ Read vector file (Shapefile, GeoPackage, GeoJSON) → ./references/data-io.md
├─ Read GeoParquet → ./references/data-io.md
├─ Read from PostGIS / DuckDB Spatial → ./references/data-io.md
├─ Download boundaries (Census, OSM) → ./references/data-io.md
├─ Create GeoDataFrame from lat/lon columns → ./references/quickstart.md
├─ Write to file → ./references/data-io.md
└─ Read raster data (GeoTIFF) → ./references/raster-integration.md
Spatial operations?
├─ Join by location (point-in-polygon, etc.) → ./references/spatial-operations.md
├─ Join by nearest feature → ./references/spatial-operations.md
├─ Overlay (intersection, union, difference) → ./references/spatial-operations.md
├─ Dissolve (merge polygons by attribute) → ./references/spatial-operations.md
├─ Clip to boundary → ./references/spatial-operations.md
├─ Buffer features → ./references/spatial-operations.md
├─ Compute distances → ./references/spatial-operations.md
├─ Compute centroids or areas → ./references/spatial-operations.md
└─ Areal interpolation (mismatched boundaries) → ./references/spatial-operations.md
CRS/projection issues?
├─ Check current CRS → ./references/crs-projections.md
├─ Reproject to different CRS → ./references/crs-projections.md
├─ Choose a projection for analysis → ./references/crs-projections.md
├─ Data has no CRS (set it) → ./references/crs-projections.md
├─ CRS mismatch error → ./references/gotchas.md
└─ Area/distance calculations wrong → ./references/crs-projections.md
Making maps?
├─ Quick static choropleth → ./references/visualization.md
├─ Classification schemes (quantiles, Fisher-Jenks) → ./references/visualization.md
├─ Add basemap tiles → ./references/visualization.md
├─ Interactive map (pan/zoom/hover) → ./references/visualization.md
├─ Large dataset (millions of features) → ./references/visualization.md
├─ Multi-panel / faceted maps → ./references/visualization.md
├─ LISA cluster map → ./references/pysal-spatial-stats.md
└─ Export to PNG/SVG/HTML → ./references/visualization.md
Spatial statistics?
├─ Build spatial weights matrix → ./references/pysal-spatial-stats.md
├─ Test for spatial autocorrelation (Moran's I) → ./references/pysal-spatial-stats.md
├─ Find hot spots / cold spots (LISA) → ./references/pysal-spatial-stats.md
├─ Spatial regression (lag, error, Durbin) → ./references/pysal-spatial-stats.md
├─ Point pattern analysis → ./references/pysal-spatial-stats.md
└─ Methodology guidance (interpretation, MAUP) → data-scientist skill: geospatial-analysis.md
Raster operations?
├─ Read GeoTIFF → ./references/raster-integration.md
├─ Zonal statistics (summarize raster by polygons) → ./references/raster-integration.md
├─ Clip/mask raster by polygon → ./references/raster-integration.md
├─ Extract raster values at points → ./references/raster-integration.md
├─ Multidimensional raster (xarray) → ./references/raster-integration.md
└─ Rasterize vectors / vectorize rasters → ./references/raster-integration.md
Having issues?
├─ CRS mismatch errors → ./references/gotchas.md
├─ Invalid geometry errors → ./references/gotchas.md
├─ Spatial join produced wrong row count → ./references/gotchas.md
├─ Memory issues with large files → ./references/gotchas.md
├─ Shapely version confusion → ./references/gotchas.md
├─ Coordinate order (lon/lat vs lat/lon) → ./references/gotchas.md
└─ General troubleshooting → ./references/gotchas.md
Important: In data research pipelines (see CLAUDE.md), spatial operations are executed through script files, not interactively. This ensures auditability and reproducibility.
The pattern:
scripts/stage{N}_{type}/{step}_{task-name}.pyClosely read agent_reference/SCRIPT_EXECUTION_REFERENCE.md for the mandatory file-first execution protocol covering complete code file writing, output capture, and file versioning rules.
See:
agent_reference/SCRIPT_EXECUTION_REFERENCE.md — Script execution protocol and format with validationThe examples in reference files show geopandas syntax. In research workflows, wrap them in scripts following the file-first pattern.
import geopandas as gpd
from shapely.geometry import Point, Polygon, LineString, MultiPolygon
| Operation | Code |
|---|---|
| Read file | gpd.read_file("data.gpkg") |
| Read Parquet | gpd.read_parquet("data.parquet") |
| From lat/lon | gpd.GeoDataFrame(df, geometry=gpd.points_from_xy(df.lon, df.lat), crs="EPSG:4326") |
| Check CRS | gdf.crs |
| Reproject | gdf.to_crs(epsg=5070) |
| Spatial join | gpd.sjoin(points, polygons, predicate="within") |
| Nearest join | gpd.sjoin_nearest(gdf1, gdf2, max_distance=1000) |
| Overlay | gpd.overlay(gdf1, gdf2, how="intersection") |
| Dissolve | gdf.dissolve(by="state") |
| Buffer | gdf.buffer(1000) (in CRS units) |
| Centroid | gdf.centroid |
| Area | gdf.area (project first) |
| Distance | gdf1.distance(gdf2) |
| Clip | gpd.clip(gdf, mask) |
| Plot | gdf.plot(column="value", legend=True) |
| Interactive map | gdf.explore(column="value") |
| Write file | gdf.to_file("out.gpkg") |
| Write Parquet | gdf.to_parquet("out.parquet") |
| EPSG | Name | Use For |
|---|---|---|
| 4326 | WGS84 | Storage, exchange, web (not analysis) |
| 5070 | NAD83 Conus Albers | US thematic maps (equal-area) |
| 3857 | Web Mercator | Web tiles display only |
| 32617 | UTM Zone 17N | US East Coast local analysis |
| Topic | Reference File |
|---|---|
| Installation | ./references/quickstart.md |
| GeoDataFrame creation | ./references/quickstart.md |
| Basic plotting | ./references/quickstart.md |
| File formats (GeoPackage, Shapefile, GeoJSON) | ./references/data-io.md |
| GeoParquet | ./references/data-io.md |
| pyogrio engine | ./references/data-io.md |
| Web data (OSM, Census, WFS) | ./references/data-io.md |
| Spatial databases (PostGIS, DuckDB) | ./references/data-io.md |
| CRS fundamentals | ./references/crs-projections.md |
| Reprojection | ./references/crs-projections.md |
| Choosing projections | ./references/crs-projections.md |
| Common US projections | ./references/crs-projections.md |
| Spatial joins | ./references/spatial-operations.md |
| Nearest-neighbor joins | ./references/spatial-operations.md |
| Overlay operations | ./references/spatial-operations.md |
| Dissolve and aggregation | ./references/spatial-operations.md |
| Buffering | ./references/spatial-operations.md |
| Clipping | ./references/spatial-operations.md |
| Areal interpolation | ./references/spatial-operations.md |
| rasterio basics | ./references/raster-integration.md |
| xarray / rioxarray | ./references/raster-integration.md |
| Zonal statistics | ./references/raster-integration.md |
| Raster-vector conversion | ./references/raster-integration.md |
| Choropleth maps | ./references/visualization.md |
| Classification schemes | ./references/visualization.md |
| Basemap tiles (contextily) | ./references/visualization.md |
| Interactive maps (folium) | ./references/visualization.md |
| GPU rendering (lonboard) | ./references/visualization.md |
| Exporting maps | ./references/visualization.md |
| Spatial weights | ./references/pysal-spatial-stats.md |
| Moran's I | ./references/pysal-spatial-stats.md |
| LISA cluster maps | ./references/pysal-spatial-stats.md |
| Spatial regression | ./references/pysal-spatial-stats.md |
| Point pattern analysis | ./references/pysal-spatial-stats.md |
| Cartopy publication maps | ./references/visualization.md |
| Datashader massive point rendering | ./references/visualization.md |
| Join count statistics | ./references/pysal-spatial-stats.md |
| Ripley's functions (G, F, K) | ./references/pysal-spatial-stats.md |
| CRS mismatch errors | ./references/gotchas.md |
| Invalid geometries | ./references/gotchas.md |
| Spatial join row count issues | ./references/gotchas.md |
| Memory with large files | ./references/gotchas.md |
| Shapely 2.x changes | ./references/gotchas.md |
| Coordinate order confusion | ./references/gotchas.md |
When this library is used as a primary analytical tool, include in the report's Software & Tools references:
Jordahl, K. et al. geopandas: Python tools for geographic data [Computer software]. https://geopandas.org/
Cite when: geopandas is used for spatial operations, spatial joins, or map visualization central to the analysis. Do not cite when: Only used to read a shapefile for a simple reference lookup.
If PySAL spatial analysis functions are also used (spatial weights, Moran's I, etc.), additionally cite:
Rey, S.J. et al. (2022). "The PySAL Ecosystem of Open-Source Python Packages for the Analysis of Spatial Data." Geographical Analysis, 54(3), 467-487.
For method-specific citations (e.g., spatial statistics techniques),
consult the reference files in this skill and agent_reference/CITATION_REFERENCE.md.
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Guide for creating DAAF agent definition files. Covers 12-section template, hook registration, skills-in-frontmatter, integration checklist. Use when adding or revising agents. For SKILL.md files, use skill-authoring instead.
中文简介正在准备中。当前显示原文说明。
Researcher-facing analytic triangulation ("creative verification") for stress-testing provisional findings and designing pre-specified challenges before an analysis runs. Turns a researcher's concern or focal claim into competing explanations, bounded discriminating tests, audited diagnostic artifacts, and evidence-calibrated interpretations in a hypothesis/evidence ledger — behavioral, output-level verification replacing line-by-line code review. Covers 12 challenge families organized by Shadish-Cook-Campbell validity type, named sensitivity statistics, pre-committed interpretation rules, anti-fishing guardrails, and interactive diagnostic-artifact QA. Use in Ad Hoc Collaboration to verify, challenge, or stress-test a result, or to design discriminating tests before an analysis runs. Not code-change verification (verify skill / code review) and not final adjudication or re-execution (data-verifier, Reproducibility Verification) — prospective, hypothesis-driven challenge design of analytic claims.
中文简介正在准备中。当前显示原文说明。
In-situ smoke testing that verifies a LIVE DAAF deployment functions end-to-end in whatever provider route it is configured for. Auto-detects the active install route (anthropic-subscription, openrouter, chatgpt-subscription shim, openai-api shim) and runs tiered probes: Tier 0 free preflight (route/env coherence, hooks, statuslines, shim health); Tier 1 one live round-trip (~cents); Tier 2 a six-probe functional battery (dispatch, coding, web, skill loading, isolation-strip, nested-dispatch deny); Tier D a zero-cost deterministic battery (bats, Pester, lint, safety-hook tests). Use after install, after a rebuild or update, after any provider/config change (new API key, model remap, shim change), for pre-release validation, or when asked "is my install working" or to "smoke test the deployment/config." Requires the DAAF_DEV=1 dev image; a contributor tool, not end-user-facing. NOT DAAFBench (model behavioral-adherence evaluation under benchmarks/) and NOT scripts/smoke_tests/ (R/Python library-package smoke tests).
中文简介正在准备中。当前显示原文说明。
Operational framework for the DAAF orchestrator. Defines engagement modes, confirmation protocol, subagent dispatch, context budget, and reference-loading. Loaded exclusively by the orchestrator — not for subagents or user questions.
中文简介正在准备中。当前显示原文说明。
Data science methodology and method-selection routing for quantitative research. Covers EDA, data validation, descriptive analysis, causal inference (IV, DiD, RD, synthetic control), clustering/PCA/UMAP, supervised ML, geospatial analysis, network analysis, and visualization design. Contains the canonical method-to-library routing tree, routed by execution language — Python: statsmodels (OLS/GLM/time series), pyfixest (FE/DiD), linearmodels (RE/GMM/SUR), svy (complex surveys), scikit-learn (clustering/prediction ML), geopandas (spatial), igraph (network analysis); R: r-stats (OLS/GLM/time series), fixest (FE/DiD), plm (panel/RE/IV), survey-r (complex surveys), tidymodels (ML), sf-terra (spatial), igraph-r (network analysis). Load the routed tool-specific skill before giving tool-specific advice or writing code — library skills encode environment constraints and curated caveats absent from general knowledge.
中文简介正在准备中。当前显示原文说明。
Interpretation guidance for Urban Institute Education Data Portal datasets. The Portal is a curation layer over federal data: lowercase variable names, integer-encoded categoricals, standardized missing codes (-1 missing, -2 not applicable, -3 suppressed). Covers year definitions, grade encoding (grade=-1 is Pre-K, not missing), suppression rates, ODC-By licensing, and cross-source join identifiers. Load before analyzing any Portal data. Routes to source-specific deep-dive skills for individual datasets.
中文简介正在准备中。当前显示原文说明。