Skip to content

Construction

Three layers, from most to least convenient: a provider, parent-child crosswalks, or a wide table you already have.

geoscale_from_provider

geoscale_from_provider(
    provider: Any = "naturalearth",
    geoframes: Sequence[str] | None = None,
    weights: Sequence[str] | None = None,
    geometry: bool = True,
    name: str = "",
    desc: str = "",
    **kwargs: Any,
) -> GeoScale

A GeoScale from a registered provider, or from a table/GeoDataFrame.

geoscale_build

geoscale_build(
    *xwalks: Any,
    geoframes: Sequence[str],
    weights: Any = None,
    name: str = "",
    desc: str = "",
    row_order: str = "nested",
) -> GeoScale

A GeoScale assembled from two-column parent-child crosswalks.

geoscale_from_leaftable

geoscale_from_leaftable(
    leaftable: Any,
    geoframes: Sequence[str] | str,
    key: str | None = None,
    weights: Sequence[str] | str | None = None,
    default_weight: str | None = None,
    members: Mapping[str, Sequence[str]] | None = None,
    geometry: Any = None,
    name: str = "",
    desc: str = "",
    row_order: str = "nested",
    **meta: Any,
) -> GeoScale

A GeoScale from a table with one row per atom.

Blank codes become null; key defaults to region, else the finest geoframe (copied into region); weights defaults to every numeric non-geoframe column; members to first-appearance order.