# NOT RUN {
library(tidyr)
library(starschemar)
library(sf)
gms <- geomultistar(ms = ms_mrs, geodimension = "where") %>%
define_geoattribute(
attribute = "city",
from_layer = usa_cities,
by = c("city" = "city", "state" = "state")
)
gms <- gms %>%
define_geoattribute(attribute = c("region", "all_where"),
from_attribute = "city")
gms <- gms %>%
define_geoattribute(from_attribute = "city")
gms <- gms %>%
define_geoattribute(attribute = "all_where",
from_layer = usa_nation)
# }
Run the code above in your browser using DataLab