Navigation and subsetting
Region codes are not unique across geoframes, so every lookup names its geoframe.
geoscale_children
geoscale_children(
x: GeoScale,
geoframe: str,
region: Any,
target: str | None = None,
) -> list[str]
geoscale_parents
geoscale_parents(
x: GeoScale,
geoframe: str,
region: Any,
target: str | None = None,
) -> list[str]
geoscale_descendants
geoscale_descendants(
x: GeoScale,
geoframe: str,
region: Any,
target: str | None = None,
) -> pa.Table
geoscale_ancestors
geoscale_ancestors(
x: GeoScale,
geoframe: str,
region: Any,
target: str | None = None,
) -> pa.Table
geoscale_leaftable
geoscale_leaftable(x: GeoScale) -> pa.Table
geoscale_family
geoscale_family(
x: GeoScale,
parent: str | None = None,
child: str | None = None,
) -> pa.Table
Immediate parent-child pairs (all adjacent pairs by default).
geoscale_ancestry
geoscale_ancestry(x: GeoScale) -> pa.Table
geoscale_nests
geoscale_nests(x: GeoScale, parent: str, child: str)
Does every code at child sit inside one code at parent?
filter_geoscale
filter_geoscale(
x: GeoScale,
geoframe: str,
region: Any,
drop_empty_geoframes: bool = False,
) -> GeoScale
Keep the atoms of region at geoframe; a sample of the root parent.
Attached geometry follows the kept rows.
geoscale_coverage
geoscale_coverage(x: GeoScale, weight: str | None = None)
prune_geoscale
prune_geoscale(
x: GeoScale,
geoframe: str,
keep_geometry: bool | None = None,
) -> GeoScale
Collapse to geoframe (it becomes the atom layer), summing weights;
renamed "name@geoframe". Attached geometry is dissolved per code.
zoom_geoscale
zoom_geoscale(
x: GeoScale,
focus: str | Sequence[str],
geoframes: Sequence[str] | None = None,
name: str = "zoom",
label_rest: str = "%s_rest",
) -> GeoScale
Keep the focus atoms individual and group every other atom into the
finest ring (geoframe code) it shares with a focus atom; the rest fall
back to the coarsest of geoframes. Geoframes of the result: the
coarsest, name, the atoms.
geoscale_share
geoscale_share(
x: GeoScale,
geoframe: str,
weight: str | None = None,
within: str | None = None,
) -> pa.Table