I am trying to plot points for countries on a map (so I can eventually make a network style map) of Argentine exports. However, I don't know how to convert the country names to latitude and longitude. I tried using geocode, but it says NA for the latitude and longitude values and I get a "geocode failed with status REQUEST_DENIED, location = "USA"" error. Is it an error with my API? Do I need to put my API key in the geocode statement? Or how does it know to access the geocode? I think this is my error, but I am not sure. Is there an easy way to fix this? Or a different package I can use?
library(maps)
library(ggmap)
library(ggplot2)
new <- data_frame(city = c("France", "Brazil", "Uruguay")) %>%
mutate_geocode(city)