#' geocode
#'
#' @param places
#'
#' @return
#' @export
#'
#' @examples
geocode <- function(places){
require(tmaptools)
long <- rep(NA, length(places))
lat <- rep(NA, length(places))
for(i in 1:length(places)){
temp <- geocode_OSM(places [i])
if(!is.null(temp)){
long[i] <- temp$coords[1]
lat[i] <- temp$coords[2]
}
print(paste(i, "palces done out of", length(places)))
}
data.frame(places, lat, long)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.