powered by
This function returns stations with distance in ascending order given the user's current location
station_distance(long, lat)
longtitude of user location
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
# NOT RUN { # 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) # }
Run the code above in your browser using DataLab