Data Exploration Widgets
Specification
Each widget is specified as an entry in the widgets
array in map-config.js
.
All widgets require the following fields:
Key | Type | Description |
| One of: | The basic type of widget. |
| One of: | The starting position of the widget; widgets can be dragged by users. |
| Map | Additional options: see below. You must specify a value; to use default values, set to |
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
Key | Type | Description | Default |
| string | The name of the variable to display. | Required |
| string | The header/title of the widget. | null |
| hex code | The color of the bars. |
|
| string | The label of the x-axis. | null |
| string | The label of the y-axis. | null |
| int | This option will be passed to D3's binning function; the number of bins is not guaranteed to match this number. | 40 |
2D Scatterplots
Configuration
Key | Type | Description | Default |
| string | The name of the x-axis variable. | Required |
| string | The name of the y-axis variable. | Required |
| string | The header/title of the widget. | null |
| hex code | The color of the points. |
|
| number | The radius of the scatter points. | 0.1 |
| string | The label of the x-axis. | null |
| string | The label of the y-axis. | null |
| bool | Set to true to calculate and display a best fit line using linear regression. | false |
| bool | Set to true to remove points with zero values. | false |
LISA Scatterplots
LISA statistics can be generated and plotted in Scatterplot widgets. To plot spatial lag values, set your yVariable
to 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.
Additional configuration options for cluster charts
Key | Type | Description | Default |
| string | Should be set to | Required |
| int | The number of clusters to generate. | 2 |
| array of hex codes | The colors to use for each cluster. Should be an array with length >= | Required |
3D Scatterplots
Configuration
Key | Type | Description | Default |
| string | The name of the x-axis variable. | Required |
| string | The name of the y-axis variable. | Required |
| string | The name of the z-axis variable. | Required |
| string | The header/title of the widget. | null |
| hex code | The color of the points. |
|
| number | The radius of the scatter points. | 0.5 |
| string | The label of the x-axis. | null |
| string | The label of the y-axis. | null |
| string | The label of the z-axis. | null |
| number[3] | The intervals at which to draw gridlines and labels. Order: [x, y, z]. If omitted, no gridlines will be shown. | null |
Line
Display one-dimensional variables over time as a 2D line chart.
Configuration
Key | Type | Description | Default |
| string | The name of the variable to display. | Required7 |
| string | The header/title of the widget. | null |
| hex code | The color of the line. |
|
| number | The radius of the points on the line. | 1 |
| string | The label of the x-axis. | null |
| string | The label of the y-axis. | null |
| string | The format of the date labels. Specification on Day.js docs | "YYYY-MM-DD" |
Last updated