Learn R Programming

geogenr (version 1.0.1)

get_common_geomultistar: Get common geomultistar

Description

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

Usage

get_common_geomultistar(uf)

# S3 method for uscb_folder get_common_geomultistar(uf)

Value

A geomultistar object.

Arguments

uf

A uscb_folder object.

Details

The name of the facts is the layer group name.

See Also

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

Examples

Run this code

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])
uf <- uscb_folder(ul)

gms <- uf |> get_common_geomultistar()

Run the code above in your browser using DataLab