I'm in the New Orleans area. When I open Google Maps in the New Orleans area and then search for "Council on Alcohol & Drug", I get the correct location with coordinates (longitude = -90.09, latitude = 29.96).
Yet, when I use the geocode
method from ggmap, I keep getting some other coordinates not even in New Orleans. I've tried a number of tricks to get this to work but still haven't found a solution.
library(ggmap)
geocode(location="Council on Alcohol & Drug") # NA NA
geocode(location="Council on Alcohol & Drug New Orleans") # NA NA
geocode(location="Council on Alcohol & Drug&components=administrative_area:Louisiana") # -91.96 30.98
geocode(location="Council on Alcohol & Drug&components=administrative_area:New Orleans") # NA NA
geocode(location="Council on Alcohol & Drug®ion=New Orleans") # NA NA
geocode
seems squirrely for me in general. Any advice on getting it to behave?
Converting the "&" to "and" corrected the problem. (Solved it as I was typing my question and figured it'd still be worth posting.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With