query_usage: Query historical usage data

Description Usage Arguments Value

Description

Retrieves individual pick-ups from the JUMP Bikes database, for a given set of bikes, during a given period. Database credentials are needed for this function.

Usage

1
2
3
query_usage(bikes, from = as.POSIXct("2018-09-10 16:30:00", format =
  "%Y-%m-%d %H:%M:%S", tz = "America/Los_Angeles"),
  to = Sys.time(), database_user, database_password)

Arguments

bikes

a vector that contains the ID's of the bikes of interest. Should be obtained with the dockless::query_bikes function.

from

timestamp of class POSIXct defining from which timestamp on data should be queried. Default is set to the first timestamp in the database (i.e. earlier timestamps than the default are not possible).

to

timestamp of class POSIXct defining until which timestamp data should be queried. Default is set to the system time.

database_user

character defining the user name to access the database.

database_password

character defining the password to access the database.

Value

Returns an object of class sf, containing all pick-ups, with geographical location and timestamp.


luukvdmeer/dockless documentation built on May 10, 2019, 1:24 p.m.