## FUNCTION THAT WILL CHECK ALL CALLS FOR FAILURES AND CONVERT JSON RESPONSES
#####
.getVelibJSON <- function(url, .opts, httpheader, ...){
tryGetURL <- getURL(url, .opts=.opts,
httpheader=httpheader, ...)
tryGetURL <- fromJSON(tryGetURL)
# if(is.character(tryGetURL)){
# if(tryGetURL["message"] == "Not Found")
# stop("velib api could not find specified URI", call.=F)
# }
return(tryGetURL)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.