format_collisions | R Documentation |
Format STATS19 'accidents' data
format_collisions(x)
x |
Data frame created with |
This is a helper function to format raw STATS19 data
if(curl::has_internet()) {
dl_stats19(year = 2022, type = "collision")
x = read_collisions(year = 2022, format = FALSE)
if(nrow(x) > 0) {
x[1:3, 1:12]
crashes = format_collisions(x)
crashes[1:3, 1:12]
summary(crashes$datetime)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.