UPDATED with data from gist.github.com/HeroicEric/1102788
I am using tidygeocode to turn long lists of addresses (1,000-50,000) into latitude and longitude. The geocode function seems to miss some valid addresses at random, different ones every time I run the code.
Is there a way to make it automatically check a missed address more than once? (I had better luck with ggmap, but I went over their free monthly limit and am looking for a free option).
library(tidygeocode)
data<- read.csv("https://gist.githubusercontent.com/HeroicEric/1102788/raw/0bcb298bd75513a398bf353ce7162177350813c9/gistfile1.txt", header = FALSE)
data$address<-paste(data$V1, data$V2, sep = ", ")
cycle1<- data %>% geocode(address)
table(is.na(cycle1$long))
cycle2 <- cycle1 %>% filter(is.na(cycle1$lat) )%>% select(-lat, -long) %>% geocode(address)
table(is.na(cycle2$long))
cycle3 <- cycle2 %>% filter(is.na(cycle2$lat) )%>% select(-lat, -long) %>% geocode(address)
table(is.na(cycle3$long))
I ran the code once, and successfully geocoded 100 on Cycle 1, 1 on Cycle 2, and 2 on Cycle 3.
I ran the code a second time, and successfully geocoded 95 on Cycle 1, none on Cycle 2, and 4 on Cycle 3.