Description Usage Arguments Details See Also Examples
Download, read and format STATS19 data in one function.
1 2 |
year |
Single year for which file is to be downloaded. |
type |
One of 'Accidents', 'Casualties', 'Vehicles'; defaults to 'Accidents'. Or any variation of to search the file names with such as "acc" or "accid". |
data_dir |
Parent directory for all downloaded files. Defaults to |
file_name |
The file name (DfT named) to download. |
format |
Switch to return raw read from file, default is |
This function utilizes dl_stats19
and read_*
functions
and retuns a df. The file downloaded would be for a specific year (e.g 2017).
As this function uses dl_stats19
function, it can download
many MB of data so ensure you have a sufficient disk space.
1 2 | get_stats19(year = 2017)
get_stats19(year = 2009)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.