A synthetic 3-level hierarchy used in examples and tests. It deliberately reproduces three awkward features of real region tables:
Value
A Geoscale with 7 atoms and levels
country/state/zone/atom.
Details
a code (
"N1") reused at more than one level, so bare codes are ambiguous and every lookup must name its level;a non-nesting pair of levels — zone
"ZB"draws atoms from two different states (and two different countries), sostateandzonedo not form a tree;an atom (
"ROW") with no code at any coarser level (partial coverage).
Examples
gs <- geoscale_example()
gs
#> Geoscale: example
#> Description: Synthetic example: reused code, non-nesting level pair, and an unassigned atom
#> Levels (4, coarsest first):
#> - country (2) [1 atom(s) unassigned]
#> - state (3) [1 atom(s) unassigned]
#> - zone (3) [1 atom(s) unassigned]
#> - atom (7)
#> Atoms: 7
#> Weights: km2, pop (default: km2)
geo_nests(gs, "state", "zone") # FALSE - they cross-cut
#> [1] FALSE
#> attr(,"offenders")
#> [1] "ZB"