Skip to content
marine-safety-incidents logo

Marine Safety Incidents Skill

marine-safety-incidents

Collect, analyze, and report marine safety incident data from 7 global maritime authorities. Use for incident scraping, safety trend analysis, risk assessment, geographic hotspot identification, and marine safety reporting.

mattnigh/skills_collection0installs24stars

SKILL.md

Full skill instructions

Marine Safety Incidents Skill

Collect, analyze, and report marine safety incident data from global maritime authorities including USCG, NTSB, BSEE, IMO, and more.

When to Use

  • Marine safety incident data collection and scraping
  • Safety trend analysis and risk assessment
  • Geographic hotspot identification
  • Incident type classification and severity analysis
  • Environmental impact assessment from marine incidents
  • Regulatory compliance reporting
  • Root cause analysis

Prerequisites

  • Python environment with worldenergydata package installed
  • Database connection (PostgreSQL recommended)
  • API keys for relevant data sources (if applicable)

Analysis Types

1. Incident Data Collection

Scrape and import incident data from multiple sources.

marine_safety:
  collection:
    flag: true
    sources:
      - uscg       # US Coast Guard
      - ntsb       # National Transportation Safety Board
      - bsee       # Bureau of Safety and Environmental Enforcement
      - imo        # International Maritime Organization
      - maib       # UK Marine Accident Investigation Branch
      - atsb       # Australian Transport Safety Bureau
      - tsb        # Canadian Transportation Safety Board
    date_range:
      start: "2020-01-01"
      end: "2024-12-31"
    output:
      database: "marine_safety_db"
      format: "normalized"

2. Trend Analysis

Analyze incident trends over time.

marine_safety:
  trend_analysis:
    flag: true
    grouping:
      - by_year
      - by_month
      - by_incident_type
      - by_severity
    metrics:
      - incident_count
      - fatality_rate
      - injury_rate
      - environmental_impact_score
    output:
      report_file: "results/​safety_trends.html"
      data_file: "results/​trend_data.csv"

3. Geographic Analysis

Identify incident hotspots and high-risk areas.

marine_safety:
  geographic_analysis:
    flag: true
    regions:
      - gulf_of_mexico
      - north_sea
      - asia_pacific
    clustering:
      method: "dbscan"
      eps: 50  # km
    output:
      map_file: "results/​incident_hotspots.html"
      summary: "results/​geographic_summary.json"

4. Risk Assessment

Calculate risk scores for vessel types and operations.

marine_safety:
  risk_assessment:
    flag: true
    vessel_types:
      - tanker
      - cargo
      - offshore_platform
      - drilling_rig
    factors:
      - historical_incidents
      - environmental_conditions
      - operational_complexity
    output:
      risk_matrix: "results/​risk_matrix.csv"
      recommendations: "results/​risk_recommendations.md"

Python API

Data Collection

from worldenergydata.modules.marine_safety.scrapers import MarineSafetyScraper
from worldenergydata.modules.marine_safety.database import IncidentDatabase

# Initialize scraper
scraper = MarineSafetyScraper()

# Scrape from specific source
incidents = scraper.scrape(
    source="uscg",
    start_date="2023-01-01",
    end_date="2023-12-31"
)

# Store in database
db = IncidentDatabase()
db.insert_incidents(incidents)
print(f"Imported {len(incidents)} incidents")

Incident Analysis

from worldenergydata.modules.marine_safety.analysis import IncidentAnalyzer

# Initialize analyzer
analyzer = IncidentAnalyzer(database_url="postgresql://...")

# Get trend summary
trends = analyzer.get_trends(
    start_date="2020-01-01",
    end_date="2024-12-31",
    grouping="monthly"
)

# Analyze by incident type
type_summary = analyzer.analyze_by_type(
    incident_types=["collision", "grounding", "fire", "explosion"]
)

# Get severity distribution
severity = analyzer.severity_distribution()

Geographic Hotspot Detection

from worldenergydata.modules.marine_safety.analysis import GeographicAnalyzer

# Initialize geographic analyzer
geo = GeographicAnalyzer()

# Find hotspots
hotspots = geo.detect_hotspots(
    region="gulf_of_mexico",
    method="dbscan",
    min_incidents=5
)

# Generate interactive map
geo.generate_map(
    hotspots=hotspots,
    output_file="results/​hotspot_map.html"
)

Risk Scoring

from worldenergydata.modules.marine_safety.analysis import RiskAssessor

# Initialize risk assessor
risk = RiskAssessor()

# Calculate risk scores
scores = risk.calculate_risk(
    vessel_type="offshore_platform",
    region="north_sea",
    factors=["weather", "traffic_density", "historical_incidents"]
)

print(f"Risk Score: {scores['overall']:.2f}")
print(f"Risk Level: {scores['level']}")  # LOW, MEDIUM, HIGH, CRITICAL

Reporting

from worldenergydata.modules.marine_safety.visualization import SafetyReportGenerator

# Initialize report generator
reporter = SafetyReportGenerator()

# Generate comprehensive report
report = reporter.generate_report(
    start_date="2023-01-01",
    end_date="2023-12-31",
    sections=[
        "executive_summary",
        "trend_analysis",
        "geographic_distribution",
        "vessel_type_breakdown",
        "recommendations"
    ],
    output_file="results/​safety_report.html"
)

CLI Usage

# Scrape incident data
python -m worldenergydata.modules.marine_safety.cli scrape --source uscg --year 2023

# Analyze trends
python -m worldenergydata.modules.marine_safety.cli analyze --type trends --output trends.html

