ripple-effect

Created by: SmirkyGraphs. Code: GitHub. Source: NHTSA.

# Fact-checking The Ripple Effect Statistics¶

"The Ripple Effect" is a campaign by RIDOT to highlight the damages caused not only to a drunk driver, but the effects on others due to the poor choices made by a drunk driver. The campaign has a website with statistics inside the poorly named "Beyond the Statistics" section located here. Some of these stats can be answered with the FARS dataset and are cited at the bottom of the page.

Here is a list of stats we can check with information from the FARS dataset.

• In Rhode Island in 2016, 26% of drunk driving deaths involved a driver with a BAC of .15 or higher.
• Between 2011-2015 39% of roadway fatalities in Rhode Island involved alcohol.
• From 2016 to 2017, Rhode Island saw a 61% increase in fatalities from alcohol-related crashes.
• Between 2011-2015, 27% of impaired driving fatal crashes in Rhode Island involed a driver age 25-34 years old.
In :
```import pandas as pd
import numpy as np

```

#### 1. In Rhode Island in 2016, 26% of drunk driving deaths involved a driver with a BAC of .15 or higher.¶

In :
```total_deaths = acc_df.query('year == 2016')['FATALS'].sum()

dd_over_15 = per_df.query('year == 2016 and PER_TYP == "Driver" and ALC_RES >= 15')['ST_CASE'].tolist()
dd_over_15 = acc_df[acc_df['ST_CASE'].isin(dd_over_15)]['FATALS'].sum()

result = str(int(round((dd_over_15/total_deaths), 2) * 100)) + '%'
print(result + ' of drunk driving deaths involved a driver with a BAC of .15 or higher.')
```
```22% of drunk driving deaths involved a driver with a BAC of .15 or higher.
```

#### 2. Between 2011-2015 39% of roadway fatalities in Rhode Island involved alcohol.¶

In :
```total_deaths = acc_df.query('year > 2010 and year < 2016')['FATALS'].sum()
alc_related = acc_df.query('year > 2010 and year < 2016 and DRUNK_DR > 0')['FATALS'].sum()

result = str(int(round((alc_related/total_deaths), 2) * 100)) + '%'
print(result + ' of roadway fatalities in Rhode Island involved alcohol.')
```
```40% of roadway fatalities in Rhode Island involved alcohol.
```
In :
```df_2016 = acc_df.query('year == 2016 and DRUNK_DR > 0')['FATALS'].sum()
df_2017 = acc_df.query('year == 2017 and DRUNK_DR > 0')['FATALS'].sum()

result = str(int(round(((df_2017 - df_2016) / df_2016), 2) * 100)) + "%"
print(result + ' increase in fatalities from alcohol-related crashes.')
```
```53% increase in fatalities from alcohol-related crashes.
```

#### 4. Between 2011-2015, 27% of impaired driving fatal crashes in Rhode Island involed a driver age 25-34 years old.¶

In :
```total_accidents = acc_df.query('year > 2010 and year < 2016').shape

# list of all impaired drivers
not_imp = [0, 95, 98, 99]
imp_df = imp_df[~imp_df['DRIMPAIR'].isin(not_imp)]

# list of all drivers aged 25-34
year = 'year > 2010 and year < 2016'
impaired = per_df.query(year + ' and PER_TYP == "Driver" and AGE > 24 and AGE < 35')['ST_CASE'].tolist()
impaired = imp_df[imp_df['ST_CASE'].isin(impaired)].shape

result = str(int(round((impaired / total_accidents), 2) * 100)) + '%'
print(result + ' of impaired driving fatal crashes in Rhode Island involed a driver age 25-34 years old.')
```
```13% of impaired driving fatal crashes in Rhode Island involed a driver age 25-34 years old.
```