Please. I need an function in r to get latitude and longitude from an specific address.
My addresses are peruavian. For example:
- Jirón Cuzco 423, Magdalena del Mar
- Av Nicolás Arriola 500, La Victoria
Thanks!!
Please. I need an function in r to get latitude and longitude from an specific address.
My addresses are peruavian. For example:
Thanks!!
geocode
from the ggmap
package will do the trick:
library(ggmap)
locs <- c('Jiron Cuzco 423, Magdalena del Mar', 'Av Nicolas Arriola 500, La Victoria')
geocode(locs)
Output:
lon lat
1 -77.07008 -12.0894
2 -77.01523 -12.0856