Project case study
Traffic-Fatality Analysis
For a team data-analytics project, I modeled federal fatal-crash records and built visualizations of collision patterns. My teammate prepared the data; I turned it into descriptive comparisons and a classifier, with clear limits on what the results could explain.
My role: I handled modeling, insights and visualizations. My teammate sourced and cleaned the dataset.
Watch the interactive walkthroughHow it works
Define the dataset
The observations represent fatal crashes.
FARS records enter a Python analysis pipeline. The sample excludes nonfatal crashes and ordinary trips, so it cannot estimate population risk by itself.
Compare crash conditions
Descriptive charts show the composition of the sample.
The notebook groups records by conditions such as weather, lighting and road class. Counts describe recorded cases rather than exposure-adjusted rates.
Separate collision types
Single- and multi-vehicle cases form the analysis target.
The project examines differences between collision groups before modeling. The target is collision type within the selected data, not a person’s fatality risk.
Evaluate the classifier
A decision tree needs more than an accuracy number.
The notebook one-hot encodes categorical fields and trains a class-balanced decision tree on an 80/20 split. It filters two event types first, so evaluation applies to that subset.
Ask the question the data can answer.
My teammate sourced and cleaned the federal Fatality Analysis Reporting System data. I handled the modeling, insights and visualizations, moving from descriptive charts to a decision-tree classifier for single- versus multi-vehicle crashes. The portfolio focuses on that analytical workflow and the difference between describing a sample and explaining an outcome.
- Focus
- Python, pandas, NumPy, scikit-learn, Matplotlib and Jupyter
- Status
- Coursework analysis; exploratory findings
How it works
The notebook derives a collision-type label from the vehicle count and uses pandas crosstabs for descriptive comparisons. Its model one-hot encodes categorical fields and trains a class-balanced decision tree on an 80/20 split of a filtered dataset.
What the data can tell us
A fatal-crash-only dataset cannot establish the chance that a trip or crash becomes fatal. Seeing more records in clear weather does not prove that weather is safer or that driver error caused the crashes. The story needs those denominator limits before any interpretation.
What I would improve
I would audit preprocessing and rerun the evaluation before quoting model metrics. The notebook fits its encoder before splitting the data and models a filtered subset, both of which need explicit treatment.