agentsclimarketplace

Run2 geopandas spatial analysis

Skill cxcscmu/SkillLearnBench/skills/b3-teacher-feedback-gemini-3.1-pro-preview/earthquake-plate-calculation/run2_geopandas_spatial_analysis

[COLM'26] SkillLearnBench is the first benchmark for evaluating continual learning methods that automatically generate agent skills.

Install
npx -y skills add cxcscmu/SkillLearnBench --skill run2_geopandas_spatial_analysis

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

How to perform spatial filtering (point-in-polygon), combine line boundaries, and accurately calculate metric distances between points and boundaries using GeoPandas.

SKILL.md

3.2 KB, 693 tokens by cl100k_base, as published. Nobody here has run it

GeoPandas Spatial Analysis: Filtering and Distance Calculations

When analyzing geospatial data, you often need to find points within a specific area (spatial filtering) and determine how far those points are from a specific feature (distance calculation).

1. Spatial Filtering (Point-in-Polygon)

To find which points (e.g., earthquakes) fall within a specific polygon (e.g., a tectonic plate), use spatial joins or the .within() / .intersects() methods.

import geopandas as gpd

# Load data
points_gdf = gpd.read_file("points.json")
polygons_gdf = gpd.read_file("polygons.json")

# Filter for the target polygon (e.g., 'Pacific' plate)
target_polygon = polygons_gdf[polygons_gdf['PlateName'] == 'Pacific']

# Find points strictly within the target polygon
points_within = gpd.sjoin(points_gdf, target_polygon, predicate='within')

2. Combining Boundaries for Distance Calculation

When your boundary data (LineStrings/MultiLineStrings) consists of multiple segments, you must combine them into a single unified geometry before measuring distances. Otherwise, distance calculations will not work as expected across the entire boundary.

# Load boundary data
boundaries_gdf = gpd.read_file("boundaries.json")

# Filter boundary segments associated with the target plate if necessary
target_boundaries = boundaries_gdf[boundaries_gdf['plate_attribute'] == 'Pacific']

# Combine all relevant boundary segments into a single geometry
combined_boundary = target_boundaries.geometry.unary_union

3. Coordinate System Projection (Crucial Step)

Warning: Never calculate distances directly in geographic coordinate systems like EPSG:4326 (WGS 84). The result will be in degrees, which is completely inaccurate for distance measurements.

Before calculating distances, you must project both your points and your combined boundary geometry to a metric coordinate reference system (CRS). For global, flat distance calculations, EPSG:4087 (WGS 84 / World Equidistant Cylindrical) is a standard choice.

# Project the points to EPSG:4087
points_metric = points_within.to_crs(epsg=4087)

# Project the boundary GeoDataFrame to EPSG:4087 BEFORE applying unary_union, 
# OR project the points first, then use a CRS-aware Series for the boundary.
target_boundaries_metric = target_boundaries.to_crs(epsg=4087)
combined_boundary_metric = target_boundaries_metric.geometry.unary_union

4. Distance Calculation and Unit Conversion

Once both the points and the combined boundary are in a metric CRS, use the .distance() method to find the shortest distance from each point to the boundary.

Metric projections calculate distance in meters. To obtain kilometers, divide the resulting values by 1000.

# Calculate distances (in meters)
points_within['distance_m'] = points_metric.geometry.distance(combined_boundary_metric)

# Convert to kilometers
points_within['distance_km'] = points_within['distance_m'] / 1000

# Optional: Round to 2 decimal places
points_within['distance_km'] = points_within['distance_km'].round(2)

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most research analysis skills give in 693 tokens

Counted across 1,063 of the 1,754 authors here whose files we hold, read 2026-08-07

  • Generate a markdown reportin 32 of 1063, across 23 files
  • Cite each claim's sourcein 30 of 1063, across 15 files
  • Define the ideal customer profilein 20 of 1063, across 2 files
  • Search for companies matching the criteriain 20 of 1063, across 2 files
  • Assign a fit score from one to tenin 20 of 1063, across 2 files
  • Analyze the codebase to understand the productin 19 of 1063, across 1 file
  • Ask clarifying questions about the value propositionin 19 of 1063, across 1 file
  • Look for signals of immediate needin 19 of 1063, across 1 file
  • Identify the target decision maker rolein 19 of 1063, across 1 file
  • Suggest a personalized contact strategyin 19 of 1063, across 1 file
  • Provide conversation starters for outreachin 19 of 1063, across 1 file
  • Format results in a scannable markdown templatein 19 of 1063, across 1 file

Said here and by no other author read

  • use spatial joins for point-in-polygon filtering
  • combine boundary segments before measuring distances
  • project geometries to a metric coordinate reference system
  • project boundary geometries before applying unary union
  • calculate distances using projected geometries
  • convert meter distances to kilometers by dividing by 1000

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 327,132. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.