I have a data.frame (df) with addresses. I want to geocode them. My code:
for(i in 1:nrow(df))
{
# Print("Working...")
result <- geocode(df$address[i], output = "latlona", source = "google")
df$lon[i] <- as.numeric(result[1])
df$lat[i] <- as.numeric(result[2])
}
The output and error is the following:
Error in chartr(" ", "+", location) :
invalid input 'Joaquín Requena esquina Charrúa 1111' in 'utf8towcs'
In addition: Warning messages:
1: geocode failed with status ZERO_RESULTS, location = "a pasos de OSE 0000"
2: geocode failed with status ZERO_RESULTS, location = "Luis Galvani 1111"
Any help?
Thank you!