Download the traffic accident data
download_accident_data.Rd
Download the file of traffic accident data provided the National Police Agency's Web page.
Usage
download_accident_data(type, download_dir = getwd(), year = 2023)
Arguments
- type
Type of data to download: one of "main", "sub", or "highway".
- download_dir
A directory where downloaded file is to saved (default:
getwd()
).- year
Year the traffic accident data was recorded. Available from 2019 to 2023 (default:
2023
).
Details
The traffic accident data are divided into the following types:
"main" (honhyo): Basic data on traffic accidents.
"sub" (hojuhyo): Additional data related to the "main" data.
"highway" (kosokuhyo): Data on traffic accidents on highways.
You can specify the type of data directly via the type
argument.