geolevel | R Documentation |
geolevel
S3 classA geolevel
object is created from a given geographic layer. The attributes
of the layer to be included in the level can be indicated; if no attribute is
indicated, all are considered. The attributes that make up the key must be
indicated.
geolevel(
name = NULL,
layer = NULL,
attributes = NULL,
key = NULL,
snake_case = FALSE
)
name |
A string, level name. |
layer |
A |
attributes |
A string vector, selected attributes. |
key |
A string vector, attributes that compose the key. |
snake_case |
A boolean, transform all names to snake_case. |
A level can have two associated geometries (point or polygon). The geometry is obtained from the layer data.
We can also define a level from a tibble
, which does not have any associated
geometry. The geometry will be obtained from the relationships between levels
that we define or from layers related to this data.
The name of the level is used later to reference it and relate it to other levels.
A geolevel
object.
geodimension
, relate_levels
Other geolevel definition functions:
add_geometry()
,
check_key()
,
complete_point_geometry()
,
coordinates_to_geometry()
,
get_empty_geometry_instances()
,
get_geometry()
layer_us_state <- get_level_layer(gd_us, "state")
state <-
geolevel(name = "state",
layer = layer_us_state,
key = "statefp",
snake_case = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.