station_distance {bluebike} | R Documentation |
Compute the distance from stations given current location
Description
This function returns stations with distance in ascending order given the user's current location
Usage
station_distance(long, lat)
Arguments
long |
longtitude of user location |
lat |
latitude of user location |
Value
a tbl_df object showing the distance between the user and top five closest stations with ID, name, number of docks, and position
Examples
# Calculate distance for user at (-71.11467361, 42.34414899) and show the closest five stations
top_5_station <- head(station_distance(-71.11467361, 42.34414899), 5)
[Package bluebike version 0.0.3 Index]