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

    Interface ChoroplethPoint

    One region of a choropleth map.

    The centroid is a longitude and a latitude in degrees, never a projected coordinate. Every producer has the pair -- d3.geoCentroid returns exactly it -- and asking for degrees removes the one thing MAIDR could not otherwise resolve: whether a rising y means north or south. Without them the map is read as a region list in declared order, which is a poorer reading but the one the data supports.

    { x: 'Nevada', y: 42.1, lon: -116.6, lat: 39.3, neighbors: ['Utah', 'Idaho'] }
    
    interface ChoroplethPoint {
        x: string | number;
        y: number;
        lon?: number;
        lat?: number;
        neighbors?: (string | number)[];
    }
    Index

    Properties

    Properties

    x: string | number

    The region's name.

    y: number

    The value the region is shaded by.

    lon?: number

    Centroid longitude, degrees east.

    lat?: number

    Centroid latitude, degrees north.

    neighbors?: (string | number)[]

    The regions this one shares a border with, by name.

    Declared because it cannot be recovered: adjacency is not derivable from rendered SVG paths, and not from centroids either -- two regions can have near centroids and no shared border, and a long region can border one whose centroid is far away. A layer that declares none keeps the spatial walk and is told nothing about borders, rather than something guessed.