# Continuous

Binning is the process of classifying a body of data into discrete breakpoints, or bins, to more easily understand and digest the data. Many online maps utilize unclassified scales -- continuous color gradients -- but we prefer and provide tools for a robust set of binning strategies.

You can specify binning strategy and number of bins for each of your variables in `map-config.js` by setting the `binning` and `numberOfBins` parameters. For a more in-depth look at binning strategies, refer to [jsGeoDa docs](https://xunli.gitbook.io/jsgeoda/).

## Binning Modes

Here are the different binning modes available in WebGeoDa:

### Natural Breaks

This non-linear algorithm identifies natural groupings of values that highlight more intuitive breakpoints.

```javascript
{
    // some variable
    binning: 'naturalBreaks',
    numberOfBins:5, // 3 - 9
}
```

### Quantiles

Quantile breaks create bins based on an equal number of entries in numerical order based on the given number of bins.

```javascript
{
    // some variable
    binning: 'quantileBreaks',
    numberOfBins:5, // 3 - 9
}
```

### Percentiles

Percentile breaks identify bins at the 1% lowest percentile, 10th percentile, 50th percentile (median), 90th percentile, and 99% highest perceentile.

```javascript
{
    // some variable
    binning: 'percentileBreaks'
}
```

### Standard Deviations

Standard deviations are calculated from your given variable based on .... Standard Deviation breaks fall on less than -2 standard deviations, -1 to -2 standard deviations, 0 to -1 standard deviations, 0 to +1 standard deviations, +1 to +2 standard deviations and greater than +2 standard deviations.

```javascript
{
    // some variable
    binning: 'stddev_breaks'
}
```

### Hinge Breaks

15/30

```javascript
{
    // some variable
    binning: 'hingeBreaks15' // alternatively 'hingeBreaks30'
}
```

### Custom, Fixed Scales

If you want to provide a custom or fixed binning scale for your data, such as a particular equal interval (eg. 5, 10, 15, 20, 25, etc.), you can provide a `fixedScale` parameter in your variable:

```javascript
{
    variable: 'Percent Vaccinated',
    fixedScale: [20, 30, 40, 50, 60, 70],
    colorScale: colors.colorBrewer.Greens
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.webgeoda.org/variables/continuous-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
