Script written by MF to check and correct B1 colonies assignment to regions and sub-regions that were supplied by ICES and downloaded in the BirdsColony2021-10-01.csv file.

Two addition columns, Area_verified and SubRegion_verified, were added to the BirdsColony file with the corrected regional and sub-regional assignments

library(b1indicator)

Library uploaded and Shapefile_uploaded

library(sf)
library(rgdal)
library(broom)
library(rgeos)
library(ggplot2)
library(raster) 
library(ggsci)
library(rmarkdown)

# set config
Sys.setenv(R_CONFIG_ACTIVE = "production")

setwd(config::get("b1_indicator_colony_correction_wd"))
load(config::get("b1_indicator_colony_correction_data"))

my_spdf <- readOGR( 
  dsn= "." , 
  layer="ospar_assessment_areas_2020_11_001",
  verbose=TRUE
)

#Plotting
spdf_fortified <- tidy(my_spdf)

Mismatch in the Area entry among iceS_Calculated_OSPAR_Region and areaReference

colonies_df<-read.csv("BirdsColony2021-10-01.csv")
# the mismatched entries on the OSPAR MAP

ggplot() +
  geom_polygon(data = spdf_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = colonies_df, aes(x=lon,y=lat, color=colonies_df$ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "none")+ggtitle("Overview OSPAR AREA") + scale_color_ucscgb()

There are some mistakes in here. For example the data point on the Baltic sea belong to Iceland colonies.

Iceland data entry correction

names(colonies_df)
check_df<-dplyr::filter(colonies_df,country=="IS")
check_df$lon<-(-check_df$lon)
check_df$ospaR_Closest_BirdsSubdivision="Artic Waters"
colonies_df[colonies_df$X %in% check_df$X, ] <- check_df

ggplot() +
  geom_polygon(data = spdf_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = colonies_df, aes(x=lon,y=lat, color=colonies_df$ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Iceland Coordinate Corrected") + scale_color_ucscgb()

There are still data point far out from the OSPAR region. I will know check on those that is classified as ‘Areas to be further divided into subregions’. Part of this entries (with iceS_Calculated_OSPAR_Region = NA) have the latitudes and longitudes inverted. I will start to that ones.

unique(colonies_df$ospaR_Closest_BirdsSubdivision)
check_df<-dplyr::filter(colonies_df,ospaR_Closest_BirdsSubdivision=="Areas to be further divided into subregions")
check_df<-dplyr::filter(check_df,is.na(iceS_Calculated_OSPAR_Region))
lat<-check_df$lon
check_df$lon<-check_df$lat
check_df$lat<-lat

colonies_df[colonies_df$X %in% check_df$X, ] <- check_df

ggplot() +
  geom_polygon(data = spdf_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = colonies_df, aes(x=lon,y=lat, color=colonies_df$ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - lat long swap corrected") + scale_color_ucscgb()

There are still a lot of points not yet assigned to Regoin/Subregion. I will focus on those ones retrieving the data from the shape file

#my_spdf@data
pts <- data.frame(x=check_df$lon, y=check_df$lat)
coordinates(pts) <- ~x+y  # pts needs to be a data.frame for this to work
proj4string(pts) <- proj4string(my_spdf)
Sr=over(pts, my_spdf)$SubRegion
S_Rr=over(pts, my_spdf)$Sub_Region
Area=r=over(pts, my_spdf)$Region
check_df<-cbind.data.frame(check_df, ICES_SubRegion_verified=Sr,ICES_Sub_region_verified=S_Rr,ICES_Region_verified=Area)

check_df$ospaR_Closest_BirdsSubdivision[check_df$country=="IE"]="Celtic Seas"
check_df$ospaR_Closest_BirdsSubdivision[check_df$country=="DK"]=check_df$birdsSubDivision[check_df$country=="DK"]

check_df<-check_df[,-c(19:20)]
colonies_df[colonies_df$X %in% check_df$X, ] <- check_df

ggplot() +
  geom_polygon(data = spdf_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = colonies_df, aes(x=lon,y=lat, color=colonies_df$ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - completed not assigned Region") + scale_color_ucscgb()

check_df<-dplyr::filter(colonies_df,ospaR_Closest_BirdsSubdivision=="Areas to be further divided into subregions")
unique(check_df$country)

check_df$ospaR_Closest_BirdsSubdivision[check_df$country=="GB"]="Celtic Seas"
check_df$ospaR_Closest_BirdsSubdivision[check_df$country=="IE"]="Celtic Seas"
check_df$ospaR_Closest_BirdsSubdivision[check_df$country=="PT"]="Wider Atlantic"

colonies_df[colonies_df$X %in% check_df$X, ] <- check_df

ggplot() +
  geom_polygon(data = spdf_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = colonies_df, aes(x=lon,y=lat, color=colonies_df$ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - completed not assigned Region") + scale_color_ucscgb()

Now i will assign the correct Subdivision to the Azores Islands.


check_df<-dplyr::filter(colonies_df,lon< -21 & country!="IS")

check_df$ospaR_Closest_BirdsSubdivision[check_df$ospaR_Closest_BirdsSubdivision=="e"]="Wider Atlantic"
unique(check_df$ospaR_Closest_BirdsSubdivision)

colonies_df[colonies_df$X %in% check_df$X, ] <- check_df

ggplot() +
  geom_polygon(data = spdf_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = colonies_df, aes(x=lon,y=lat, color=colonies_df$ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Correction of the Azores islands Subdivision assignement") + scale_color_ucscgb()

Now we assign the correct Subdivision to the Iberian coast and Bay of Biscay

check_df<-dplyr::filter(colonies_df,lon> -21 & lat<48)

check_df$ospaR_Closest_BirdsSubdivision="Bay of Biscay and Iberian coast"
unique(check_df$ospaR_Closest_BirdsSubdivision)

colonies_df[colonies_df$X %in% check_df$X, ] <- check_df

ggplot() +
  geom_polygon(data = spdf_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = colonies_df, aes(x=lon,y=lat, color=colonies_df$ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Correction of the Iberian coast and Bay of Biscay") + scale_color_ucscgb()

Now we verify the correct assignment of the Celtic Seas and the Region 2 subdivision

check_df<-dplyr::filter(colonies_df,lon> -11 & lon< 7 & lat>48 & lat<65)

#Zoom in region 2 and 3
cropped_UK <- crop(my_spdf, extent(-11, 7, 48, 65))
cropped_fortified_UK <- tidy(cropped_UK)

ggplot() +
  geom_polygon(data = cropped_fortified_UK, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = check_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Correction of the Celtic Seas Assignement") + scale_color_ucscgb()

check_df$ospaR_Closest_BirdsSubdivision[check_df$country=="IE"]<-"Celtic Seas"

colonies_df[colonies_df$X %in% check_df$X, ] <- check_df

check_df<-dplyr::filter(colonies_df,lon> -8 & lon< -5 & lat>48 & lat<65)

ggplot() +
  geom_polygon(data = cropped_fortified_UK, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = check_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Correction of the Celtic Seas Assignement") + scale_color_ucscgb()

check_df$ospaR_Closest_BirdsSubdivision<-"Celtic Seas"

colonies_df[colonies_df$X %in% check_df$X, ] <- check_df

check_df<-dplyr::filter(colonies_df,lon> -8 & lon< -3 & lat>48 & lat<65)

ggplot() +
  geom_polygon(data = cropped_fortified_UK, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = check_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Correction of the Celtic Seas Assignement") + scale_color_ucscgb()

check_df$ospaR_Closest_BirdsSubdivision[check_df$areaReference==3]<-"Celtic Seas"

colonies_df[colonies_df$X %in% check_df$X, ] <- check_df

check_df<-dplyr::filter(colonies_df,lon> -8 & lon< -4.5 & lat>48 & lat<65)

ggplot() +
  geom_polygon(data = cropped_fortified_UK, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = check_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Correction of the Celtic Seas Assignement") + scale_color_ucscgb()

check_df$ospaR_Closest_BirdsSubdivision[check_df$ospaR_Closest_BirdsSubdivision=="a"]<-"Celtic Seas"

check_df<-dplyr::filter(colonies_df,lon> -11 & lon< 7 & lat>48 & lat<65)
colonies_df[colonies_df$X %in% check_df$X, ] <- check_df

#Zoom in region 2 and 3
check_df<-dplyr::filter(colonies_df,lon> -11 & lon< 7 & lat>48 & lat<65)

ggplot() +
  geom_polygon(data = cropped_fortified_UK, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = check_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Correction of the Celtic Seas Assignement") + scale_color_ucscgb()
ggplot() +
  geom_polygon(data = spdf_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = colonies_df, aes(x=lon,y=lat, color=colonies_df$ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Correction of the Celtic Seas Assignement") + scale_color_ucscgb()
check_df<-dplyr::filter(colonies_df,lon>  0 & areaReference==3)

ggplot() +
  geom_polygon(data = cropped_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = check_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Correction of the Celtic Seas Assignement") + scale_color_ucscgb()

check_df$lon[1]= -check_df$lon[1]

colonies_df[colonies_df$X %in% check_df$X, ] <- check_df

ggplot() +
  geom_polygon(data = spdf_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = colonies_df, aes(x=lon,y=lat, color=colonies_df$ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA ") + scale_color_ucscgb()

check_df<-dplyr::filter(colonies_df,lon> -3.7 & lon< -2.5 & lat>50.75 & lat<55)

ggplot() +
  geom_polygon(data = cropped_fortified_UK, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = check_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Correction of the Celtic Seas Assignement") + scale_color_ucscgb()

check_df$ospaR_Closest_BirdsSubdivision<-"Celtic Seas"
colonies_df[colonies_df$X %in% check_df$X, ] <- check_df
ggplot() +
  geom_polygon(data = spdf_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = colonies_df, aes(x=lon,y=lat, color=colonies_df$ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA ") + scale_color_ucscgb()

check_df<-dplyr::filter(colonies_df,lon> -11 & lon< -1.8 & lat>48 & lat<49)

ggplot() +
  geom_polygon(data = cropped_fortified_UK, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = check_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Correction of the Celtic Seas Assignement") + scale_color_ucscgb()

check_df$ospaR_Closest_BirdsSubdivision[check_df$ospaR_Closest_BirdsSubdivision=="e"]<-"Celtic Seas"
colonies_df[colonies_df$X %in% check_df$X, ] <- check_df

check_df<-dplyr::filter(colonies_df,lon> -5 & lon< -1.9 & lat>49.5 & lat<50.5)
ggplot() +
  geom_polygon(data = cropped_fortified_UK, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = check_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Correction of the Celtic Seas Assignement") + scale_color_ucscgb()

check_df$ospaR_Closest_BirdsSubdivision[check_df$ospaR_Closest_BirdsSubdivision=="Celtic Seas"]<-"e"
colonies_df[colonies_df$X %in% check_df$X, ] <- check_df

check_df<-dplyr::filter(colonies_df,lon> -3.7 & lon< -3 & lat>58 & lat<58.5)

ggplot() +
  geom_polygon(data = cropped_fortified_UK, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = check_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Correction of the Celtic Seas Assignement") + scale_color_ucscgb()
check_df$ospaR_Closest_BirdsSubdivision[check_df$ospaR_Closest_BirdsSubdivision=="Celtic Seas"]<-"a"
colonies_df[colonies_df$X %in% check_df$X, ] <- check_df

check_df<-dplyr::filter(colonies_df,lon> -3.5 & lon< -1.9 & lat>51 & lat<52)

ggplot() +
  geom_polygon(data = cropped_fortified_UK, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = check_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Correction of the Celtic Seas Assignement") + scale_color_ucscgb()
check_df$ospaR_Closest_BirdsSubdivision[check_df$ospaR_Closest_BirdsSubdivision=="e"]<-"Celtic Seas"
colonies_df[colonies_df$X %in% check_df$X, ] <- check_df

check_df<-dplyr::filter(colonies_df,lon> -11 & lon< 7 & lat>48 & lat<65)
ggplot() +
  geom_polygon(data = cropped_fortified_UK, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = check_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Correction of the Celtic Seas Assignement") + scale_color_ucscgb()

save.image("Colonies_corrected.Rd")

At this point there are 3 groups of points to verify: 1) Part of colonies in Region 2 subdivision e are marked as belonging to the Celtic Seas that is incorrect 2) There are one point marked as beloning to region 2 subdivision e in the region in France that is belonging to Bay of Biscay and Iberian coast 3) Check the point oversees in the Greater Nothern Seas area 4) There are several points on the Firth of Forth belonging to the subdivion a of the Region 2 but are at the moment marked as Celtic Seas

with the next chink of code we will solve this problems.

##check for the point erroneously assigned to the Celtic seas in region two subregion e

check_df<-dplyr::filter(colonies_df,lat>48 & lat < 52 & lon< -2 & lon > -4)
cropped<- crop(my_spdf, extent(-4, -2, 48, 52))
cropped_fortified <- tidy(cropped)

ggplot() +
  geom_polygon(data = cropped_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = check_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Corection and Check") + scale_color_ucscgb()

#Correction of Labrador bay region/subdivision assignemnt
a<-dplyr::filter(colonies_df,grepl('Labrador', colonyName))
a$ospaR_Closest_BirdsSubdivision="e"
a$areaReference=2

colonies_df[colonies_df$X %in% a$X, ] <- a

#check of the Firth of Forth data point

check_df<-dplyr::filter(colonies_df,lat>56 & lat < 57 & lon< -3 & lon > -4.5)
cropped<- crop(my_spdf, extent(-4.5, -3, 56, 57))
cropped_fortified <- tidy(cropped)

ggplot() +
  geom_polygon(data = cropped_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = check_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Corection and Check") + scale_color_ucscgb()

##the map shows that the inland colonies is Gargunnock Hills that is nearby the Firth of forth. I will still include this but since we know the name we can remove at later stage

check_df$ospaR_Closest_BirdsSubdivision="a"
check_df$areaReference=2

colonies_df[colonies_df$X %in% check_df$X, ] <- check_df

##Now we check the data points in the middle of the Region II

check_df<-dplyr::filter(colonies_df,lat>57 & lat < 59 & lon> -1.8 & lon < 3)
cropped<- crop(my_spdf, extent(-2.7, 3.7, 54, 63))
cropped_fortified <- tidy(cropped)

ggplot() +
  geom_polygon(data = cropped_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = check_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Corection and Check") + scale_color_ucscgb()

##The colony in the middle of the Great Northern Sea is corresponding to the colony name: "UK Greater North Sea a" It is retain at the moment but can be excluded by searching for the colony name.

##Now we search for the Point off Netherlands coasts
check_df<-dplyr::filter(colonies_df,lat>53.4 & lat < 55 & lon> 2.8 & lon < 5.4)

ggplot() +
  geom_polygon(data = cropped_fortified_UK, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = colonies_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Corection and Check") + scale_color_ucscgb()

##There are three colonies off the Netherland coast that is named 
#1) UK Greater North Sea d / colony id 90177 / entry 981
#2) Noordzee Wadden_br / colony id 112384  / entry 12554
#3) Noordzee Wadden_nbr / colony id 112389  / entry 12559
# they are retained at the moment but can be searched for name colonyID and removed.

Plotting the map with subdivision verified

check_df<-dplyr::filter(colonies_df,lat>57 & lat <59 & lon> -5.4 & lon < -3)
cropped<- crop(my_spdf, extent(-5.4, -3, 58.4, 58.7))
cropped_fortified <- tidy(cropped)

ggplot() +
  geom_polygon(data = cropped_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = check_df, aes(x=lon,y=lat, color=ospaR_Closest_BirdsSubdivision))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA - Corection and Check") + scale_color_ucscgb()

Correction of Area

unique(colonies_df$ospaR_Closest_BirdsSubdivision)
colonies_df$SubRegion_verified<-colonies_df$ospaR_Closest_BirdsSubdivision
colonies_df$Area_verified

colonies_df$Area_verified[colonies_df$ospaR_Closest_BirdsSubdivision=="Artic Waters"]<-1
colonies_df$Area_verified[colonies_df$ospaR_Closest_BirdsSubdivision=="The Norwegian sea"]<-1
colonies_df$Area_verified[colonies_df$ospaR_Closest_BirdsSubdivision=="The Southern Barents sea"]<-1
colonies_df$Area_verified[colonies_df$ospaR_Closest_BirdsSubdivision=="Wider Atlantic"]<-5
colonies_df$Area_verified[colonies_df$ospaR_Closest_BirdsSubdivision=="Bay of Biscay and Iberian coast"]<-4
colonies_df$Area_verified[colonies_df$ospaR_Closest_BirdsSubdivision=="Celtic Seas"]<-3

colonies_df$Area_verified[colonies_df$ospaR_Closest_BirdsSubdivision=="a"]<-2
colonies_df$Area_verified[colonies_df$ospaR_Closest_BirdsSubdivision=="b"]<-2
colonies_df$Area_verified[colonies_df$ospaR_Closest_BirdsSubdivision=="c"]<-2
colonies_df$Area_verified[colonies_df$ospaR_Closest_BirdsSubdivision=="d"]<-2
colonies_df$Area_verified[colonies_df$ospaR_Closest_BirdsSubdivision=="e"]<-2
colonies_df$Area_verified[colonies_df$ospaR_Closest_BirdsSubdivision=="f"]<-2

Plotting the map with area verified

ggplot() +
  geom_polygon(data = spdf_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = colonies_df, aes(x=lon,y=lat, color=factor(colonies_df$Area_verified)))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA -Area verified") + scale_color_ucscgb()

Plotting the map with subdivision verified

ggplot() +
  geom_polygon(data = spdf_fortified, aes( x = long, y = lat, group = group), fill="#69b3a2", color="white") +
  geom_point(data = colonies_df, aes(x=lon,y=lat, color=colonies_df$SubRegion_verified))+
  theme_void() +theme(legend.position = "bottom")+ggtitle("Overview OSPAR AREA -subdivision verified") + scale_color_ucscgb()

1)The map shows that the inland colonies is Gargunnock Hills that is nearby the Firth of forth. I will still include this but since we know the name we can remove at later stage 2)The colony in the middle of the Great Northern Sea is corresponding to the colony name: “UK Greater North Sea a” It is retain at the moment but can be excluded by searching for the colony name. 3)There are three colonies off the Netherlands coast that is named a) UK Greater North Sea d / colony id 90177 / entry 981 b) Noordzee Wadden_br / colony id 112384 / entry 12554 c) Noordzee Wadden_nbr / colony id 112389 / entry 12559 they are retained at the moment but can be searched for name colonyID and removed.

Saving R data and saving the table

save.image(config::get("b1_indicator_colony_correction_data"))
write.table(colonies_df, config::get("b1_indicator_colony_correction_table"),sep=',',row.names = F)