query_distances: Query historical distance data

Description Usage Arguments Value

Description

Retrieves, for each of the given geographical locations, distances to the nearest available bike for several timestamps in the past, from the JUMP Bikes database. Database credentials are needed for this function.

Usage

1
2
3
query_distances(locations, 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

locations

object of class sf with point geometry.

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 dockless_dfc, which is a collection of data frames of class dockless_df. Each dockless_df object is a time series of historical distance data for a specific geographical location.


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