You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mutate_geocode does not work with output = "latlona" or output = "more" (anymore - I am pretty sure this used to work).
df<-data.frame(
address= c("1600 Pennsylvania Avenue, Washington DC", "", "houston texas"),
stringsAsFactors=FALSE
)
suppressPackageStartupMessages({
library(dplyr)
library(ggmap)
})
df %>% mutate_geocode(address, output="latlon")
#> Source : https://maps.googleapis.com/maps/api/geocode/json?address=1600%20Pennsylvania%20Avenue%2C%20Washington%20DC#> Warning: geocode failed with status OVER_QUERY_LIMIT, location = "1600#> Pennsylvania Avenue, Washington DC"#> Source : https://maps.googleapis.com/maps/api/geocode/json?address=houston%20texas#> Warning: geocode failed with status OVER_QUERY_LIMIT, location = "houston#> texas"#> address lon lat#> 1 1600 Pennsylvania Avenue, Washington DC NA NA#> 2 NA NA#> 3 houston texas NA NAdf %>% mutate_geocode(address, output="latlona")
#> Source : https://maps.googleapis.com/maps/api/geocode/json?address=1600%20Pennsylvania%20Avenue%2C%20Washington%20DC#> Source : https://maps.googleapis.com/maps/api/geocode/json?address=houston%20texas#> Error in list_to_dataframe(res, attr(.data, "split_labels"), .id, id_as_factor): Results must be all atomic, or all data framesdf %>% mutate_geocode(address, output="more")
#> Source : https://maps.googleapis.com/maps/api/geocode/json?address=1600%20Pennsylvania%20Avenue%2C%20Washington%20DC#> Source : https://maps.googleapis.com/maps/api/geocode/json?address=houston%20texas#> Error in list_to_dataframe(res, attr(.data, "split_labels"), .id, id_as_factor): Results must be all atomic, or all data frames
I can no longer reproduce the errors above as of commit `fc5e0fd' today. However, the option "all" does give me an error in case of row > 1 dataframes.
## This works:
data.frame(
address = c("1200 E California Blvd, Pasadena, CA 91125"),
stringsAsFactors = FALSE
) %>%
mutate_geocode(address, output = "all")
## This also works:
data.frame(
address = rep("1200 E California Blvd, Pasadena, CA 91125", 2),
stringsAsFactors = FALSE
) %>%
mutate_geocode(address, output = "latlon")
## This breaks with message Error in cbind_all(x) : Argument 2 must be length 2, not 1
data.frame(
address = rep("1200 E California Blvd, Pasadena, CA 91125", 2),
stringsAsFactors = FALSE
) %>%
mutate_geocode(address, output = "all")
I guess I don't really need to resort to output = "all" but thought this may help some future users.
Hi @sysilviakim, I assume you're looking to include output as a list-column? I'm not surprised that's not working, but it certainly makes sense for future releases. I'll make a note for the next release, thanks!
mutate_geocode
does not work withoutput = "latlona"
oroutput = "more"
(anymore - I am pretty sure this used to work).Created on 2018-02-24 by the reprex package (v0.2.0).
Session info
The text was updated successfully, but these errors were encountered: