format_collisions {stats19} | R Documentation |
Format STATS19 'collisions' data
Description
Format STATS19 'collisions' data
Usage
format_collisions(x)
Arguments
x |
Data frame created with |
Details
This is a helper function to format raw STATS19 data
Examples
if(curl::has_internet()) {
dl_stats19(year = 2022, type = "collision")
x = read_collisions(year = 2022, format = FALSE)
x = readr::read_csv("https://github.com/ropensci/stats19/releases/download/v3.0.0/fatalities.csv")
if(nrow(x) > 0) {
x[1:3, 1:12]
crashes = format_collisions(x)
crashes[1:3, 1:12]
summary(crashes$datetime)
}
}
[Package stats19 version 3.0.3 Index]