| summarize_coverage_by_resolution | R Documentation |
Summarize how much area is selected at each resolution in a multiscale H3 system. This function adjusts for overlap between coarse and fine planning units so that selected area is not double-counted across resolutions.
The output reports, for each resolution, the total available area, the effective selected area (after cross-scale adjustment), and the proportion selected.
summarize_coverage_by_resolution(
s,
flag_col = "selected_by_resolution_final",
cs_idx
)
s |
An |
flag_col |
Name of the 0/1 selection column to summarise. |
cs_idx |
A cross-scale index list from |
A tibble with columns:
res – resolution,
area_total_km2 – total area at that resolution,
area_selected_km2 – cross-scale selected area, and
coverage_prop – proportion selected.
parent <- "872a1072bffffff"
kids <- c("882a1072b1fffff", "882a1072b3fffff")
s <- data.frame(
h3_address = c(parent, kids),
res = c(7L, 8L, 8L),
area_km2 = c(14, 2, 2),
selected_by_resolution_final = c(0L, 1L, 0L)
)
maps <- build_h3_maps(s, res_levels = c(7L, 8L))
cs_idx <- build_crossscale_index(maps)
summarize_coverage_by_resolution(s, "selected_by_resolution_final", cs_idx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.