I am trying to plot all my sites on a ggplot map. I have 5 locations with multiple sites per location, but when I try to plot all my sites, it only displays one point per location instead of one point per site. I have 34 sites and 5 locations so I need a map with 34 points instead of 5! Any help would be super appreciated! Thanks so so much
These are the data with y and x as my long and lat.
Location PAR y x Guam GFA 201.09952 144.8786111 13.495 Guam GFA2 179.04171 144.6597222 13.41638889 Guam GFA3 67.66379 144.2761111 13.47333333 Guam GFB1 201.09952 144.7105556 13.31416667 Guam GFB2 179.04171 144.655 13.50194444 Guam GFB3 67.66379 144.8697222 13.37472222
I need to plot all my 6 sites for Guam. This is the code I am using and the final output
map.world <- map_data(map="world")
gg <- ggplot()
gg <- gg + theme(legend.position="none")
gg <- gg + geom_map(data=map.world, map=map.world, aes(map_id=region, x=long, y=lat), fill="white", colour="black", size=0.25) + theme_bw()
gg
par<-read.csv("parmap.csv", header=T)
head(par)
g<-gg+ geom_polygon() +
geom_point(data=par, aes(x = y, y = x, color=PAR)) +theme_minimal()
g