# Overview

Calculating variables on-the-fly is possible with a variety of simple descriptors to derive new fields or use pre-processed data. There are three variable types:

* **Continuous**: Numeric variables on a continuous scale, such as population density or access to internet
* **Categorical**: Ordinal variables with fixed categories for each geography, such as electricity infrastructure, vulnerability category, or any dummy variables.
* **LISA**: *Local Indicator of Spatial Autocorrelation* statistics, which identify significant hotspots, coldspots, and neighboring geographies.

In `map-config.js` in the project root folder, you'll see `variables` where you can define your variables.

```javascript
const variables = [
    {
        variable: "Median age",
        numerator: 'Median age',
        binning: 'naturalBreaks',
        numberOfBins:7,
        colorScale: colors.colorbrewer.Purples
    }
    ...
]
```

In this example, we make a variable called `Median Age` that uses the column `Median Age` from our GeoJSON. It uses the *natural breaks* binning strategy (more on binning [here](https://github.com/nofurtherinformation/webgeoda-gitbook/tree/f32b024ae45448f60ff60d3566f1267e6994e579/data/variables/data/creating-variables/binning-types.md)), with 7 bins, and uses the [ColorBrewer](http://colorbrewer.org/) purples color scheme.

You can declare multiple variables, which will appear in the drop down menu on the left side of the map Each variable can be dynamically binned, or provided with a fixed color scheme. You can use time-series data, single columns, or categorical data.

See the [full variable specification](https://github.com/nofurtherinformation/webgeoda-gitbook/tree/f32b024ae45448f60ff60d3566f1267e6994e579/data/variables/data/variables/full-spec.md) for more information.

## Available Color Scales

Currently, all [ColorBrewer](http://colorbrewer.org/) scales are included. Most support 3-9 bins. See more [here](https://github.com/nofurtherinformation/webgeoda-gitbook/tree/f32b024ae45448f60ff60d3566f1267e6994e579/data/variables/data/variables/colors.md)


---

# 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/overview.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.
