Learn R Programming

geogenr (version 1.0.0)

get_geomultistar: Get geomultistar

Description

Get all the layer group data in the form of a geomultistar object: It contains fact and dimension tables, and a dimension with an associated geographic layer.

Usage

get_geomultistar(ul)

# S3 method for uscb_layer get_geomultistar(ul)

Arguments

ul

A uscb_layer object.

Value

A geomultistar object.

Details

The name of the facts is the layer group name.

See Also

Other result generation functions: get_common_flat_table(), get_common_geomultistar(), get_flat_table()

Examples

Run this code
# NOT RUN {
library(tidyr)

folder <- system.file("extdata", package = "geogenr")
folder <- stringr::str_replace_all(paste(folder, "/", ""), " ", "")
ua <- uscb_acs_5ye(folder = folder)
sa <- ua %>% get_statistical_areas()
# sa[6]
# [1] "New England City and Town Area Division"
ul <- uscb_layer(uscb_acs_metadata, ua = ua, geodatabase = sa[6], year = 2015)
layers <- ul %>% get_layer_names()
# layers[3]
# [1] "X02_RACE"
ul <- ul %>% get_layer(layers[3])
lg <- ul %>% get_layer_group_names()
# lg[2]
# [1] "003 - DETAILED RACE"
ul <- ul %>% get_layer_group(lg[2])

gms <- ul %>% get_geomultistar()

# }

Run the code above in your browser using DataLab