i have tried 2 approaches to get the long lat of location.
install.packages("maptools")
library(maptools)
A1 <- data.frame(A1= c("Dordrecht", "Berlin", "New York",
"Batu Pahat", "Edinburgh"),
stringsAsFactors = FALSE)
result <- lapply(A1[, 1], geocode_OSM)
or
A2_df <- mutate_geocode(A1, loc)
but both do not work
loc
1 Dordrecht
2 Berlin
3 New York
4 Batu Pahat
5 Edinburgh
any ideas to get the respectively code without API key?
Is this what you are looking for?
data
Created on 2021-03-30 by the reprex package (v1.0.0)