Reducing the number of high fatality accidents
๐ Background
You work for the road safety team within the department of transport and are looking into how they can reduce the number of major incidents. The safety team classes major incidents as fatal accidents involving 3+ casualties. They are trying to learn more about the characteristics of these major incidents so they can brainstorm interventions that could lower the number of deaths. They have asked for your assistance with answering a number of questions.
๐พ The data
The reporting department have been collecting data on every accident that is reported. They've included this along with a lookup file for 2020's accidents.
Published by the department for transport. https://data.gov.uk/dataset/road-accidents-safety-data Contains public sector information licensed under the Open Government Licence v3.0.
import pandas as pd
df = pd.read_csv(r'./data/accident-data.csv')
df.head()lookup = pd.read_csv(r'./data/road-safety-lookups.csv')
lookup.head()import pandas as pd
import matplotlib.pyplot as pltdf = pd.read_csv(r'./data/accident-data.csv')df.info()Note : The data contains 91199 entries or records and 27 columns
df.head()
df.tail()df.describe()df.drop("accident_index", axis= 1, inplace=True)df.drop("accident_reference", axis=1, inplace= True)df.head(2)df.isna().sum()โ
โ