Basic Mapping

Common map classifications include the Quantile Map, Natural Breaks Map, and Equal Intervals Map. Specialized classifications that are designed to bring out extreme values include the Percentile Map, Box Map (with two options for the hinge), and the Standard Deviation Map. The methods of map classification calculate a corresponding breakpoint list for a selected variable. For more information about the map classification, please read

1. Natural Breaks

Natural Breaks calculates a list of breakpoints based on the fracture principle of maximum similarity within a group.


Array naturalBreaks(Number k, Array val)


const jsgeoda = require('jsgeoda');
const fs = require('fs');

// load data
const data = fs.readFileSync('./data/natregimes.geojson').buffer;

// create jsgeoda instance
const geoda = await jsgeoda.New();

// load geojson in jsgeoda
const nat = geoda.readGeoJSON(data);

// get data 
const hr60 = geoda.getCol(nat, 'HR60');

// natural breaks
const brks = geoda.naturalBreaks(5, hr60);

Try it yourself in the playground (jsgeoda +


jsgeoda provides some utility functions for working with or, such as:

function getViewport(String mapUid, Number screenWidth, Number screenHeight)

2. Quantile Breaks

Quantile Breaks is based on sorted values for a variable that are then grouped into bins that each have the same number of observations, the so-called quantiles.


Array quantileBreaks(Number k, Array val)

3. Percentile Breaks

Percentile Breaks divides the data into six ranges: the lowest 1%, 1-10%, 10-50%, 50-90%, 90-99% and the top 1%.


Array percentileBreaks(Number k, Array val)

4. Hinge Box Breaks

Hinge Box Breaks calculates a list of breakpoints, including the top, bottom, median, and two quartiles of the data. The hinge values can be 1.5 or 3.0.


Array hinge15Breaks(Array val)


Array hinge30Breaks(Array val)

5. Standard Deviation Breaks

Standard Deviation Breaks calculates the number of standard deviational units of the range from lowest to highest, returning a breakpoint list.


Array standardDeviationBreaks(Array val)

Last updated