stats19 (version 2.0.1)

format_accidents: Format STATS19 'accidents' data

Description

Format STATS19 'accidents' data

Usage

format_accidents(x)

Arguments

x

Data frame created with read_accidents()

Details

This is a helper function to format raw STATS19 data

Examples

Run this code
# \donttest{
if(curl::has_internet()) {
dl_stats19(year = 2017, type = "accident")
x = read_accidents(year = 2017, format = FALSE)
if(nrow(x) > 0) {
x[1:3, 1:12]
crashes = format_accidents(x)
crashes[1:3, 1:12]
summary(crashes$datetime)
}
}
# }

Run the code above in your browser using DataLab