원클릭으로
plate-tectonics-geospatial
Analyze plate tectonics data using GeoPandas, identify points within plates, and calculate distances to boundaries.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Analyze plate tectonics data using GeoPandas, identify points within plates, and calculate distances to boundaries.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Handles reading, populating, and saving .docx files using the python-docx library. Use this skill for any tasks involving template filling or modifying Word documents.
Perform various data analysis on SEC 13-F and obtain some insights of fund activities such as number of holdings, AUM, and change of holdings between two quarters.
This skill includes search capability in 13F, such as fuzzy search a fund information using possibly inaccurate name, or fuzzy search a stock cusip info using its name.
A comprehensive PDF toolkit for advanced data extraction and document analysis. Beyond text and table extraction, this tool is optimized for visual layout reasoning: it can map graphical elements to coordinates (such as determining appointment times based on their position on a calendar timeline) and identify color-coded features (e.g., distinguishing high-priority blocks from flexible blue-colored entries). Use this skill when the task requires interpreting schedule layouts, calculating durations from visual spans, or resolving scheduling conflicts based on the spatial and color properties of a PDF document.
Build deterministic, verifiable data visualizations with D3.js (v6). Generate standalone HTML/SVG (and optional PNG) from local data files without external network dependencies. Use when tasks require charts, plots, axes/scales, legends, tooltips, or data-driven SVG output.
invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.
| name | plate-tectonics-geospatial |
| description | Analyze plate tectonics data using GeoPandas, identify points within plates, and calculate distances to boundaries. |
The PB2002 (Plate Boundaries 2002) dataset provides comprehensive data on tectonic plate boundaries and plate definitions. This skill covers loading, processing, and spatial analysis of plate data.
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [[lon1, lat1], [lon2, lat2], ...]
},
"properties": {
"PLATE1": "Pacific",
"PLATE2": "North American",
"TYPE": "subduction zone", // or "transform", "spreading", etc.
"STEPOVER": ""
}
}
]
}
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiPolygon", // or Polygon
"coordinates": [...]
},
"properties": {
"PlateName": "Pacific",
"PlateID": 101
}
}
]
}
import geopandas as gpd
import json
with open('/root/PB2002_boundaries.json', 'r') as f:
boundaries_geojson = json.load(f)
boundaries_gdf = gpd.GeoDataFrame.from_features(
boundaries_geojson['features'],
crs='EPSG:4326'
)
# Filter for specific plate boundary
pacific_boundaries = boundaries_gdf[
(boundaries_gdf['PLATE1'] == 'Pacific') |
(boundaries_gdf['PLATE2'] == 'Pacific')
]
with open('/root/PB2002_plates.json', 'r') as f:
plates_geojson = json.load(f)
plates_gdf = gpd.GeoDataFrame.from_features(
plates_geojson['features'],
crs='EPSG:4326'
)
# Get Pacific plate polygon
pacific_plate = plates_gdf[plates_gdf['PlateName'] == 'Pacific']
# Use spatial join to find earthquakes within Pacific plate
earthquakes_in_pacific = gpd.sjoin(
earthquakes_gdf,
pacific_plate,
how='inner',
predicate='within'
)
# For each earthquake, calculate minimum distance to boundary
def min_distance_to_boundary(point, boundary_lines_gdf):
"""Calculate minimum distance from point to any boundary line"""
min_dist = float('inf')
for idx, boundary in boundary_lines_gdf.iterrows():
dist = point.distance(boundary['geometry'])
if dist < min_dist:
min_dist = dist
return min_dist
# Apply to all earthquakes in the plate
# First, project to projected CRS for accurate distance in km
earthquakes_projected = earthquakes_in_pacific.to_crs('EPSG:3857')
boundaries_projected = pacific_boundaries.to_crs('EPSG:3857')
earthquakes_projected['distance_to_boundary'] = earthquakes_projected.geometry.apply(
lambda point: min_distance_to_boundary(point, boundaries_projected)
)
# Convert from meters to kilometers
earthquakes_projected['distance_km'] = earthquakes_projected['distance_to_boundary'] / 1000
# Find earthquake furthest from boundary
furthest_idx = earthquakes_projected['distance_km'].idxmax()
furthest_earthquake = earthquakes_projected.loc[furthest_idx]
# Ensure polygons are valid before spatial operations
if not plates_gdf.geometry.is_valid.all():
plates_gdf['geometry'] = plates_gdf.geometry.buffer(0)
if not boundaries_gdf.geometry.is_valid.all():
boundaries_gdf['geometry'] = boundaries_gdf.geometry.buffer(0)
# If a plate is represented as MultiPolygon, create a union
pacific_plate_union = pacific_plate.unary_union
# Use Web Mercator (EPSG:3857) for global distances in meters
# Then convert to kilometers
# For regional analysis, consider UTM zones
# EPSG:32633 = UTM Zone 33N
# EPSG:32733 = UTM Zone 33S
.buffer(0) to fix self-intersecting polygons