Description Usage Arguments Value Details Note
Store hire bicycle data in SQLite3 database
1 | store_bikedata(city, data_dir, bikedb, create_index = TRUE, quiet = FALSE)
|
city |
One or more cities for which to download and store bike data, or names of corresponding bike systems (see Details below). |
data_dir |
A character vector giving the directory containing the
data files downloaded with |
bikedb |
A string containing the path to the SQLite3 database to
use. If it doesn't already exist, it will be created, otherwise data
will be appended to existing database. If no directory specified,
it is presumed to be in |
create_index |
If TRUE, creates an index on the start and end station IDs and start and stop times. |
quiet |
If FALSE, progress is displayed on screen |
Number of trips added to database
City names are not case sensitive, and must only be long enough to unambiguously designate the desired city. Names of corresponding bike systems can also be given. Currently possible cities (with minimal designations in parentheses) and names of bike hire systems are:
New York City (ny) | Citibike |
Washington, D.C. (dc) | Capital Bike Share |
Chicago (ch) | Divvy Bikes |
Los Angeles (la) | Metro Bike Share |
Boston (bo) | Hubway |
Data for different cities are all stored in the same database, with
city identifiers automatically established from the names of downloaded data
files. This function can take quite a long time to execute (typically > 10
minutes), and generates a SQLite3 database file several gigabytes in size.
Downloaded data files are removed after loading into the database; files may
be downloaded and stored permanently with dl_bikedata
, and the
corresponding data_dir
passed to this function.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.