Description Usage Arguments Value Examples
View source: R/fread_trips_data.R
fread_trips_data()
imports anonymized historical bike trips data for
the city of Oslo, Bergen, and Trondheim, in Norway, directly to R.
fread_trips_data()
utilizes the
fread()
function from the data.table
package to fast read the CSV-files. Hence, it is much faster than
read_trips_data
. fread_trips_data()
requires that you
have the data.table
package installed.
The data is provided according to the Norwegian License for Open Government Data 2.0 (NLOD 2.0).
The data is read from:
1 | fread_trips_data(year, month, city)
|
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 you want to download data from. The options are "Oslo", "Bergen", and "Trondheim". |
The function reads in bike trips data for the specified year, month, and city to R as a tibble.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
# Fast read bike trips data for the month of January 2019 in Bergen
bergen_trips <- fread_trips_data(year = 2019, month = 1, city = "Bergen")
# Fast read bike trips data for the month of October 2018 in Trondheim
trondheim_trips <- fread_trips_data(2018, 10, "Trondheim")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.