| Title: | Reference Data and Helpers for Small Island States and Territories |
|---|---|
| Description: | A curated reference list of countries and territories with classifications for Small Island Developing States (SIDS), sub-national island jurisdictions (SNIJ), World Bank region and income group, and political association. Sub-sovereign cases such as Aruba, Curacao, Bonaire, Sint Maarten, the French overseas territories, and Aaland Islands are represented with disambiguating codes that standard country-code packages often collapse or omit. Provides predicate helpers and a tidy joiner intended to extend rather than replace 'countrycode'. Source data is maintained at <https://github.com/University-of-Aruba/island-research-reference-data> and licensed CC BY 4.0. |
| Authors: | Rendell de Kort [aut, cre] (ORCID: <https://orcid.org/0009-0006-5402-0500>), University of Aruba [cph, fnd] (Digital Competence Dutch Caribbean (DCDC) Network) |
| Maintainer: | Rendell de Kort <[email protected]> |
| License: | CC BY 4.0 |
| Version: | 0.2.0.9000 |
| Built: | 2026-09-28 07:25:55 UTC |
| Source: | https://github.com/university-of-aruba/islandcodes |
Left-joins selected columns from islands onto an
existing data frame, matching on a column of country names or ISO
codes. Designed for tidy pipelines but written in base R, so it works
with plain data frames, tibbles, and (read-only) data.tables.
add_island_cols( .data, code_col, cols = c("iso_code", "is_sids", "is_snij", "sids_tier", "political_association", "wb_region", "wb_income_group") )add_island_cols( .data, code_col, cols = c("iso_code", "is_sids", "is_snij", "sids_tier", "political_association", "wb_region", "wb_income_group") )
.data |
A data frame. |
code_col |
String. Name of the column in |
cols |
Character vector of columns from |
.data with the requested columns appended. Rows whose
code_col value cannot be resolved get NA in the new
columns.
df <- data.frame( country = c("Aruba", "Curacao", "Bonaire", "Brazil"), gdp = c(3.5, 3.1, 0.5, 1900) ) add_island_cols(df, "country")df <- data.frame( country = c("Aruba", "Curacao", "Bonaire", "Brazil"), gdp = c(3.5, 3.1, 0.5, 1900) ) add_island_cols(df, "country")
A convenience wrapper around island_lookup with Aruba
as the default. Calling aruba() returns Aruba's classification
row; passing another country or ISO code returns that one instead.
aruba(x = "Aruba", quiet = getOption("islandcodes.aruba.quiet", FALSE))aruba(x = "Aruba", quiet = getOption("islandcodes.aruba.quiet", FALSE))
x |
A character vector of country names or ISO codes. Defaults
to |
quiet |
Logical. If |
Named in homage to Edward Cheung, the Aruban engineer at NASA Goddard who designed A.R.U.B.A. (the ASCS/NCS Relay Unit Breaker Assembly) installed on the Hubble Space Telescope during the 2002 servicing mission. Cheung engineered the backronym specifically so children in his home country would have something concrete to point to on the telescope. We borrowed the trick. His ARUBA cuts power to Hubble's instruments when there is a fault; ours returns a row of classification data. Both spell Aruba.
A data frame with one row per element of x (the same
shape as island_lookup).
aruba() aruba("Curacao") aruba(c("AW", "BQ-BO", "CW"))aruba() aruba("Curacao") aruba(c("AW", "BQ-BO", "CW"))
Predicate helpers that return a logical vector aligned with the input.
is_sids(x) is_snij(x) is_small_island(x)is_sids(x) is_snij(x) is_small_island(x)
x |
A character vector of ISO codes or country names. |
Inputs are resolved in three passes: direct match against the
iso_code column of islands, then a case-insensitive
match against name, then a fallback through
countrycode from "country.name" to
"iso2c". Unresolved entries return NA.
Hyphenated codes ("BQ-BO" for Bonaire, "BQ-SE" for
Sint Eustatius, "BQ-SA" for Saba) are accepted directly. Bare
"BQ" is ambiguous within the bundled dataset; pass the
specific island code or the country name instead.
A logical vector the same length as x.
is_sids(c("Aruba", "Curacao", "Bonaire", "Brazil")) is_snij(c("Aruba", "Curacao", "Bonaire", "Brazil")) is_small_island(c("AW", "CW", "BQ-BO", "BR", "AX"))is_sids(c("Aruba", "Curacao", "Bonaire", "Brazil")) is_snij(c("Aruba", "Curacao", "Bonaire", "Brazil")) is_small_island(c("AW", "CW", "BQ-BO", "BR", "AX"))
Returns the latitude and longitude of a vector of country names or ISO
codes, one row per input and in input order (with NA rows for
unresolved inputs). Two location semantics are available: a representative
point on the territory's main landmass (the default), or the capital city.
island_coords(x, which = c("point", "capital"))island_coords(x, which = c("point", "capital"))
x |
A character vector of ISO codes or country names. |
which |
Which location to return: |
Inputs are resolved the same way as the predicate helpers (see
is_sids): by iso_code, then label, then the
XLSForm name slug, then a fallback through
countrycode.
Coordinates are WGS84 decimal degrees. A handful of territories carry no
coordinate and return NA: the representative point is missing only for
United States Minor Outlying Islands (a scattered, centroid-less collection),
while capitals are missing for uninhabited or capital-less territories
(Antarctica, Bouvet Island, the British Indian Ocean Territory, Heard Island,
South Georgia, Tokelau, US Minor Outlying Islands, and Western Sahara).
A data frame with one row per element of x. For
which = "point" the columns are label (the readable place
name), iso_code, latitude, and longitude. For
which = "capital" a capital city-name column is inserted
before the coordinates.
island_lookup for arbitrary columns,
add_island_cols to attach coordinates to a data frame.
island_coords(c("Aruba", "Curacao", "Bonaire")) # Capital cities instead of landmass points island_coords(c("AW", "PF", "GL"), which = "capital") # The two can differ substantially for dispersed territories island_coords("French Polynesia") island_coords("French Polynesia", which = "capital")island_coords(c("Aruba", "Curacao", "Bonaire")) # Capital cities instead of landmass points island_coords(c("AW", "PF", "GL"), which = "capital") # The two can differ substantially for dispersed territories island_coords("French Polynesia") island_coords("French Polynesia", which = "capital")
Haversine (great-circle) distance between the coordinates of islands and
territories, resolved from country names or ISO codes via the same matching
as the rest of the package (see is_sids). A natural primitive
for connectivity and isolation work on small islands.
island_distance( x, y = NULL, which = c("point", "capital"), unit = c("km", "mi", "nmi") )island_distance( x, y = NULL, which = c("point", "capital"), unit = c("km", "mi", "nmi") )
x |
A character vector of ISO codes or country names. |
y |
Optional second character vector. If |
which |
Coordinate to use: |
unit |
Output unit: |
When y is NULL, a numeric matrix
(length(x) by length(x)) with iso_code dimnames.
Otherwise a named numeric vector. Unresolved inputs and territories without
the requested coordinate propagate as NA.
# Spread of the Dutch Caribbean (ABC + SSS), in km round(island_distance(c("AW", "CW", "BQ-BO", "SX", "BQ-SA", "BQ-SE"))) # One origin to many island_distance("Aruba", c("Curacao", "Bonaire", "Sint Maarten")) # Capital-to-capital, in nautical miles island_distance("AW", "CW", which = "capital", unit = "nmi")# Spread of the Dutch Caribbean (ABC + SSS), in km round(island_distance(c("AW", "CW", "BQ-BO", "SX", "BQ-SA", "BQ-SE"))) # One origin to many island_distance("Aruba", c("Curacao", "Bonaire", "Sint Maarten")) # Capital-to-capital, in nautical miles island_distance("AW", "CW", which = "capital", unit = "nmi")
Returns the matching rows of islands for a vector of
country names or ISO codes. Useful when you want more than a single
classification and want to keep the original input order, including
NA rows for unresolved inputs.
island_lookup(x, fields = NULL)island_lookup(x, fields = NULL)
x |
A character vector of ISO codes or country names. |
fields |
Optional character vector of column names to return. If
|
A data frame with one row per element of x. Rows that
could not be resolved are filled with NA.
island_lookup(c("Aruba", "Bonaire", "Brazil")) island_lookup(c("AW", "BQ-BO"), fields = c("name", "is_sids", "is_snij"))island_lookup(c("Aruba", "Bonaire", "Brazil")) island_lookup(c("AW", "BQ-BO"), fields = c("name", "is_sids", "is_snij"))
Market access of each origin as the sum of destination mass discounted by
distance, . This is the
standard reduced-form measure used in economic geography and in the
remote-sensing literature on rural connectivity, where access rather than
raw distance is the quantity that predicts economic outcomes.
island_market_access( x, mass, to = NULL, theta = 1, which = c("point", "capital"), unit = c("km", "mi", "nmi"), self = NULL )island_market_access( x, mass, to = NULL, theta = 1, which = c("point", "capital"), unit = c("km", "mi", "nmi"), self = NULL )
x |
A character vector of ISO codes or country names: the origins. |
mass |
Numeric vector of destination mass. If named, names are resolved
the same way as |
to |
Optional character vector of destinations. Defaults to |
theta |
Positive distance-decay elasticity. Default |
which |
Coordinate to use: |
unit |
Distance unit the decay operates on: |
self |
Optional internal distance, in |
The package supplies the geometry, not the mass. Population, GDP, tourist
arrivals, and trade volumes are all time-varying and contested, so
mass is always user-supplied and the reference year is the caller's
to document. theta is likewise a modelling choice: values near 1 are
conventional for trade gravity, higher values concentrate weight on near
neighbours.
Own mass is excluded by default, because the internal distance of a
territory to itself is undefined at this resolution. Supply self to
include it under an explicit internal-distance assumption.
Distances are great-circle, computed by island_distance. See
the "Profiling the world's small island developing states" vignette for what
that does and does not represent for archipelagos.
A named numeric vector of market access, one element per element of
x, named by iso_code. Origins that cannot be resolved, or
that carry no coordinate, return NA. Destinations with missing mass
or missing coordinates are dropped from the sum rather than propagating.
island_distance, island_coords
# Illustrative population masses (thousands) for the Dutch Caribbean six. # Supply your own sourced figures in real work. pop <- c(AW = 108, CW = 156, SX = 43, "BQ-BO" = 25, "BQ-SE" = 3, "BQ-SA" = 2) round(island_market_access(names(pop), pop), 3) # Stronger decay concentrates weight on the nearest neighbours, separating # the ABC and SSS groups sharply. round(island_market_access(names(pop), pop, theta = 2), 6) # Access to the wider region rather than to each other. Illustrative # population in thousands. region <- c(US = 335000, CO = 52000, VE = 28000, DO = 11000) round(island_market_access(c("AW", "CW", "SX"), region, to = names(region)), 2)# Illustrative population masses (thousands) for the Dutch Caribbean six. # Supply your own sourced figures in real work. pop <- c(AW = 108, CW = 156, SX = 43, "BQ-BO" = 25, "BQ-SE" = 3, "BQ-SA" = 2) round(island_market_access(names(pop), pop), 3) # Stronger decay concentrates weight on the nearest neighbours, separating # the ABC and SSS groups sharply. round(island_market_access(names(pop), pop, theta = 2), 6) # Access to the wider region rather than to each other. Illustrative # population in thousands. region <- c(US = 335000, CO = 52000, VE = 28000, DO = 11000) round(island_market_access(c("AW", "CW", "SX"), region, to = names(region)), 2)
A curated dataset of 251 countries and territories, including sub-sovereign island jurisdictions (Aruba, Curacao, Bonaire, Sint Maarten, the French overseas collectivities, Aaland Islands, and others) that are typically collapsed or omitted by ISO 3166-1 country-code lists.
islandsislands
A data frame with 251 rows and 18 columns:
Short common name (e.g. "Aruba", "Curacao", "Bonaire").
Display label, used by the upstream XLSForm survey.
ISO 3166-1 alpha-2 code, with hyphenated extensions
for the three BES islands (BQ-BO Bonaire, BQ-SE
Sint Eustatius, BQ-SA Saba) so they can be distinguished
within the shared BQ prefix.
World Bank region.
World Bank income group.
Sovereign power for non-independent
territories; "Independent" otherwise.
1 if a UN-DESA recognised Small Island Developing State (member or associate); 0 otherwise.
"Sovereign member", "Associate member",
or NA where not applicable.
1 if a sub-national island jurisdiction; 0 otherwise.
1 if meets the small-population/small-area criterion; 0 otherwise.
1 if an island or archipelago; 0 otherwise.
1 if classified as developing; 0 otherwise.
1 if a sovereign state; 0 otherwise.
Representative point on the main landmass, WGS84
decimal degrees. NA for United States Minor Outlying Islands.
Representative point on the main landmass, WGS84 decimal degrees.
Capital city name, or NA for uninhabited /
capital-less territories.
Capital city, WGS84 decimal degrees.
Capital city, WGS84 decimal degrees.
University of Aruba, Digital Competence Dutch Caribbean (DCDC) Network. island-research-reference-data, CC BY 4.0. https://github.com/University-of-Aruba/island-research-reference-data
head(islands) # SIDS by World Bank region table(islands$wb_region[islands$is_sids == 1]) # Dutch Kingdom territories (an example of the SNIJ axis) islands[islands$political_association == "Dutch Kingdom", c("name", "iso_code", "is_sids", "is_snij")] # Coordinates: representative landmass point and capital city islands[islands$iso_code == "AW", c("name", "latitude", "longitude", "capital", "capital_latitude", "capital_longitude")]head(islands) # SIDS by World Bank region table(islands$wb_region[islands$is_sids == 1]) # Dutch Kingdom territories (an example of the SNIJ axis) islands[islands$political_association == "Dutch Kingdom", c("name", "iso_code", "is_sids", "is_snij")] # Coordinates: representative landmass point and capital city islands[islands$iso_code == "AW", c("name", "latitude", "longitude", "capital", "capital_latitude", "capital_longitude")]
Convenience wrapper around islands that returns the
subset matching commonly used small-island filters.
small_islands(sids_only = FALSE, snij_only = FALSE, criteria = NULL)small_islands(sids_only = FALSE, snij_only = FALSE, criteria = NULL)
sids_only |
Logical. If |
snij_only |
Logical. If |
criteria |
Optional named logical vector with elements drawn
from |
A data frame, the relevant subset of islands.
nrow(small_islands(sids_only = TRUE)) nrow(small_islands(snij_only = TRUE)) small_islands(criteria = c(small = TRUE, island = TRUE))nrow(small_islands(sids_only = TRUE)) nrow(small_islands(snij_only = TRUE)) small_islands(criteria = c(small = TRUE, island = TRUE))