View source: R/station_distance.R
station_distance | R Documentation |
This function returns stations with distance in ascending order given the user's current location
station_distance(long, lat)
long |
longtitude of user location |
lat |
latitude of user location |
a tbl_df object showing the distance between the user and top five closest stations with ID, name, number of docks, and position
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.