Data Exploration Widgets

Specification

Each widget is specified as an entry in the widgets array in map-config.js.

const widgets = [
    {
        type: string,
        display: string,
        options: { ... },
        ...
    }
];

All widgets require the following fields:

Widget Types

Histograms

Create visualizations for single variables with histograms. Histograms are also interactive and can be used to filter what's highlighted on the map.

Configuration

{
    type: "histogram",
    display: "pinned" | "tray" | "hidden",
    variable: string,
    options: {
        header: string,
        foregroundColor: color,
        xAxisLabel: string,
        yAxisLabel: string,
        thresholds: int
    }
}

2D Scatterplots

Configuration

{
    type: "scatter",
    display: "pinned" | "tray" | "hidden",
    xVariable: string,
    yVariable: string,
    options: {
        header: string,
        foregroundColor: color,
        pointSize: number,
        xAxisLabel: string,
        yAxisLabel: string,
        showBestFitLine: bool,
        removeZeroValues: bool
    }
}

LISA Scatterplots

LISA statistics can be generated and plotted in Scatterplot widgets. To plot spatial lag values, set your yVariable to LISA:

{
    type: "scatter",
    yVariable: "LISA"
    // ...
}

Best fit lines are not supported for LISA scatterplots.

Clustering

Scatterplot widgets can calculate clusters using k-means clustering and display them as colors.

{
    type: "scatter",
    options: {
        foregroundColor: "cluster",
        numClusters: int,
        clusterColors: color[]
        // ...
    }
    // ...
}

Additional configuration options for cluster charts

3D Scatterplots

Configuration

{
    type: "scatter3d",
    display: "pinned" | "tray" | "hidden",
    xVariable: string,
    yVariable: string,
    zVariable: string,
    options: {
        header: string,
        foregroundColor: color,
        pointSize: number,
        xAxisLabel: string,
        yAxisLabel: string,
        zAxisLabel: string,
        gridlinesInterval: [number, number, number]
    }
}

Line

Display one-dimensional variables over time as a 2D line chart.

Configuration

{
    type: "line",
    display: "pinned" | "tray" | "hidden",
    variable: string,
    options: {
        header: string,
        foregroundColor: color,
        pointSize: number,
        xAxisLabel: string,
        yAxisLabel: string,
        showBestFitLine: bool,
        removeZeroValues: bool
    }
}

Last updated