A few friends and I are involved in the Budapest public bicycle data science competition. As of right now we are in the top ten, although in all honesty, it hasn’t really started yet. We signed a non-disclosure agreement, so I cannot really share any cool details. What I can share however, is the function I wrote in R to get calculate the distances and duration of bike trips using Google Maps’ API.
#distance calucations #### This script uses RCurl and RJSONIO to download data from Google's API library(RCurl) library(RJSONIO) #define api key as: api<-"YOURAPI" #the function assumes address input in following dataframe: #lat1,lng1,lat2,lng2 DistDur <- function(address,time = as.