Who is drunk and When in Ames, Iowa ?
Using data collected from the State of Iowa (United States), we will apply the data wrangling and visualization skills. In this project we will cover the following topics —
Data Manipulation
Data Visualization
Importing & Cleaning Data
Project Tasks —
- Breath alcohol tests in Ames, Iowa, USA
Ames, Iowa, USA is the home of Iowa State University, a land grant university with over 36,000 students. By comparison, the city of Ames, Iowa, itself only has about 65,000 residents. As with any other college town, Ames has had its fair share of alcohol-related incidents. (For example, Google ‘VEISHEA riots 2014’.) We will take a look at some breath alcohol test data from Ames that is published by the State of Iowa.
Our data consists of 1,556 readings from breath alcohol tests administered by the Ames and Iowa State University Police Departments from January 2013 to December 2017. The columns in this data set are year, month, day, hour, location, gender, Res1, Res2.
Importing the required library — ‘pandas’, and reading the csv data file.
Obtaining counts of number of recorded tests and visualizing them for each year:
2. What is the busiest police department in Ames?
There are two police departments in the data set: the “Iowa State University Police Department” and the “Ames Police Department”. Which one administers more breathalyzer tests?
This shows that Iowa State University Police Department has administered more breathalyzer tests than Ames Police Department.
3. Nothing Good Happens after 2AM
We all know that “nothing good happens after 2AM.” Thus, there are inevitably some times of the day when breath alcohol tests, especially in a college town like Ames, are most and least common. Which hours of the day have the most and least breathalyzer tests?
Between 2:00AM — 4:00AM, it’s the most common time for breathalyzers test throughout the whole day.
4. Breathalyzer tests by month
Now that we have discovered which time of day is most common for breath alcohol tests, we will determine which time of the year has the most breathalyzer tests. Which month will have the most recorded tests?
As the above graph suggests, most of the breath alcohol tests have been recorded in the 8th month (i.e. August) of the year.
5. COLLEGE
When we think of (binge) drinking in college towns in America, we usually think of something like this image at the left. And so, one might suspect that breath alcohol tests are given to men more often than women and that men drink more than women.
6. Above the legal limit
In the USA, it is illegal to drive with a blood alcohol concentration (BAC) above 0.08%. This is the case for all 50 states. Assuming everyone tested in our data was driving (though we have no way of knowing this from the data), if either of the results (Res1, Res2) are above 0.08, the person would be charged with DUI (driving under the influence).
In our data set, around 75% of people have charged with DUI (driving under the influence) as either of the results of their breath alcohol tests are above 0.08.
7. Breathalyzer tests: is there a pattern over time?
We previously saw that 2:00 AM is the most common time of day for breathalyzer tests to be administered, and August is the most common month of the year for breathalyzer tests. Now, we look at the weeks in the year over time.
8. Looking at timelines
How do the weeks differ over time? One of the most common data visualizations is the time series, a line tracking the changes in a variable over time. We will use the new week variable to look at test frequency over time. We end with a time series plot showing the frequency of breathalyzer tests by week in year, with one line for each year.
9. The end of VEISHEA
From Wikipedia: “VEISHEA was an annual week-long celebration held each spring on the campus of Iowa State University in Ames, Iowa. The celebration featured an annual parade and many open-house demonstrations of the university facilities and departments. Campus organizations exhibited products, technologies, and held fundraisers for various charity groups. In addition, VEISHEA brought speakers, lecturers, and entertainers to Iowa State. […] VEISHEA was the largest student-run festival in the nation, bringing in tens of thousands of visitors to the campus each year.”
This over 90-year tradition in Ames was terminated permanently after riots in 2014, where drunk celebrators flipped over multiple vehicles and tore light poles down. This was not the first incidence of violence and severe property damage in VEISHEA’s history.
This brings us to the end of this project cum article. I hope you have understood everything clearly. Make sure you practice as much as possible.
If you wish to check out more resources related to Data Science and Machine Learning you can refer to my Github account.
You can also check my Data Science Portfolio on Github account.