Learn R Programming

RuHere (version 1.0.1)

states: Administrative Units (States, Provinces, and Regions)

Description

A simplified PackedSpatVector containing state-level polygons (e.g., provinces, departments, regions) for countries worldwide. Names and parent countries (geonunit) were cleaned (lowercase, accents removed).

Usage

states

Arguments

Format

A PackedSpatVector object with polygons of administrative divisions and one attribute:

name

State/province/region name.

Details

The dataset was generated from rnaturalearth::ne_states(). The following processing steps were applied:

  • kept only administrative types: "Province", "State", "Department", "Region", "Federal District";

  • selected only "name" and "geonunit" columns;

  • both fields were cleaned via tolower() and remove_accent();

  • records where state name = country name were removed;

  • geometries were simplified using terra::simplifyGeom(tolerance = 0.05);

  • wrapped with terra::wrap() for internal storage.

Examples

Run this code
data(states)
states <- terra::unwrap(states)
terra::plot(states)

Run the code above in your browser using DataLab