| annual_counts | R Documentation |
Pre-computed annual crash counts from FARS (fatal crashes) and CRSS (general crash estimates) databases for 2014-2023, broken down by various risk factors and vulnerable road user categories.
annual_counts
A tibble with 340 rows and 9 variables:
Year (2014-2023)
Month, if included in interval, as the three-letter abbreviation and an ordered factor (Jan=1, Feb=2, etc.)
Count unit - currently only "crashes"
Geographic scope - "all" for national-level data
Regional scope - "all" for national-level data
Urban/rural classification - "all" for combined data
Person type - "all" for all person types
Risk factor or crash type. Options include:
All crashes (general counts)
Each factor listed below, separately
Alcohol-involved crashes
Crashes involving bicyclists
Distracted driving crashes
Drug-involved crashes
Hit-and-run crashes
Large truck-involved crashes
Motorcycle crashes
Crashes involving older drivers
Crashes involving pedalcyclists
Pedestrian and bicyclist crashes combined
Pedestrian crashes
Police pursuit-related crashes
Roadway departure crashes
Rollover crashes
Speed-related crashes
Crashes involving young drivers
Count of crashes. FARS counts represent actual fatal crashes; CRSS counts represent weighted estimates of all crashes
This dataset provides quick access to national-level annual crash counts without needing to download and process the full datasets. It combines data from two NHTSA databases:
Fatal crashes (actual counts)
General crashes (weighted estimates)
The data can be reproduced using the counts() function on downloaded
FARS and CRSS data with involved = "any" and involved = "each"
parameters.
counts for generating custom counts from downloaded data
## Not run:
# View total crashes over time by data source
library(dplyr)
library(ggplot2)
annual_counts %>%
filter(involved == "any") %>%
ggplot(aes(x = year, y = n, fill = source)) +
geom_col(position = "dodge") +
labs(title = "Annual Crash Counts by Data Source",
x = "Year", y = "Number of Crashes")
# Compare risk factor trends in fatal crashes
annual_counts %>%
filter(source == "FARS",
involved %in% c("alcohol", "speeding", "distracted driver")) %>%
ggplot(aes(x = year, y = n, color = involved)) +
geom_line() +
labs(title = "Fatal Crash Trends by Risk Factor",
x = "Year", y = "Fatal Crashes")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.