get_empty_geometry_instances | R Documentation |
Get the instances of the data table that do not have associated geometry for the specified geometry type.
get_empty_geometry_instances(gl, geometry)
## S3 method for class 'geolevel'
get_empty_geometry_instances(gl, geometry = NULL)
gl |
A |
geometry |
A string, type of geometry of the layer. |
A tibble
.
geodimension
, relate_levels
Other geolevel definition functions:
add_geometry()
,
check_key()
,
complete_point_geometry()
,
coordinates_to_geometry()
,
geolevel()
,
get_geometry()
layer_us_state <-
dplyr::inner_join(
get_level_data_geo(gd_us, "state"),
get_level_layer(gd_us, "state"),
by = c("statefp", "division", "region", "stusps", "name")
) |>
sf::st_as_sf()
us_state_point <-
coordinates_to_geometry(layer_us_state,
lon_lat = c("intptlon", "intptlat"))
state <-
geolevel(name = "state",
layer = layer_us_state,
key = "statefp",
snake_case = TRUE) |>
add_geometry(layer = us_state_point)
empty_geometry_instances <- state |>
get_empty_geometry_instances(geometry = "point")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.