This exploratory data analysis (EDA) project focuses on analyzing (over 100 000) 911 emergency calls from a comprehensive dataset, from Kaggle. The primary objective was to apply data analysis and visualization methods to a real-world data set, with the secondary objective being to identify patterns, trends, and insights that could potentially help emergency services allocate resources more efficiently.
Through this analysis, I explored:
Understanding these patterns can provide valuable insights for emergency response planning and resource allocation strategies.
The analysis uses a dataset containing records of 911 emergency calls, with the following key features:
Latitude and longitude coordinates of each call, along with zip codes and township names to analyze spatial patterns.
Descriptions and categorizations of emergency types (medical, fire, traffic, etc.) to understand the distribution of emergency reasons.
Timestamps of when calls were received, allowing for time-based analysis of emergency occurrence patterns.
# Loading the dataset
import pandas as pd
df = pd.read_csv('911.csv')
# Initial exploration
df.head()
df.info()
The analysis followed a structured approach to extract meaningful insights from the 911 calls dataset:
Initial exploration to identify the structure, missing values, and key features available in the dataset. Grouped calls by location to find emergency hotspots.
Created new features like 'reason' by extracting the first word from emergency titles. This simplified categorization for analysis.
Converted timestamps to datetime objects and extracted month and day information to analyze temporal patterns in emergency calls.
Used Seaborn, Matplotlib, and Plotly to create informative visualizations that revealed patterns and trends in the data.
# Example of time-based feature extraction
df['timeStamp'] = pd.to_datetime(df['timeStamp'])
df['month'] = df['timeStamp'].dt.month
df['dayOfWeek'] = df['timeStamp'].dt.dayofweek
# Extracting emergency reason from title
df['reason'] = df['title'].apply(lambda title: title.split(':')[0])
Analysis showed that medical emergencies (EMS) were the most common reason for 911 calls, followed by traffic incidents and fire-related emergencies.
At certain hours of the day depending on the day the calls either increase or decrease
The data revealed seasonal patterns in emergency calls, with notable increases during specific months of the year.
Emergency calls were not evenly distributed throughout the week, with higher volumes on certain days that could correlate with traffic patterns or work schedules.
Medical emergencies (EMS) represented the largest category of 911 calls, highlighting the critical importance of medical response readiness.
Certain zip codes and townships generated significantly more calls than others, suggesting targeted resource allocation could improve response efficiency.
Emergency calls showed clear seasonal trends, with certain types of emergencies increasing during specific times of the year.
Call volumes varied by day of the week, with patterns that could help in scheduling and resource planning for emergency services.
Traffic-related calls increased during rush hours, suggesting a connection between traffic accidents and commuting patterns.
This analysis of 911 emergency calls has revealed valuable insights that could potentially improve emergency response systems:
Future work could extend this analysis by:
Used Pandas for data cleaning, transformation, and feature extraction from the raw dataset.
Applied statistical methods to understand distributions and identify significant patterns in emergency call data.
Created informative visualizations using Matplotlib, Seaborn, and Plotly to communicate findings effectively.
Analyzed temporal patterns in emergency calls to identify daily, weekly, and seasonal trends.