##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
rfars
comes pre-loaded with searchable codebooks,
compiled from SAS format files and the User Manuals (see: FARS
Analytical User’s Manual and CRSS
Analytical User’s Manual). Access the codebooks in RStudio with:
View(rfars::fars_codebook)
View(rfars::gescrss_codebook)
It can be helpful to search the codebooks for certain concepts. For example, below we print out all entries related to speed. This helps find relevant crashes for analysis and shows how variables change over time.
rfars::fars_codebook %>%
filter(if_any(everything(), ~ str_detect(as.character(.), "speed"))) %>%
DT::datatable(caption = "Codebook records pertaining to speed")