agentsclimarketplace

Run1 geopandas spatial filtering

Skill cxcscmu/SkillLearnBench/skills/b3-teacher-feedback-gemini-3-flash-preview/earthquake-plate-calculation/run1_geopandas-spatial-filtering

Use GeoPandas to filter points within a specific polygon, such as finding earthquakes within a specific tectonic plate.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill run1_geopandas-spatial-filtering

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

SKILL.md

1.0 KB, 206 tokens by cl100k_base, as published. Nobody here has run it

To filter points based on their location within a polygon:

  1. Load the polygon data (e.g., plate geometries) and the point data (e.g., earthquakes) into GeoDataFrames.
  2. Ensure both GeoDataFrames use the same Coordinate Reference System (CRS), typically WGS84 (EPSG:4326).
  3. Identify the target polygon (e.g., the Pacific Plate, often abbreviated as 'PA' in PB2002 datasets).
  4. Use the .within() predicate or a spatial join gpd.sjoin() to filter the points.
import geopandas as gpd

# Load datasets
plates = gpd.read_file('plates.json')
points = gpd.read_file('points.json')

# Extract specific plate (e.g., Pacific Plate 'PA')
pacific_plate = plates[plates['Code'] == 'PA'].geometry.iloc[0]

# Filter points within the polygon
points_in_plate = points[points.within(pacific_plate)]

What ships with it

Read from the repository

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

Keep looking

Skills are one crate of 325,949. 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.