fetch_regions: Fetch ISO 3166 Country and Subdivision Codes

View source: R/fetch_regions.R

fetch_regionsR Documentation

Fetch ISO 3166 Country and Subdivision Codes

Description

Returns a data frame containing ISO 3166-1 country codes and ISO 3166-2 subdivision codes for the specified administrative level.

Usage

fetch_regions(admin_lvl = 0)

Arguments

admin_lvl

[optional] (integer) Administrative level to retrieve: 0 for country-level (ISO 3166-1), 1 for first-level subdivisions (ISO 3166-2), or NULL to include both (default: 0).

Value

A data frame containing region names, ISO 3166-2 codes, and the corresponding administrative levels.

Examples

# Example: Fetch ISO 3166-1 country codes
## Not run: 
  fetch_regions()

## End(Not run)

geeLite documentation built on Aug. 9, 2025, 1:08 a.m.