Skip to content

Commit

Permalink
updated ISO code for Northern Cyprus
Browse files Browse the repository at this point in the history
  • Loading branch information
mtennekes committed Nov 26, 2024
1 parent 15c2f18 commit ad8f70e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
4 changes: 2 additions & 2 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' | `iso_a3` | NED | ISO 3166-1 alpha-3 three-letter country code (see below) |
#' | `name` | NED | Country name |
#' | `sovereignt` | NED | Sovereignt country name |
#' | `continent` | NED | Continent |
#' | `continent` | NED | Continent (primary; some countries are transcontinental) |
#' | `area` | NED | Area in km2 |
#' | `pop_est` | NED | Population estimation |
#' | `pop_est_dens` | NED | Population estimation per km2|
Expand All @@ -27,7 +27,7 @@
#'
#' This dataset, created Noveber 2024, is an update from the old version, which has been created around 2016. All variables from the old version are included, but updated. Furthermore, gender ineuqlity and press freedom have been added.
#'
#' ISO country-code: XKX is used for Kosovo (conform European Union and World Bank) (was UNK in the old version. CYN is used for Northern Cyprus (as in the old version).
#' ISO country-code: two countries have user-assigned codes, namely: XKX is used for Kosovo (conform European Union and World Bank) (was UNK in the old version); XNC is used for Northern Cyprus (was CYN in the old version).
#'
#' For some variables data were available from multiple years, but availability was different across countries. In those cases, the most recent values were taken.
#' @rdname World
Expand Down
5 changes: 4 additions & 1 deletion data-raw/World.R
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ if (FALSE) {
W4[is.na(W4$press), ]
}

W4$iso_a3[W4$name == "N. Cyprus"] = "CYN" # just to make unique iso a3 codes
W4$iso_a3[W4$name == "N. Cyprus"] = "XNC" # just to make unique iso a3 codes


attr(W4, "agr")[] = c("identity", "identity", "constant", "constant", "aggregate",
Expand All @@ -286,5 +286,8 @@ attr(W4, "agr")[] = c("identity", "identity", "constant", "constant", "aggregate

World = W4

ccodes = geodata::country_codes()
setdiff(World$iso_a3, ccodes$ISO3)


save(World, file="data/World.rda", compress="xz")
Binary file modified data/World.rda
Binary file not shown.
4 changes: 2 additions & 2 deletions man/World.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions man/tm_group.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ad8f70e

Please sign in to comment.