dl_trips_data {bysykkel} | R Documentation |
Download historical bike trips data in Norway
Description
dl_trips_data
downloads a file of anonymized historical bike
trips data in Norway for the city of Oslo, Bergen, and Trondheim.
The data is provided according to the Norwegian License for Open Government Data 2.0 NLOD 2.0.
The data is downloaded from:
Usage
dl_trips_data(year, month, city, filetype = "CSV")
Arguments
year |
A number. The year that you want to download data for. |
month |
A number. The month that you want to download data for. |
city |
A string. The city that you want to download data for. The options are "Oslo", "Bergen", and "Trondheim". |
filetype |
A string. The filetype that you want to download data for. The options are "CSV" (default) and "JSON". |
Value
The function downloads a CSV-file to your current working directory.
Examples
## Not run:
# Download bike trip data for the month of January, 2019, in Bergen
# as CSV or JSON
dl_trips_data(year = 2019, month = 01, city = "Bergen", filetype = "CSV)
dl_trips_data(year = 2019, month = 01, city = "Bergen", filetype = "JSON)
# Download bike trips data for the month of October, 2018, in Trondheim
dl_trips_data(2018, 10, "Trondheim")
# Use "lapply()" to download bike trips data for several months in Oslo
lapply(06:08, dl_trips_data, year = 2018, city = "Oslo")
## End(Not run)
[Package bysykkel version 0.3.1 Index]