Alex %>%
geocode(address = 'Address', method = "google", lat = latitude, long = longitude)
Error in geocode(., address = "Address", method = "google", lat = latitude, :
is.character(location) is not TRUE
I am trying to get coordinates for +17k addresses. The geocode function has worked fine before now but I realized I wasn't putting in the full address, I was only inputting the street address without city or state and getting wildly different coordinates.
For reproducibility I've got some random example data to test with and I've got it in 2 different datasets. One where the address is complete in one column and another dataset where the address is broken up into multiple columns for city, state, and zip code. I've tried both datasets and they both give me the exact same error code.
This dataset is called Alex.
| ID | Address |
|---|---|
| 120 | 200 Walmart Way, Morehead, KY 40351 |
| 121 | 131 Jessica Lane, Olive Hill, KY 41164 |
| 122 | 125 Flemingsburg Rd, Morehead, KY 40351 |
library(tibble)
library(dplyr)
library(tidygeocoder)
library(ggmap)
Those are the packages I've got loaded, all of the columns in the Alex table are character type, not numeric, and the table itself is:
class(Alex)
[1] "tbl_df" "tbl" "data.frame"
I have a Google API key registered and nothing is working. Any help or insight would be greatly appreciated.
this a solution using DeGAUSS
You will need to install docker (just follow https://www.docker.com/products/docker-desktop/ for your OS).
One of the address was imprecise (the first one)