Format STATS19 'accidents' data

format_accidents(x)

Arguments

x

Data frame created with read_accidents()

Details

This is a helper function to format raw STATS19 data

Examples

dl_stats19(year = 2017, type = "accident")
#> Files identified: dftRoadSafetyData_Accidents_2017.zip
#> http://data.dft.gov.uk.s3.amazonaws.com/road-accidents-safety-data/dftRoadSafetyData_Accidents_2017.zip
#> Attempt downloading from:
#> Data saved at /tmp/RtmpGajYm7/dftRoadSafetyData_Accidents_2017/Acc.csv
x = read_accidents(year = 2017)
#> Reading in:
#> /tmp/RtmpGajYm7/dftRoadSafetyData_Accidents_2017/Acc.csv
crashes = format_accidents(x)