Learn R Programming

geodimension (version 1.0.2)

get_level_data: Get level data

Description

Get the data table of a given level.

Usage

get_level_data(gd, level_name = NULL, inherited = FALSE, add_prefix = TRUE)

# S3 method for geodimension get_level_data(gd, level_name = NULL, inherited = FALSE, add_prefix = TRUE)

Value

A tibble object.

Arguments

gd

A geodimension object.

level_name

A string.

inherited

A boolean.

add_prefix

A boolean.

Details

It allows selecting whether we want only the data defined locally in the level or also those that it inherits from other higher levels with which it is related.

In case of inheriting attributes from other levels, in the table, these can have as a prefix the name of the level in uppercase.

See Also

Other information output functions: get_higher_level_names(), get_level_geometries(), get_level_layer(), get_level_names()

Examples

Run this code
ld <- gd_us |>
  get_level_data(level_name = "state",
                 inherited = TRUE)

Run the code above in your browser using DataLab