Skip to contents

Set the data table of a given level.

Usage

set_level_data(gd, level_name, data)

# S3 method for geodimension
set_level_data(gd, level_name = NULL, data = NULL)

Arguments

gd

A geodimension object.

level_name

A string.

data

A tibble object.

Value

A geodimension object.

Details

We can get the table, filter or transform the data and redefine the level table.

It is checked that the attributes that have been used in the relationships remain in the table.

See also

geolevel, get_level_data

Other geodimension definition functions: add_level(), geodimension(), transform_crs()

Examples


ld <- gd_us |>
  get_level_data(level_name = "county",
                 inherited = TRUE)

gd_us <- gd_us |>
  set_level_data(level_name = "county",
                 data = ld)