Skip to contents

zone/zone_metric never carry a human name — only the key a report picks from ("ALA"), because that is all score_zones.qmd writes (CREATE TABLE zone (..., val VARCHAR, ...), no name column, on every generation v1–v9). The name ("Aleutian Arc") lives on the GEOMETRY instead: every zone-set GeoPackage carries a {type}_key/{type}_name column pair (verified on the real v1–v8 sources — programarea_key/programarea_name, planarea_key/planarea_name, ecoregion_key/ecoregion_name, subregion_key/subregion_name).

Usage

app_zone_names(path, type)

Arguments

path

a GeoPackage (or any sf::st_read()-able file) carrying {type}_key/{type}_name columns, e.g. data/zone_sets.csv's source

type

the zone type ("programarea", "planarea", "ecoregion", "subregion"), i.e. the {type}_key/{type}_name column prefix

Value

data.frame(fld, key, name), one row per distinct key

Details

A release-side caller reads it here and hands the lookup to app_zones() / app_boot() / app_bundle_build() as zone_names — msens's own boot/manifest builders stay con-only introspection and never open a GIS file mid-build.