Variable Specification

The full variable specification reflects all the options available when specifying your variable. Below are all available variable parameters:

  • variable String: The name a well-adjusted human person might use to describe your variable

  • numerator String: The numerator for your variable. If you're only using properties from your geospatial data (eg. GeoJSON properties on each feature), you can call the column name directly here. Otherwise, this should refer to the joined data table you'd like to use.

  • nProperty String: The data column of your numerator to use (eg. 'Total Population')

  • nRange Number: For time-series data, specify a temporal range for the variable (eg. 1 - daily, 7 - weekly, etc). Cumulative time-series data can be used by calling this nRange with null

  • nIndex Number: ...

  • denominator String: The denominator for your variable. Same conditions apply as numerator!

  • dProperty String: The data column of your numerator to use (eg. 'Land Area')

  • dRange Number: See nRange. If not declared

  • dIndex Number: ...

  • scale Number: The scale calculated values will be mutiplied by. For example, if you're using a percentage variable that is normalized from 0-1, you might set a scale of 100. For many public health metrics, a scale of values per 10,000 or 100,000 may be useful.

  • binning String: The binning strategy you want for this variable. By default, natural breaks will be used. Read more on available binning strategies

  • numberOfBins Number: The number of bins to be generated. Defaults to 5. Built-in color brewer schemes support 3-9 bins.

  • colorScale Object or Array: A built-in color scale of your choice (eg. colors.colorBrewer.Reds) or a custom array of RGB values (eg. [[0,20,40],[20,40,80],[40,80,120]]). If using a custom scale, you should include the same number of colors as the number of bins.

  • fixedScale Array: Pre-define a range of bins by specifying the breakpoints as an array (eg. [5,10,15] will produce bins Less than 5, 5 to 10, 10 to 15, Greater than 15)

Last updated