1. Data Preparation

Data integrity was a top priority. My goal was to prepare this longitudinal dataset for a full scale analysis:

2. Predictive Modeling (Random Forest)

I deployed a Random Forest classifier to determine what drives the severity of shark attacks. The model achieved a 64% accuracy rate, a strong performance given the inherent noise and class imbalance in fatal incidents.

MODELING // FEATURE_IMPORTANCETYPE: VECTOR_SVG
Predictive Power: Random Forest Features Year County Month Activity Species Season Time of Day Depth Submersion 0.0 Feature Importance Score 1.0
Fig 2. Feature Importance ranking. Year and County emerged as the primary indicators of incident severity.

3. Feature Analysis

This analysis reveals that there are, in fact, things you can do to prevent yourself from being the next victim of a shark attack:

Full Python Notebook available here.

Impact Statement

The verdict is in: Shark attacks remain extremely rare, but to exercise appropriate caution it is best to avoid lingering in their hunting grounds, where they regularly feed. After all, when a shark is hunting for food it tends to bite hard and ask questions later. Fortunately, many incidents along the coast are merely exploratory bites where a shark is "investigating" before deciding to engage further with their potential prey. If a shark doesn't like what it finds it tends to swim away. This "bite-and-release" pattern generally results in minor injuries, which means that outside of their hunting grounds you're much more likely to swim away with your life.