# Generate risk report
python -m worldenergydata.modules.marine_safety.cli report --format html --output safety_report.html

# Export data
python -m worldenergydata.modules.marine_safety.cli export --format csv --output incidents.csv

Key Classes

ClassPurpose
MarineSafetyScraperMulti-source incident scraping
IncidentDatabaseDatabase operations and storage
IncidentAnalyzerStatistical analysis and trends
GeographicAnalyzerHotspot detection and mapping
RiskAssessorRisk scoring and assessment
SafetyReportGeneratorHTML/​PDF report generation

Data Sources

SourceCoverageData Types
USCGUS watersAll marine incidents
NTSBUSMajor accidents, investigations
BSEEUS OCSOffshore incidents
IMOInternationalGlobal shipping incidents
MAIBUK watersUK marine accidents
ATSBAustraliaAustralian marine incidents
TSBCanadaCanadian marine accidents

Output Formats

Incident CSV

incident_id,date,location_lat,location_lon,vessel_type,incident_type,severity,fatalities,injuries,source
INC001,2023-05-15,28.5,-88.2,tanker,collision,high,0,3,uscg
INC002,2023-06-20,29.1,-94.5,platform,fire,critical,2,5,bsee

Risk Assessment JSON

{
  "assessment_date": "2024-01-15",
  "vessel_type": "offshore_platform",
  "region": "gulf_of_mexico",
  "overall_risk_score": 7.2,
  "risk_level": "HIGH",
  "factors": {
    "historical_incidents": 8.5,
    "weather_exposure": 6.0,
    "traffic_density": 7.0
  },
  "recommendations": [
    "Increase safety inspections",
    "Enhanced weather monitoring"
  ]
}

Best Practices

  1. Rate limiting - Respect source rate limits when scraping
  2. Data validation - Validate and deduplicate incoming data
  3. Incremental updates - Use incremental scraping for efficiency
  4. Geographic accuracy - Verify coordinates for hotspot analysis
  5. Source attribution - Always track data provenance

Related Skills

References

  • USCG Marine Safety Information Portal
  • BSEE Incident Statistics
  • IMO GISIS Maritime Casualties Database
  • DNV Maritime Safety Standards

More skills from mattnigh

spring-framework-patterns logo
mattnigh/skills_collection

spring-framework-patterns

Comprehensive Spring Framework and Spring Boot best practices including dependency injection patterns, bean lifecycle and scopes, REST API development, Spring Data JPA, service layer design, Spring Security, testing strategies, caching, AOP, async processing, error handling, and common anti-patte...

24 0
View

TypeScript厳格モードによる型安全性設計を専門とするスキル。 📖 参照書籍: - 『Effective TypeScript』(Dan Vanderkam): 型設計 📚 リソース参照: - `resources/Level1_basics.md`: レベル1の基礎ガイド - `resources/Level2_intermediate.md`: レベル2の実務ガイド - `resources/Level3_advanced.md`: レベル3の応用ガイド - `resources/Level4_expert.md`: レベル4の専門ガイド - `resources/di...

24 0
View
deploying-cloud-k8s logo
mattnigh/skills_collection

deploying-cloud-k8s

Deploys applications to cloud Kubernetes (AKS/GKE/DOKS) with CI/CD pipelines. Use when deploying to production, setting up GitHub Actions, troubleshooting deployments. Covers build-time vs runtime vars, architecture matching, and battle-tested debugging.

24 0
View
moai-alfred-agent-guide logo
mattnigh/skills_collection

moai-alfred-agent-guide

19-agent team structure, decision trees for agent selection, Haiku vs Sonnet model selection, and agent collaboration principles. Use when deciding which sub-agent to invoke, understanding team responsibilities, or learning multi-agent orchestration.

24 0
View
mermaid-diagram-generator logo
mattnigh/skills_collection

mermaid-diagram-generator

Converts architecture descriptions, module specs, or workflow docs into Mermaid diagrams. Use when visualizing brick module relationships, workflows (DDD, investigation), or system architecture. Supports: flowcharts, sequence diagrams, class diagrams, state machines, entity relationship diagrams,...

24 0
View
pre-flight-check logo
mattnigh/skills_collection

pre-flight-check

INVOKE FIRST before any code work. Validates git workflow (branch, issue, worklog) and checks approach. Use at START of every task and END before completing. Prevents skipped steps.

24 0
View
browser-dev-tools logo
mattnigh/skills_collection

browser-dev-tools

This skill should be used when working with browser-rendered artifacts (i.e. Bun, React/React Native) to proactively validate that development work on localhost is being built appropriately and to support debugging browser-rendered content. Use this skill after making frontend changes to verify t...

24 0
View
lead-dev logo
mattnigh/skills_collection

lead-dev

Lead Développeur - Coordination technique opérationnelle, code review, mentoring et livraison. Pair de web-dev-process au niveau OPÉRATIONS.

24 0
View
worker-monitor logo
mattnigh/skills_collection

worker-monitor

Monitor Docker workers, RQ queue health, and auto-scale workers (max 4). Use when: checking job progress, monitoring queue depth, scaling workers up/down, diagnosing slow processing, or waiting for jobs to complete. Referenced by data-quality skill during reprocessing.

24 0
View
quality-advisor logo
mattnigh/skills_collection

quality-advisor

Proactive quality guidance system that monitors artifact creation and provides real-time feedback on documentation quality

24 0
View
bump-version logo
mattnigh/skills_collection

bump-version

This skill should be used when the user wants to bump the version number in the workspace. It updates versions across all pyproject.toml files (root, tde, and tda packages) and the CHANGELOG.md to keep them synchronized.

24 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View