MAIDR Documentation - v4.4.0
    Preparing search index...

    Interface ChoroplethDeclaration

    Geographic regions shaded by a value.

    Read as a bar chart whose categories happen to be places, it loses everything spatial: where the high values sit, which way the gradient runs, and which borders the value jumps across. lon/lat are what buy that back.

    interface ChoroplethDeclaration {
        title?: string;
        name?: string;
        type: CHOROPLETH;
        region?: string;
        value?: string;
        lon?: string;
        lat?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    title?: string

    Overrides the layer's announced title. Maps to MaidrLayer.title.

    Names the chart; use DeclarationBase.name to say which layer of it this is.

    name?: string

    Names this layer among sibling layers. Maps to MaidrLayer.name.

    Announced on a layer switch in place of the trace type, so a hue-split figure says "Male" and "Female" rather than "error_bar plot" twice.

    TraceType.CHOROPLETH — the string 'choropleth'.

    region?: string

    Field holding the region's name. Maps to ChoroplethPoint.x.

    The chain is a map's own, not the one every other declaration shares: the names a place answers to on a GeoJSON or TopoJSON feature, ending in x so the ordinary region table — { x: 'Texas', y: 12.4 } — is read the right way round. Resolved against the row and against its properties, which is where a feature keeps everything joined onto it, so region: 'NAME' finds properties.NAME without being spelled as a path.

    'region', falling back to name, NAME, name_long, admin, state, id, label or x

    value?: string

    Field holding the value the region is shaded by. Maps to ChoroplethPoint.y.

    A map's own chain, deliberately not the one RidgelineDeclaration.value carries: x is a position on the value axis of a ridgeline and the place's own name on a map, and announcing "Texas" as the value of Texas is a wrong reading a listener cannot tell from a right one. Read off the row's properties as well, exactly as ChoroplethDeclaration.region is.

    'value', falling back to y, rate, density or count

    lon?: string

    Field holding the region's centroid longitude, in degrees east. Maps to ChoroplethPoint.lon.

    Degrees only. Projected or normalised coordinates must be omitted rather than converted by guesswork: without the pair the map is read as a region list in declared order, which is a poorer reading but the one the data supports, while a wrong compass direction is a confident wrong answer.

    'lon', falling back to longitude or long

    lat?: string

    Field holding the region's centroid latitude, in degrees north. Maps to ChoroplethPoint.lat. Degrees only, exactly as ChoroplethDeclaration.lon.

    'lat', falling back to latitude