Skip to contents

Which countries share a land border with which, as a tidy edge list – built from polygon topology (sf::st_touches()), so it reflects the same curated geometry as the rest of the package. Powers neighbors(). Convert to a graph with e.g. igraph::graph_from_data_frame(country_borders(), directed = FALSE) if you need one.

Usage

country_borders(scale = "small", region = NULL)

Arguments

scale

Natural Earth resolution to compute adjacency from. Coarser scales simplify small slivers and may miss a handful of short borders.

region

Optional region subset (see world_geometry()); a pair is only reported when both countries remain in the subset.

Value

A tibble, one row per bordering pair: iso3c_a, country_a, iso3c_b, country_b. Each unordered pair appears once, with iso3c_a <= iso3c_b alphabetically.

Examples

if (FALSE) { # \dontrun{
country_borders()
country_borders(region = "Europe")
} # }