The one-row-per-leaf table the geoscale is built on, as a plain
data.frame — the exported accessor to prefer over reaching for
x@leaftable (the twin of timescales::calendar_leaftable()).
as.data.frame() and ggplot2::fortify() on a GeoScale are
equivalent, so ggplot(gs) + geom_*() pipelines work directly.
Usage
geoscale_leaftable(x)
# S3 method for class 'GeoScale'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
# S3 method for class '`geoscales::GeoScale`'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
# S3 method for class 'GeoScale'
fortify(model, data, ...)Examples
head(geoscale_leaftable(geoscale_example()))
#> country state zone cell km2 pop
#> 1 N N1 N1 A1 100 10
#> 2 N N1 N1 A2 200 90
#> 3 N N2 ZB A3 300 30
#> 4 N N2 ZB A4 400 70
#> 5 S S1 ZB A5 500 50
#> 6 S S1 ZC A6 600 50
head(as.data.frame(geoscale_example()))
#> country state zone cell km2 pop
#> 1 N N1 N1 A1 100 10
#> 2 N N1 N1 A2 200 90
#> 3 N N2 ZB A3 300 30
#> 4 N N2 ZB A4 400 70
#> 5 S S1 ZB A5 500 50
#> 6 S S1 ZC A6 600 50
