I would like to change the color of a shared color to a different color, let's say red. So far, I am plotting the German federal state Bavaria and touching Austrian states. I get the data from https://gadm.org/download_country.html -
Germany Level 2 - https://biogeo.ucdavis.edu/data/gadm3.6/Rsf/gadm36_DEU_2_sf.rds
Germany Level 1 - https://biogeo.ucdavis.edu/data/gadm3.6/Rsf/gadm36_DEU_1_sf.rds
Austria Level 2 - https://biogeo.ucdavis.edu/data/gadm3.6/Rsf/gadm36_AUT_2_sf.rds
Austria Level 1 - https://biogeo.ucdavis.edu/data/gadm3.6/Rsf/gadm36_AUT_1_sf.rds
library("sf")
library("raster")
library("dplyr")
library("spData")
library("spDataLarge")
library("ggplot2")
library("patchwork")
library(tmap) # for static and interactive maps
library(ggpattern)
data_aut <- readRDS("~/plot_at_ger/data/gadm36_AUT_2_sf.rds")
data_ger <- readRDS("~/plot_at_ger/data/gadm36_DEU_2_sf.rds")
data_aut_high <- readRDS("~/plot_at_ger/data/gadm36_AUT_1_sf.rds")
data_aut_high <- data_aut_high[which(data_aut_high$NAME_1=='Salzburg' | data_aut_high$NAME_1=='Oberösterreich' | data_aut_high$NAME_1=='Tirol' | data_aut_high$NAME_1=='Vorarlberg'), ]
data_ger_high <- readRDS("~/plot_at_ger/data/gadm36_DEU_1_sf.rds")
data_ger_high <- data_ger_high[which(data_ger_high$NAME_1=='Bayern'), ]
ggplot() +
geom_sf(data = ger_selected_data_bavaria, fill = NA) +
geom_sf(data = aut_selected_data_rel, fill = NA) +
geom_sf(data = data_aut_high, fill = NA, size = 1, color = "grey35") +
geom_sf(data = data_ger_high, fill = NA, size = 1, color = "black")
This produces the following figure:
Is there a way to change the color of the shared border?
Thanks!
{giscoR}
package. Thanks! – Interlard