Run2 Calculate Distance to Nearest Pacific Boundary
Combine all Pacific plate boundary geometries using `.unary_union` and calculate the distance from each earthquake to this combined boundary geometry. Returns the minimum distance in kilometers for each earthquake.From its SKILL.md
npx -y skills add cxcscmu/SkillLearnBench --skill run2_Calculate-Distance-to-Nearest-Pacific-BoundaryAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
1.1 KB, 167 tokens by cl100k_base, as published. Nobody here has run it
def calculate_distances_to_boundary(earthquakes_proj, boundaries_proj):
"""
Calculate distance from each earthquake to the nearest Pacific boundary.
Args:
earthquakes_proj: GeoDataFrame with earthquakes in EPSG:4087
boundaries_proj: GeoDataFrame with Pacific boundaries in EPSG:4087
Returns:
GeoDataFrame with added 'distance_km' column
"""
# Combine all boundary geometries into single geometry
combined_boundaries = boundaries_proj.geometry.unary_union
# Calculate distance from each earthquake to combined boundary
# EPSG:4087 uses meters, so divide by 1000 for kilometers
earthquakes_proj['distance_km'] = earthquakes_proj.geometry.distance(
combined_boundaries
) / 1000
return earthquakes_proj
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.