I have some regions defined in a dataset that looks like this:
> head(regions_gg)
lon lat group
12 -69.75 -19.75 3
13 -69.25 -19.75 3
14 -68.75 -19.75 3
15 -68.25 -19.75 3
16 -67.75 -19.75 3
17 -67.25 -19.75 3
where every point in space has assigned a number, which indicates which region it belongs to. What I want to do is outline these regions and create a border around them. So far, this is the best I could do, but as you can see, it looks hideous.
ggplot(regions_gg,aes(x=lon,y=lat,fill=group,z=group))+theme_bw()+
geom_raster(interpolate=F)+geom_contour()
geom_contour() is trying to interpolate and adds a lot of unnecessary lines. Is there an easy way to fix this?
EDIT: here's the data regions_gg