Introduction

COVID-19 has changed many things in our day-to-day life, from ordering more delivery, working from home, or even just getting a new pet. And now I want to see if it has impacted traffic crashes in California. The dataset that I’ll be using comes from Kaggle. It covers collisions from January 2001 up to December 2020 from California. 1 The following are the tables present in the dataset:

  • case_id
  • collisions
  • parties
  • victims

The case_id contains the case_id and db_year. The collisions table contains all the information about each collision. While the parties table contains information about all the parties involved in the collisions, in this case, parties can be drivers, pedestrians, cyclists, and parked vehicles. The victims table contain information about all the victims, it also includes passengers.

To answer if the pandemic has impacted the collisions I need to separate my data. Knowing that the first case of COVID was on January 26, 2020, in California. 2 I’ll be separating the dataset as before COVID for every crash that happened before the first case and after COVID for every crash on the same day and forward.

To compare before COVID and after COVID I’ll looking at a couple of things, Proportion of DUIs and Fatality of Crashes.

To do this I’ll be querying the database with SQLite through R. For the complete code go to my GitHub repo.

Proportion of DUIs

Alcohol use has changed in the US during the pandemic 3 and with all the lockdowns and working from home we may wonder if this alcohol use has caused more crashes or not. With this in mind we take a look at our data about California.

As we can see from the following table, the percentages before and after COVID are very similar. Only 7.3% and 8.96% of violations occurred from DUIs.

Before COVIDAfter COVID
ViolationQntyPercQntyPerc
DUI6534677.3421698.96
Other830039992.742829991.04

Fatality of Crashes

Moving on to our next task, to see if crashes after COVID became more or less fatal. The analysis is going to look at how many people died from collisions, how many got some injury, and no injury at all.

Looking at the table below you can see that the percentage of collisions that resulted in someone dying was 0.74% before the pandemic and is now 1.29%, is not a big difference, but when you look at no injury, you can see that before COVID 45.24% of collisions didn’t result in someone having an injury and after the pandemic, this number drops to 18.57%. This could indicate some influence of the pandemic, but further research is needed.

Before COVIDAfter COVID
Degree of InjuryQntyPercQntyPerc
Death688750.7441311.29
Some injury503361054.0225705780.14
No injury421608545.245957618.57

References