agentsclimarketplace

Run2 Load and Validate Earthquake Data

Skill cxcscmu/SkillLearnBench/skills/b3-teacher-feedback-claude-haiku-4-5/earthquake-plate-calculation/run2_Load-and-Validate-Earthquake-Data

Load earthquake data from GeoJSON format and validate that it contains required fields (id, time, magnitude, latitude, longitude, place). Use this skill when initializing the analysis to ensure data integrity before processing.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill run2_Load-and-Validate-Earthquake-Data

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

SKILL.md

1.3 KB, 240 tokens by cl100k_base, as published. Nobody here has run it

import json
import geopandas as gpd
from shapely.geometry import Point

def load_earthquake_data(filepath):
    """
    Load earthquake data from GeoJSON and convert to GeoDataFrame.
    
    Args:
        filepath: Path to earthquakes_2024.json
        
    Returns:
        GeoDataFrame with earthquake points and attributes
    """
    with open(filepath, 'r') as f:
        data = json.load(f)
    
    earthquakes = []
    for feature in data['features']:
        props = feature['properties']
        coords = feature['geometry']['coordinates']
        
        # Validate required fields
        required = ['id', 'time', 'mag', 'place']
        if not all(k in props for k in required):
            continue
            
        earthquakes.append({
            'id': props['id'],
            'time': props['time'],
            'magnitude': props['mag'],
            'place': props['place'],
            'geometry': Point(coords[0], coords[1])
        })
    
    gdf = gpd.GeoDataFrame(earthquakes, crs='EPSG:4326')
    return gdf

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.