get_fars_zip | R Documentation |
This function provides an alternative to get_fars_year()
that downloads
files directly from NHTSA FTP site. If read is TRUE
, the function reads a
list containing data frames for each table available in the selected year. If
geometry is TRUE
, the accident table is converted to an sf object.
get_fars_zip(
year = 2022,
format = "csv",
path = NULL,
pr = FALSE,
aux = FALSE,
read = TRUE,
geometry = FALSE,
overwrite = FALSE
)
year |
Year of data from 1975 to 2022, Default: 2022 |
format |
Format of zipped data tables ('csv' or 'sas'). Default: 'csv'. unzip and geo options are only supported if format is "csv". |
path |
Path to download zip file. Set to |
pr |
If |
aux |
If |
read |
If |
geometry |
If |
overwrite |
If |
Downloads zip file with CSV or SAS tables and returns the zip file
path invisibly or returns a list of data frames (if geometry is FALSE
),
or returns a list of data frames with the accident table converted to a sf
object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.