I want create border between multiple sub part of my map like this answer :
https://stackoverflow.com/a/49523256/9829458
However, It does not work in my R. Only external border of this map was drawn. And when I use this code on my dataset, I have the same problem...
My data :
city_code Name Long Lat Groups
<chr> <chr> <dbl> <dbl> <dbl>
1 34001 ABEI… 724751. 6262333. 9
2 34002 ADIS… 734961. 6270688. 10
3 34003 AGDE 739245. 6245728. 7
4 34004 AGEL 688135. 6249905. 4
5 34005 AGON… 758530. 6311345. 20
6 34006 AIGNE 683215. 6247000. 4
7 34007 AIGU… 685638. 6249976. 4
8 34008 LES … 705573. 6274482. 6
9 34009 ALIG… 727555. 6263258. 9
10 34010 ANIA… 747789. 6287511. 18
My map :
read_sf("Map.shp") %>%
mutate(Groups = as.factor(Groups)) %>%
mutate(Groups = factor(Groups, levels = c(paste0(1:23)))) %>%
ggplot() +
geom_sf(aes(fill = Groups)) +
theme_bw()
So, in my case, I want draw "Groups" border on my map while seeing cities border (and conserve fill = Groups
colors).