Skip to content

Commit

Permalink
merged Merge branch 'dev' of https://github.com/OHI-Science/ohicore i…
Browse files Browse the repository at this point in the history
…nto dev
  • Loading branch information
CarloBroderick committed Sep 6, 2023
2 parents a8c6665 + cfeb01f commit 15de3af
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
Binary file modified data/rgn_synonyms.rda
Binary file not shown.
7 changes: 6 additions & 1 deletion data_raw/rgn_eez_v2013a_synonyms.csv
Original file line number Diff line number Diff line change
Expand Up @@ -295,4 +295,9 @@ NA,Vatican,NA,NA,landlocked
NA,World,NA,NA,largescale
NA,Zambia,NA,NA,landlocked
NA,Zimbabwe,NA,NA,landlocked
177,Netherlands (Kingdom of the),NL,NLD,ohi_region
177,Netherlands (Kingdom of the),NL,NLD,ohi_region
100,congo - brazzaville,CG,COG,ohi_region
199,congo - kinshasa,CD,COD,ohi_region
205,myanmar (burma),MM,MMR,ohi_region
127,st. vincent and grenadines,VC,VCT,ohi_region
116,u.s. virgin islands,PR,PRI,ohi_region
3 changes: 1 addition & 2 deletions updating_functions/name_2_rgn/test_countries.csv
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ Netherlands (Kingdom of the)
Venezuela (Boliv Rep of)
Réunion
Saint Martin (French Part)
Svalbard and Jan Mayen Islands
Saint Helena/Asc./Trist.
Svalbard and Jan Mayen Islands
12 changes: 7 additions & 5 deletions updating_functions/name_2_rgn/update_name_2_rgn.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@ library(tidyverse)
load(here::here("data/rgn_master.rda"))
#new synonyms, update with new synonyms
new_synonyms <- c("Netherlands (Kingdom of the)",
"saint helena ascension and tristan da cunha",
"Saint Helena/Asc./Trist.")
new_synonyms <- c("congo - brazzaville",
"congo - kinshasa",
"myanmar (burma)",
"st. vincent and grenadines",
"u.s. virgin islands")
#region ids, update with the matching region id for the synonym
#put NA for landlocked or disputed
region_ids <- c(177,86, 86)
region_ids <- c(100,199, 205, 127, 116)
#rgn type (must be be ohi_region, landlocked, or disputed)
region_types <- c("ohi_region", "ohi_region", "ohi_region")
region_types <- c("ohi_region", "ohi_region", "ohi_region", "ohi_region", "ohi_region")
#run the function to add synonyms
source(here::here("updating_functions/name_2_rgn/update_synonyms.R"))
Expand Down

0 comments on commit 15de3af

Please sign in to comment.