I am trying to plot longitudes and latitudes on a US map, but I am having a hard time coding it.
devtools::install_github('UrbanInstitute/urbnmapr')
ggplot() +
geom_polygon(data = urbnmapr::states, mapping = aes(x = long, y = lat, group = group),
fill = "grey", color = "white") +
coord_map(projection = "albers", lat0 = 39, lat1 = 45)
Up to this point, I have a plot of the US with no points. I need to plot my longitudes and latitudes but the rest of the code I am trying to use is not coming out right
We don't really have enough info to help you out. Could you ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.
If you've never heard of a reprex before, you might want to start by reading this FAQ: