# jsgeoda

#### Methods

**azpGreedy(weights, k, values, inits, initRegion, minBoundValues, minBounds, maxBoundValues, maxBounds, scaleMethod, distanceMethod, seed) → {Object}**

A greedy algorithm to solve the AZP problem.

A greedy algorithm to solve the AZP problem

**Parameters:**

| Name             | Type          | Description                                                                                                                                     |
| ---------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `weights`        | WeightsResult | The weights object `WeightsResult`                                                                                                              |
| `k`              | Number        | The number of spatially constrained clusters                                                                                                    |
| `values`         | Array         | The list of numeric vectors of selected variable.                                                                                               |
| `inits`          | Number        | The number of construction re-runs, which is for ARiSeL "automatic regionalization with initial seed location"                                  |
| `initRegion`     | Array         | The initial regions that the local search starts with. Default is empty. means the local search starts with a random process to "grow" clusters |
| `minBoundValues` | Array         | The list of numeric array of selected minimum bounding variables.                                                                               |
| `minBounds`      | Array         | The list of minimum value that the sum value of bounding variables in each cluster should be greater than.                                      |
| `maxBoundValues` | Array         | The list of numeric array of selected maximum bounding variables.                                                                               |
| `maxBounds`      | Array         | The list of minimum value that the sum value of bounding variables in each cluster should be less than.                                         |
| `scaleMethod`    | String        | The scaling methods {'raw', 'standardize', 'demean', 'mad', 'range\_standardize', 'range\_adjust'}. Defaults to 'standardize'.                  |
| `distanceMethod` | String        | The distance methods {"euclidean", "manhattan"}. Defaults to 'euclidean'.                                                                       |
| `seed`           | Number        | The seed for random number generator.                                                                                                           |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1688](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1688)

**Returns:**

Return a ClusteringResult object: {'total\_ss', 'within\_ss', 'between\_ss', 'ratio', 'clusters'}TypeObject

**azpSA(weights, k, values, coolingRate, saMaxIt, inits, initRegion, minBoundValues, minBounds, maxBoundValues, maxBounds, scaleMethod, distanceMethod, seed) → {Object}**

A simulated annealing algorithm to solve the AZP problem.

A simulated annealing algorithm to solve the AZP problem

**Parameters:**

| Name             | Type          | Description                                                                                                                                     |
| ---------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `weights`        | WeightsResult | The weights object `WeightsResult`                                                                                                              |
| `k`              | Number        | The number of spatially constrained clusters                                                                                                    |
| `values`         | Array         | The list of numeric vectors of selected variable.                                                                                               |
| `coolingRate`    | Number        | The number of iterations of simulated annealing. Defaults to 1                                                                                  |
| `saMaxIt`        | Number        | The number of iterations of simulated annealing. Defaults to 1                                                                                  |
| `inits`          | Number        | The number of construction re-runs, which is for ARiSeL "automatic regionalization with initial seed location"                                  |
| `initRegion`     | Array         | The initial regions that the local search starts with. Default is empty. means the local search starts with a random process to "grow" clusters |
| `minBoundValues` | Array         | The list of numeric array of selected minimum bounding variables.                                                                               |
| `minBounds`      | Array         | The list of minimum value that the sum value of bounding variables in each cluster should be greater than.                                      |
| `maxBoundValues` | Array         | The list of numeric array of selected maximum bounding variables.                                                                               |
| `maxBounds`      | Array         | The list of minimum value that the sum value of bounding variables in each cluster should be less than.                                         |
| `scaleMethod`    | String        | The scaling methods {'raw', 'standardize', 'demean', 'mad', 'range\_standardize', 'range\_adjust'}. Defaults to 'standardize'.                  |
| `distanceMethod` | String        | The distance methods {"euclidean", "manhattan"}. Defaults to 'euclidean'.                                                                       |
| `seed`           | Number        | The seed for random number generator.                                                                                                           |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1747](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1747)

**Returns:**

Return a ClusteringResult object: {'total\_ss', 'within\_ss', 'between\_ss', 'ratio', 'clusters'}TypeObject

**azpTabu(weights, k, values, tabuLength, convTabu, inits, initRegion, minBoundValues, minBounds, maxBoundValues, maxBounds, scaleMethod, distanceMethod, seed) → {Object}**

A tabu-search algorithm to solve the AZP problem.

A tabu-search algorithm to solve the AZP problem.

**Parameters:**

| Name             | Type          | Description                                                                                                                                     |
| ---------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `weights`        | WeightsResult | The weights object `WeightsResult`                                                                                                              |
| `k`              | Number        | The number of spatially constrained clusters                                                                                                    |
| `values`         | Array         | The list of numeric vectors of selected variable.                                                                                               |
| `tabuLength`     | Number        | The length of a tabu search heuristic of tabu algorithm. Defaults to 10.                                                                        |
| `convTabu`       | Number        | The number of non-improving moves. Defaults to 10.                                                                                              |
| `inits`          | Number        | The number of construction re-runs, which is for ARiSeL "automatic regionalization with initial seed location"                                  |
| `initRegion`     | Array         | The initial regions that the local search starts with. Default is empty. means the local search starts with a random process to "grow" clusters |
| `minBoundValues` | Array         | The list of numeric array of selected minimum bounding variables.                                                                               |
| `minBounds`      | Array         | The list of minimum value that the sum value of bounding variables in each cluster should be greater than.                                      |
| `maxBoundValues` | Array         | The list of numeric array of selected maximum bounding variables.                                                                               |
| `maxBounds`      | Array         | The list of minimum value that the sum value of bounding variables in each cluster should be less than.                                         |
| `scaleMethod`    | String        | The scaling methods {'raw', 'standardize', 'demean', 'mad', 'range\_standardize', 'range\_adjust'}. Defaults to 'standardize'.                  |
| `distanceMethod` | String        | The distance methods {"euclidean", "manhattan"}. Defaults to 'euclidean'.                                                                       |
| `seed`           | Number        | The seed for random number generator.                                                                                                           |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1808](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1808)

**Returns:**

Return a ClusteringResult object: {'total\_ss', 'within\_ss', 'between\_ss', 'ratio', 'clusters'}TypeObject

**callLisa(weights, values, permutations, seed) → {Object}**

Helper function: apply LISA statistics.

Helper function: apply LISA statistics

**Parameters:**

| Name           | Type   | Description                                                                                                                                                                                                                             |
| -------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `weights`      | String | The weights object `WeightsResult`                                                                                                                                                                                                      |
| `values`       | Array  | The values that local moran statistics will be applied on.                                                                                                                                                                              |
| `permutations` | Number | <p>The number of permutations for the LISA computation. Default: 999.</p><ul><li>@param {String} permutationMethod The permutation method used for the LISA computation. Options are 'complete', 'lookup'. Default: 'lookup'.</li></ul> |
| `seed`         | Number | The seed for random number generator used in LISA statistics. Default: 123456789.                                                                                                                                                       |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1156](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1156)

**Returns:**

An instance of `LisaResult`TypeObject

**cartogram(mapUid, values) → {Array}**

Create cartogram using the values in the map.

Create cartogram using the values in the map. In cartograms, the size of a variable's value corresponds to the size of a shape. The location of the circles is aligned as closely as possible to the location of the associated area through a nonlinear optimization routine

**Parameters:**

| Name     | Type   | Description                                                |
| -------- | ------ | ---------------------------------------------------------- |
| `mapUid` | String | A unique map Id                                            |
| `values` | Array  | The values that the classify algorithm will be applied on. |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 994](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line994)

**Returns:**

Returns an array of circles, which is defined as: { "properties": { "id" : 1}, "position": \[0.01, 0.01], "radius": 0.1 }TypeArray

**checkDistanceMethod(distanceMethod) → {Boolean}**

Helper function: check if distance method is valid.

Helper function: check if distance method is valid.

**Parameters:**

| Name             | Type   | Description |
| ---------------- | ------ | ----------- |
| `distanceMethod` | String |             |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1540](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1540)

**Returns:**

TypeBoolean

**checkInputKernel(kernel) → {Boolean}**

check if input kernel is valid.

check if input kernel is valid

**Parameters:**

| Name     | Type | Description |
| -------- | ---- | ----------- |
| `kernel` | \*   |             |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 460](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line460)

**Returns:**

TypeBoolean

**checkMapUid(mapUid) → {Boolean}**

Check if map uid is valid.

Check if map uid is valid

**Parameters:**

| Name     | Type   | Description |
| -------- | ------ | ----------- |
| `mapUid` | String |             |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 152](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line152)

**Returns:**

TypeBoolean

**checkScaleMethod(scaleMethod) → {Boolean}**

Helper function: check if scale method is valid.

Helper function: check if scale method is valid.

**Parameters:**

| Name          | Type   | Description |
| ------------- | ------ | ----------- |
| `scaleMethod` | String |             |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1525](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1525)

**Returns:**

TypeBoolean

**customBreaks(breakName, values, k) → {Object}**

Custom breaks that wraps {'natural\_breaks', 'quantile\_breaks', 'stdDevBreaks', 'hinge15Breaks', 'hinge30Breaks'}.

Custom breaks that wraps {'natural\_breaks', 'quantile\_breaks', 'stdDevBreaks', 'hinge15Breaks', 'hinge30Breaks'}

**Parameters:**

| Name        | Type   | Description                                                                                               |
| ----------- | ------ | --------------------------------------------------------------------------------------------------------- |
| `breakName` | String | The break name: {'natural\_breaks', 'quantile\_breaks', 'stdDevBreaks', 'hinge15Breaks', 'hinge30Breaks'} |
| `values`    | \*     | The values of selected variable.                                                                          |
| `k`         | \*     | The number of breaks.                                                                                     |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 837](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line837)

**Returns:**

{'k','bins','breaks','id\_array'}TypeObject

**distanceMethods() → {Object}**

Help function: Get distance methods.

Help function: Get distance methods.Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1222](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1222)

**Returns:**

TypeObject

**ebRisk(eventValues, baseValues) → {Array}**

Empirical Bayes (EB) Smoothed Rate.

Empirical Bayes (EB) Smoothed Rate

**Parameters:**

| Name          | Type  | Description                      |
| ------------- | ----- | -------------------------------- |
| `eventValues` | Array | The values of an event variable. |
| `baseValues`  | Array | The values of an base variable.  |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 913](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line913)

**Returns:**

TypeArray

**excessRisk(eventValues, baseValues) → {Array}**

Excess Risk.

Excess Risk

**Parameters:**

| Name          | Type  | Description                      |
| ------------- | ----- | -------------------------------- |
| `eventValues` | Array | The values of an event variable. |
| `baseValues`  | Array | The values of an base variable.  |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 900](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line900)

**Returns:**

TypeArray

**free()**

Free the memory used by wasm.

Free the memory used by wasmSource:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 143](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line143)

**generateUid() → {String}**

Help function: create a unique id for a Geojson map.

Help function: create a unique id for a Geojson mapSource:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 34](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line34)

**Returns:**

TypeString

**getBounds(mapUid) → {Array}**

Get map bounds.

Get map bounds

**Parameters:**

| Name     | Type   | Description                                        |
| -------- | ------ | -------------------------------------------------- |
| `mapUid` | String | A unique map id that has been read into GeoDaWasm. |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 166](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line166)

**Returns:**

TypeArray

**getCentroids(mapUid) → {Array}**

Get the centroids of geojson map.

Get the centroids of geojson map. Same as GEOS.algorithm.Centroid: the centroid were computed as a weighted sum of the centroids of a decomposition of the area into (possibly overlapping) triangles. The algorithm has been extended to handle holes and multi-polygons

**Parameters:**

| Name     | Type   | Description     |
| -------- | ------ | --------------- |
| `mapUid` | String | A unique map id |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 237](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line237)

**Returns:**

Returns an array of \[x,y] coordinates (not projected) of the centroids.TypeArray

**Example**

```
// In node.js
const fs = require('fs');
const jsgeoda = require('jsgeoda');
const geoda = await jsgeoda.New();

let ab = fs.readFileSync("NAT.geojson").buffer;
let nat = geoda.readGeoJSON("NAT", ab);
let cent = geoda.getCentroids(nat);
```

**getClusteringResult(r) → {Object}**

Helper function: get clustering results.

Helper function: get clustering results

**Parameters:**

| Name | Type   | Description |
| ---- | ------ | ----------- |
| `r`  | Object |             |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1555](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1555)

**Returns:**

{'clusters', 'total\_ss', 'between\_ss', 'within\_ss', 'ratio'}TypeObject

**getClusters() → {Array}**

cluster indicators.

cluster indicatorsSource:

* [geoda-lisa.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-lisa.js.html), [line 40](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-lisa.js.html#line40)

**Returns:**

TypeArray

**getColumn(mapUid, colName) → {Array}**

Get the values (numeric|string) of a column or field.

Get the values (numeric|string) of a column or field.

**Parameters:**

| Name      | Type   | Description                       |
| --------- | ------ | --------------------------------- |
| `mapUid`  | String | A unique map id.                  |
| `colName` | String | A string of column or field name. |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 286](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line286)

**Returns:**

Returns the values of a column of field.TypeArray

**getColumnNames(mapUid) → {Array}**

Get the column names of the geojson map.

Get the column names of the geojson map

**Parameters:**

| Name     | Type   | Description      |
| -------- | ------ | ---------------- |
| `mapUid` | String | A unique map id. |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 270](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line270)

**Returns:**

Returns the column namesTypeArray

**getColors() → {Array}**

Get colors.

Get colorsSource:

* [geoda-lisa.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-lisa.js.html), [line 72](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-lisa.js.html#line72)

**Returns:**

TypeArray

**getConnectivity(weights) → {Object}**

Get connectivity graph from a weights object.

Get connectivity graph from a weights object

**Parameters:**

| Name      | Type   | Description                        |
| --------- | ------ | ---------------------------------- |
| `weights` | String | The weights object `WeightsResult` |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 530](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line530)

**Returns:**

{arcs, targets, sources}TypeObject

**getDistanceWeights(mapUid, distThreshold, power, isInverse, isArc, isMile) → {Object}**

Create a Distance-based weights.

Create a Distance-based weights.

**Parameters:**

| Name            | Type    | Description                                                                             |
| --------------- | ------- | --------------------------------------------------------------------------------------- |
| `mapUid`        | String  | A unique map id.                                                                        |
| `distThreshold` | Number  | A positive numeric value of distance threshold used to find neighbors.                  |
| `power`         | Number  | The power (or exponent) indicates how many times to use the number in a multiplication. |
| `isInverse`     | Boolean | A bool flag indicates whether or not to apply inverse on distance value.                |
| `isArc`         | Boolean | A bool flag indicates if compute arc distance (true) or Euclidean distance (false).     |
| `isMile`        | Boolean | A bool flag indicates if the distance unit is mile (true) or km (false).                |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 404](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line404)

**Returns:**

An instance of `GeoDaWeights`TypeObject

**getKernelKnnWeights(mapUid, k, kernel, adaptiveBandwidth, useKernelDiagonals, power, isInverse, isArc, isMile) → {Object}**

Create a (adaptive) KNN kernel weights.

Create a (adaptive) KNN kernel weights.

**Parameters:**

| Name                 | Type    | Description                                                                                                                             |
| -------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `mapUid`             | String  | A unique map id.                                                                                                                        |
| `k`                  | Number  | A positive integer number for k-nearest neighbors                                                                                       |
| `kernel`             | String  | The name of the kernel function, which could be one of the following: {triangular, uniform, quadratic, epanechnikov, quartic, gaussian} |
| `adaptiveBandwidth`  | Boolean | A bool flag indicates whether to use adaptive bandwidth or the max distance of all observation to their k-nearest neighbors.            |
| `useKernelDiagonals` | Boolean | A bool flag indicates whether or not the lower order neighbors should be included in the weights structure.                             |
| `power`              | Number  | The power (or exponent) indicates how many times to use the number in a multiplication.                                                 |
| `isInverse`          | Boolean | A bool flag indicates whether or not to apply inverse on distance value.                                                                |
| `isArc`              | Boolean | A bool flag indicates if compute arc distance (true) or Euclidean distance (false).                                                     |
| `isMile`             | Boolean | A bool flag indicates if the distance unit is mile (true) or km (false)                                                                 |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 437](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line437)

**Returns:**

An instance of `GeoDaWeights`TypeObject

**getKernelWeights(mapUid, bandwidth, kernel, adaptive\_bandwidth, useKernelDiagonals, power, isInverse, isArc, isMile) → {Object}**

Create a kernel weights with fixed bandwidth.

Create a kernel weights with fixed bandwidth.

**Parameters:**

| Name                 | Type    | Description                                                                                                                             |
| -------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `mapUid`             | String  | A unique map id.                                                                                                                        |
| `bandwidth`          | Number  | The bandwidth (distance threshold).                                                                                                     |
| `kernel`             | String  | The name of the kernel function, which could be one of the following: {triangular, uniform, quadratic, epanechnikov, quartic, gaussian} |
| `adaptive_bandwidth` | Boolean | A bool flag indicates whether to use adaptive bandwidth or the max distance of all observation to their k-nearest neighbors.            |
| `useKernelDiagonals` | Boolean | A bool flag indicates whether or not the lower order neighbors should be included in the weights structure.                             |
| `power`              | Number  | The power (or exponent) indicates how many times to use the number in a multiplication.                                                 |
| `isInverse`          | Boolean | A bool flag indicates whether or not to apply inverse on distance value.                                                                |
| `isArc`              | Boolean | A bool flag indicates if compute arc distance (true) or Euclidean distance (false).                                                     |
| `isMile`             | Boolean | A bool flag indicates if the distance unit is mile (true) or km (false).                                                                |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 491](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line491)

**Returns:**

An instance of `GeoDaWeights`TypeObject

**getKnnWeights(mapUid, k, power, isInverse, isArc, isMile) → {Object}**

Create a K-Nearest Neighbors weights.

Create a K-Nearest Neighbors weights.

**Parameters:**

| Name        | Type    | Description                                                                             |
| ----------- | ------- | --------------------------------------------------------------------------------------- |
| `mapUid`    | String  | A unique map id.                                                                        |
| `k`         | Number  | A positive integer number for k-nearest neighbors                                       |
| `power`     | Number  | The power (or exponent) indicates how many times to use the number in a multiplication. |
| `isInverse` | Boolean | A bool flag indicates whether or not to apply inverse on distance value.                |
| `isArc`     | Boolean | A bool flag indicates if compute arc distance (true) or Euclidean distance (false).     |
| `isMile`    | Boolean | A bool flag indicates if the distance unit is mile (true) or km (false).                |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 377](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line377)

**Returns:**

An instance of `GeoDaWeights`TypeObject

**getLabels() → {Array}**

Get labels.

Get labelsSource:

* [geoda-lisa.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-lisa.js.html), [line 64](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-lisa.js.html#line64)

**Returns:**

TypeArray

**getLisaValues() → {Array}**

lisa values.

lisa valuesSource:

* [geoda-lisa.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-lisa.js.html), [line 48](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-lisa.js.html#line48)

**Returns:**

TypeArray

**getMapType(mapUid) → {Number}**

Get map type.

Get map type

**Parameters:**

| Name     | Type   | Description     |
| -------- | ------ | --------------- |
| `mapUid` | String | A unique map id |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 101](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line101)

**Returns:**

return map typeTypeNumber

**getMinDistancethreshold(mapUid, isArc, isMile) → {Number}**

Get a distance that guarantees that every observation has at least 1 neighbor.

Get a distance that guarantees that every observation has at least 1 neighbor.

**Parameters:**

| Name     | Type    | Description                                                                         |
| -------- | ------- | ----------------------------------------------------------------------------------- |
| `mapUid` | String  | A unique map id.                                                                    |
| `isArc`  | Boolean | A bool flag indicates if compute arc distance (true) or Euclidean distance (false). |
| `isMile` | Boolean | A bool flag indicates if the distance unit is mile (true) or km (false).            |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 353](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line353)

**Returns:**

TypeNumber

**getNeighbors(weights, idx) → {Array}**

Get neighbors (indices) of an observation.

Get neighbors (indices) of an observation.

**Parameters:**

| Name      | Type   | Description                                                                       |
| --------- | ------ | --------------------------------------------------------------------------------- |
| `weights` | String | The weights object `WeightsResult`                                                |
| `idx`     | Number | An integer number represents the index of which observation to get its neighbors. |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 516](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line516)

**Returns:**

The indices of neighbors.TypeArray

**getNeighbors() → {Array}**

nearest neighbors.

nearest neighborsSource:

* [geoda-lisa.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-lisa.js.html), [line 56](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-lisa.js.html#line56)

**Returns:**

TypeArray

**getNumObs(mapUid) → {Number}**

Get the number of observations or rows in the geojson map.

Get the number of observations or rows in the geojson map.

**Parameters:**

| Name     | Type   | Description     |
| -------- | ------ | --------------- |
| `mapUid` | String | A unique map id |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 254](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line254)

**Returns:**

Returns the number of observations or rows in the geojson map.TypeNumber

**getPValues() → {Array}**

psudo-p values.

psudo-p valuesSource:

* [geoda-lisa.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-lisa.js.html), [line 32](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-lisa.js.html#line32)

**Returns:**

TypeArray

**getQueenWeights(mapUid, order, includeLowerOrder, precision\_threshold) → {Object}**

Create a contiguity weights.

Create a contiguity weights.

**Parameters:**

| Name                  | Type    | Description                                                                                                                                                |
| --------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `mapUid`              | String  | A unique map id.                                                                                                                                           |
| `order`               | Number  | An integet number for order of contiguity                                                                                                                  |
| `includeLowerOrder`   | Boolean | Indicate if include lower order when creating weights                                                                                                      |
| `precision_threshold` | Number  | Used when the precision of the underlying shape file is insufficient to allow for an exact match of coordinates to determine which polygons are neighbors. |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 333](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line333)

**Returns:**

An instance of `GeoDaWeights`TypeObject

**getRookWeights(mapUid, order, includeLowerOrder, precisionThreshold) → {Object}**

Create a Rook contiguity weights.

Create a Rook contiguity weights.

**Parameters:**

| Name                 | Type    | Description                                                                                                                                                |
| -------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `mapUid`             | String  | A unique map id.                                                                                                                                           |
| `order`              | Number  | An integet number for order of contiguity                                                                                                                  |
| `includeLowerOrder`  | Boolean | Indicate if include lower order when creating weights                                                                                                      |
| `precisionThreshold` | Number  | Used when the precision of the underlying shape file is insufficient to allow for an exact match of coordinates to determine which polygons are neighbors. |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 312](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line312)

**Returns:**

An instance of `GeoDaWeights`TypeObject

**getViewport(mapUid, mapHeight, mapWidth) → {Object}**

Get viewport for e.g.

Get viewport for e.g. Deck.gl or GoogleMaps

**Parameters:**

| Name        | Type   | Description                      |
| ----------- | ------ | -------------------------------- |
| `mapUid`    | String | A unique map id                  |
| `mapHeight` | Number | The height of map (screen pixel) |
| `mapWidth`  | Number | The width of map (screen pixel)  |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 179](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line179)

**Returns:**

TypeObject

**has(mapUid) → {Boolean}**

Check if a geojson map has been read into GeoDaWasm.

Check if a geojson map has been read into GeoDaWasm.

**Parameters:**

| Name     | Type   | Description                                        |
| -------- | ------ | -------------------------------------------------- |
| `mapUid` | String | A unique map id that has been read into GeoDaWasm. |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 136](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line136)

**Returns:**

Returns True if the geojson map has been read. Otherwise, returns False.TypeBoolean

**hinge15Breaks(values) → {Array}**

Boxplot (hinge=1.5) breaks, including the top, bottom, median, and two quartiles of the data.

Boxplot (hinge=1.5) breaks, including the top, bottom, median, and two quartiles of the data

**Parameters:**

| Name     | Type  | Description                      |
| -------- | ----- | -------------------------------- |
| `values` | Array | The values of selected variable. |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 797](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line797)

**Returns:**

Returns an array of break point values.TypeArray

**hinge30Breaks(values) → {Array}**

Boxplot (hinge=3.0) breaks, including the top, bottom, median, and two quartiles of the data.

Boxplot (hinge=3.0) breaks, including the top, bottom, median, and two quartiles of the data

**Parameters:**

| Name     | Type  | Description                      |
| -------- | ----- | -------------------------------- |
| `values` | Array | The values of selected variable. |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 815](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line815)

**Returns:**

Returns an array of break point values.TypeArray

**isInt(n) → {Boolean}**

Help function: check if number is an integer.

Help function: check if number is an integer.

**Parameters:**

| Name | Type   | Description |
| ---- | ------ | ----------- |
| `n`  | Number |             |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 573](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line573)

**Returns:**

TypeBoolean

**localBiJoinCount(weights, values1, values2, permutations, significanceCutoff, seed) → {Object}**

Bivariate or no-colocation local join count works when two events cannot happen in the same location.

Bivariate or no-colocation local join count works when two events cannot happen in the same location. It can be used to identify negative spatial autocorrelation.

**Parameters:**

| Name                 | Type          | Description                                                                                                                                                                                                                             |
| -------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `weights`            | WeightsResult | The weights object `WeightsResult`                                                                                                                                                                                                      |
| `values1`            | Array         | The first numeric column that contains the binary values (e.g. 0 and 1) for LISA statistics                                                                                                                                             |
| `values2`            | Array         | The second numeric column that contains the binary values (e.g. 0 and 1) for LISA statistics                                                                                                                                            |
| `permutations`       | Number        | <p>The number of permutations for the LISA computation. Default: 999.</p><ul><li>@param {String} permutationMethod The permutation method used for the LISA computation. Options are 'complete', 'lookup'. Default: 'lookup'.</li></ul> |
| `significanceCutoff` | Number        | The cutoff value for significance p-values to filter not-significant clusters. Default: 0.05                                                                                                                                            |
| `seed`               | Number        | The seed for random number generator                                                                                                                                                                                                    |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1338](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1338)

**Returns:**

LISA object `GeoDaLisa`TypeObject

**localG(weights, values, permutations, seed) → {Object}**

Apply local G statistics.

Apply local G statistics

**Parameters:**

| Name           | Type   | Description                                                                                                                                                                                                                             |
| -------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `weights`      | String | The weights object `WeightsResult`                                                                                                                                                                                                      |
| `values`       | Array  | The values that local moran statistics will be applied on.                                                                                                                                                                              |
| `permutations` | Number | <p>the number of permutations for the LISA computation. Default: 999.</p><ul><li>@param {String} permutationMethod The permutation method used for the LISA computation. Options are 'complete', 'lookup'. Default: 'lookup'.</li></ul> |
| `seed`         | Number | The seed for random number generator used in LISA statistics. Default: 123456789.                                                                                                                                                       |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1056](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1056)

**Returns:**

An instance of `LisaResult`TypeObject

**localGeary(weights, values, permutations, permutationMethod, seed) → {Object}**

Apply local Geary statistics.

Apply local Geary statistics

**Parameters:**

| Name                | Type   | Description                                                                                                |
| ------------------- | ------ | ---------------------------------------------------------------------------------------------------------- |
| `weights`           | String | The weights object `WeightsResult`                                                                         |
| `values`            | Array  | The values that local moran statistics will be applied on.                                                 |
| `permutations`      | Number | the number of permutations for the LISA computation. Default: 999.                                         |
| `permutationMethod` | String | The permutation method used for the LISA computation. Options are 'complete', 'lookup'. Default: 'lookup'. |
| `seed`              | Number | The seed for random number generator used in LISA statistics. Default: 123456789.                          |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1088](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1088)

**Returns:**

An instance of `LisaResult`TypeObject

**localGStar(weights, values, permutations, seed) → {Object}**

Apply local G\* statistics.

Apply local G\* statistics

**Parameters:**

| Name           | Type   | Description                                                                                                                                                                                                                             |
| -------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `weights`      | String | The weights object `WeightsResult`                                                                                                                                                                                                      |
| `values`       | Array  | The values that local moran statistics will be applied on.                                                                                                                                                                              |
| `permutations` | Number | <p>the number of permutations for the LISA computation. Default: 999.</p><ul><li>@param {String} permutationMethod The permutation method used for the LISA computation. Options are 'complete', 'lookup'. Default: 'lookup'.</li></ul> |
| `seed`         | Number | The seed for random number generator used in LISA statistics. Default: 123456789.                                                                                                                                                       |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1072](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1072)

**Returns:**

An instance of `LisaResult`TypeObject

**localJoinCount(weights, values, permutations, seed) → {Object}**

Apply local Join Count statistics.

Apply local Join Count statistics

**Parameters:**

| Name           | Type   | Description                                                                                                                                                                                                                             |
| -------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `weights`      | String | The weights object `WeightsResult`                                                                                                                                                                                                      |
| `values`       | Array  | The values that local moran statistics will be applied on.                                                                                                                                                                              |
| `permutations` | Number | <p>the number of permutations for the LISA computation. Default: 999.</p><ul><li>@param {String} permutationMethod The permutation method used for the LISA computation. Options are 'complete', 'lookup'. Default: 'lookup'.</li></ul> |
| `seed`         | Number | The seed for random number generator used in LISA statistics. Default: 123456789.                                                                                                                                                       |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1104](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1104)

**Returns:**

An instance of `LisaResult`TypeObject

**localMoran(weights, values, permutations, seed) → {Object}**

Apply local Moran statistics.

Apply local Moran statistics

**Parameters:**

| Name           | Type   | Description                                                                                                                                                                                                                             |
| -------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `weights`      | String | The weights object `WeightsResult`                                                                                                                                                                                                      |
| `values`       | Array  | The values that local moran statistics will be applied on.                                                                                                                                                                              |
| `permutations` | Number | <p>The number of permutations for the LISA computation. Default: 999.</p><ul><li>@param {String} permutationMethod The permutation method used for the LISA computation. Options are 'complete', 'lookup'. Default: 'lookup'.</li></ul> |
| `seed`         | Number | The seed for random number generator used in LISA statistics. Default: 123456789.                                                                                                                                                       |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1040](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1040)

**Returns:**

An instance of `LisaResult`TypeObject

**localMultiGeary(weights, values1, permutations, significanceCutoff, seed) → {Object}**

Multivariate local geary is a multivariate extension of local geary which measures the extent to which neighbors in multiattribute space are also neighbors in geographical space.

Multivariate local geary is a multivariate extension of local geary which measures the extent to which neighbors in multiattribute space are also neighbors in geographical space.

**Parameters:**

| Name                 | Type          | Description                                                                                                                                                                                                                             |
| -------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `weights`            | WeightsResult | The weights object `WeightsResult`                                                                                                                                                                                                      |
| `values1`            | Array         | The array of the numeric columns that contains the values for LISA statistics                                                                                                                                                           |
| `permutations`       | Number        | <p>The number of permutations for the LISA computation. Default: 999.</p><ul><li>@param {String} permutationMethod The permutation method used for the LISA computation. Options are 'complete', 'lookup'. Default: 'lookup'.</li></ul> |
| `significanceCutoff` | Number        | The cutoff value for significance p-values to filter not-significant clusters. Default: 0.05                                                                                                                                            |
| `seed`               | Number        | The seed for random number generator                                                                                                                                                                                                    |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1300](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1300)

**Returns:**

LISA object `GeoDaLisa`TypeObject

**localMultiJoinCount(weights, values, permutations, significanceCutoff, seed) → {Object}**

Multivariate or colocation local join count (2019) works when two or more events happen in the same location.

Multivariate or colocation local join count (2019) works when two or more events happen in the same location.

**Parameters:**

| Name                 | Type          | Description                                                                                                                                                                                                                             |
| -------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `weights`            | WeightsResult | The weights object `WeightsResult`                                                                                                                                                                                                      |
| `values`             | Array         | The array of numeric columns that contains the binary values (e.g. 0 and 1) for LISA statistics                                                                                                                                         |
| `permutations`       | Number        | <p>The number of permutations for the LISA computation. Default: 999.</p><ul><li>@param {String} permutationMethod The permutation method used for the LISA computation. Options are 'complete', 'lookup'. Default: 'lookup'.</li></ul> |
| `significanceCutoff` | Number        | The cutoff value for significance p-values to filter not-significant clusters. Default: 0.05                                                                                                                                            |
| `seed`               | Number        | The seed for random number generator                                                                                                                                                                                                    |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1390](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1390)

**Returns:**

LISA object `GeoDaLisa`TypeObject

**maxpGreedy(weights, values, iterations, minBoundValues, minBounds, maxBoundValues, maxBounds, scaleMethod, distanceMethod, seed) → {Object}**

A greedy algorithm to solve the max-p-region problem.

A greedy algorithm to solve the max-p-region problem.

**Parameters:**

| Name             | Type          | Description                                                                                                                    |
| ---------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `weights`        | WeightsResult | The weights object `WeightsResult`                                                                                             |
| `values`         | Array         | The list of numeric vectors of selected variable.                                                                              |
| `iterations`     | Number        | The number of iterations of greedy algorithm. Defaults to 1.                                                                   |
| `minBoundValues` | Array         | The list of numeric array of selected minimum bounding variables.                                                              |
| `minBounds`      | Array         | The list of minimum value that the sum value of bounding variables in each cluster should be greater than.                     |
| `maxBoundValues` | Array         | The list of numeric array of selected maximum bounding variables.                                                              |
| `maxBounds`      | Array         | The list of minimum value that the sum value of bounding variables in each cluster should be less than.                        |
| `scaleMethod`    | String        | The scaling methods {'raw', 'standardize', 'demean', 'mad', 'range\_standardize', 'range\_adjust'}. Defaults to 'standardize'. |
| `distanceMethod` | String        | The distance methods {"euclidean", "manhattan"}. Defaults to 'euclidean'.                                                      |
| `seed`           | Number        | The seed for random number generator                                                                                           |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1862](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1862)

**Returns:**

Return a ClusteringResult object: {'total\_ss', 'within\_ss', 'between\_ss', 'ratio', 'clusters'}TypeObject

**maxpSA(weights, values, coolingRate, saMaxIt, iterations, minBoundValues, minBounds, maxBoundValues, maxBounds, scaleMethod, distanceMethod, seed) → {Object}**

A simulated annealing algorithm to solve the max-p-region problem.

A simulated annealing algorithm to solve the max-p-region problem.

**Parameters:**

| Name             | Type          | Description                                                                                                                    |
| ---------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `weights`        | WeightsResult | The weights object `WeightsResult`                                                                                             |
| `values`         | Array         | The list of numeric vectors of selected variable.                                                                              |
| `coolingRate`    | Number        | The cooling rate of a simulated annealing algorithm. Defaults to 0.85                                                          |
| `saMaxIt`        | Number        | The number of iterations of simulated annealing. Defaults to 1                                                                 |
| `iterations`     | Number        | The number of iterations of greedy algorithm. Defaults to 1.                                                                   |
| `minBoundValues` | Array         | The list of numeric array of selected minimum bounding variables.                                                              |
| `minBounds`      | Array         | The list of minimum value that the sum value of bounding variables in each cluster should be greater than.                     |
| `maxBoundValues` | Array         | The list of numeric array of selected maximum bounding variables.                                                              |
| `maxBounds`      | Array         | The list of minimum value that the sum value of bounding variables in each cluster should be less than.                        |
| `scaleMethod`    | String        | The scaling methods {'raw', 'standardize', 'demean', 'mad', 'range\_standardize', 'range\_adjust'}. Defaults to 'standardize'. |
| `distanceMethod` | String        | The distance methods {"euclidean", "manhattan"}. Defaults to 'euclidean'.                                                      |
| `seed`           | Number        | The seed for random number generator.                                                                                          |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1917](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1917)

**Returns:**

Return a ClusteringResult object: {'total\_ss', 'within\_ss', 'between\_ss', 'ratio', 'clusters'}TypeObject

**maxpTabu(weights, values, tabuLength, convTabu, iterations, minBoundValues, minBounds, maxBoundValues, maxBounds, scaleMethod, distanceMethod, seed) → {Object}**

A tabu-search algorithm to solve the max-p-region problem.

A tabu-search algorithm to solve the max-p-region problem

**Parameters:**

| Name             | Type          | Description                                                                                                                    |
| ---------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `weights`        | WeightsResult | The weights object `WeightsResult`                                                                                             |
| `values`         | Array         | The list of numeric vectors of selected variable.                                                                              |
| `tabuLength`     | Number        | The length of a tabu search heuristic of tabu algorithm. Defaults to 10.                                                       |
| `convTabu`       | Number        | The number of non-improving moves. Defaults to 10.                                                                             |
| `iterations`     | Number        | The number of iterations of greedy algorithm. Defaults to 1.                                                                   |
| `minBoundValues` | Array         | The list of numeric array of selected minimum bounding variables.                                                              |
| `minBounds`      | Array         | The list of minimum value that the sum value of bounding variables in each cluster should be greater than.                     |
| `maxBoundValues` | Array         | The list of numeric array of selected maximum bounding variables.                                                              |
| `maxBounds`      | Array         | The list of minimum value that the sum value of bounding variables in each cluster should be less than.                        |
| `scaleMethod`    | String        | The scaling methods {'raw', 'standardize', 'demean', 'mad', 'range\_standardize', 'range\_adjust'}. Defaults to 'standardize'. |
| `distanceMethod` | String        | The distance methods {"euclidean", "manhattan"}. Defaults to 'euclidean'.                                                      |
| `seed`           | Number        | The seed for random number generator.                                                                                          |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1974](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1974)

**Returns:**

Return a ClusteringResult object: {'total\_ss', 'within\_ss', 'between\_ss', 'ratio', 'clusters'}TypeObject

**multiQuantileLisa(weights, ks, quantiles, values, permutations, significanceCutoff, seed) → {Object}**

Multivariate Quantile LISA (2019) is a type of local spatial autocorrelation that applies multivariate local join count statistics to quantiles of multiple continuous variables.

Multivariate Quantile LISA (2019) is a type of local spatial autocorrelation that applies multivariate local join count statistics to quantiles of multiple continuous variables.

**Parameters:**

| Name                 | Type          | Description                                                                                                                                                                                                                             |
| -------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `weights`            | WeightsResult | The weights object `WeightsResult`                                                                                                                                                                                                      |
| `ks`                 | Array         | The array of integer numbers that specify quantiles for each variable                                                                                                                                                                   |
| `quantiles`          | Array         | The array of integer numbers that specify which quantile is used for each variable                                                                                                                                                      |
| `values`             | Array         | The array of numeric columns that contains the binary values (e.g. 0 and 1) for LISA statistics                                                                                                                                         |
| `permutations`       | Number        | <p>The number of permutations for the LISA computation. Default: 999.</p><ul><li>@param {String} permutationMethod The permutation method used for the LISA computation. Options are 'complete', 'lookup'. Default: 'lookup'.</li></ul> |
| `significanceCutoff` | Number        | The cutoff value for significance p-values to filter not-significant clusters. Default: 0.05                                                                                                                                            |
| `seed`               | Number        | The seed for random number generator                                                                                                                                                                                                    |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1454](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1454)

**Returns:**

LISA object `GeoDaLisa`TypeObject

**naturalBreaks(k, values) → {Array}**

Natural breaks.

Natural breaks

**Parameters:**

| Name     | Type   | Description                                                |
| -------- | ------ | ---------------------------------------------------------- |
| `k`      | Number | Number of breaks                                           |
| `values` | Array  | The values that the classify algorithm will be applied on. |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 730](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line730)

**Returns:**

Returns an array of break point values.TypeArray

**neighborMatchTest(mapUid, knn, data, scaleMethod, distanceMethod, power, isInverse, isArc, isMile) → {Array}**

The local neighbor match test is a method to identify significant locations by assessing the extent of overlap between k-nearest neighbors in geographical space and k-nearest neighbors in multi-attribute space.

The local neighbor match test is a method to identify significant locations by assessing the extent of overlap between k-nearest neighbors in geographical space and k-nearest neighbors in multi-attribute space.

**Parameters:**

| Name             | Type    | Description                                                                                                                |
| ---------------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |
| `mapUid`         | String  | A unique string represents the geojson map that has been read into GeoDaWasm.                                              |
| `knn`            | Number  | k nearest neighbor for both attribute and geographical space                                                               |
| `data`           | Array   | The array of numeric columns that contains the values for neighbor match test                                              |
| `scaleMethod`    | String  | The scaling method: {'raw', 'standardize', 'demean', 'mad', 'range\_standardize', 'range\_adjust'}. Default: 'standardize' |
| `distanceMethod` | String  | The distance method: {'euclidean', 'manhattan'}. Default: 'euclidean'.                                                     |
| `power`          | Number  | The power/exponent corresponds to the number of times the base (dist\_band) is used as a factor. Default: 1.               |
| `isInverse`      | Boolean | The bool value indicates if apply inverse on distance value. Default: False.                                               |
| `isArc`          | Boolean | The bool value indicates if compute arc distance between two observations. Default: FALSE.                                 |
| `isMile`         | Boolean | The bool value indicates if convert distance unit from mile to kilometer(KM). Default: TRUE.                               |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1253](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1253)

**Returns:**

{'cardinality', 'probability'}TypeArray

**New() → {Object}**

Create a `GeoDaWasm` instance built using WASM.

Create a `GeoDaWasm` instance built using WASM.Source:

* [index.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/index.js.html), [line 19](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/index.js.html#line19)

**Returns:**

geoda - a GeoDaWasm instance built from WASMTypeObject

**Example**

```
const jsgeoda = require('jsgeoda')
let geoda = await jsgeoda.New()
```

**parseVecDouble(input) → {Object}**

Help function: convert GeoDa std::vector to javascript Array e.g.

Help function: convert GeoDa std::vector to javascript Array e.g. \[]

**Parameters:**

| Name    | Type  | Description |
| ------- | ----- | ----------- |
| `input` | Array |             |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 631](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line631)

**Returns:**

TypeObject

**parseVecInt(input) → {Object}**

Help function: convert GeoDa std::vector to javascript Array e.g.

Help function: convert GeoDa std::vector to javascript Array e.g. \[]

**Parameters:**

| Name    | Type  | Description |
| ------- | ----- | ----------- |
| `input` | Array |             |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 582](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line582)

**Returns:**

TypeObject

**parseVecString(input) → {Object}**

Help function: convert GeoDa std::vector to javascript Array e.g.

Help function: convert GeoDa std::vector to javascript Array e.g. \[]

**Parameters:**

| Name    | Type  | Description |
| ------- | ----- | ----------- |
| `input` | Array |             |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 644](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line644)

**Returns:**

TypeObject

**parseVecVecDouble(input) → {Object}**

Help function: convert GeoDa 2d std::vector to javascript 2d Array e.g.

Help function: convert GeoDa 2d std::vector to javascript 2d Array e.g. \[\[]]

**Parameters:**

| Name    | Type  | Description |
| ------- | ----- | ----------- |
| `input` | Array |             |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 613](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line613)

**Returns:**

TypeObject

**parseVecVecInt(input) → {Object}**

Help function: convert GeoDa 2d std::vector to javascript 2d Array e.g.

Help function: convert GeoDa 2d std::vector to javascript 2d Array e.g. \[\[]]

**Parameters:**

| Name    | Type  | Description |
| ------- | ----- | ----------- |
| `input` | Array |             |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 595](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line595)

**Returns:**

TypeObject

**percentileBreaks(values) → {Array}**

Percentile breaks.

Percentile breaks

**Parameters:**

| Name     | Type  | Description                      |
| -------- | ----- | -------------------------------- |
| `values` | Array | The values of selected variable. |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 767](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line767)

**Returns:**

Returns an array of break point values.TypeArray

**quantileBreaks(k, values) → {Array}**

Quantile breaks.

Quantile breaks

**Parameters:**

| Name     | Type   | Description                      |
| -------- | ------ | -------------------------------- |
| `k`      | Number | The number of breaks             |
| `values` | Array  | The values of selected variable. |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 749](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line749)

**Returns:**

Returns an array of break point values.TypeArray

**quantileLisa(weights, values, permutations, seed) → {Object}**

Apply Quantile LISA statistics.

Apply Quantile LISA statistics

**Parameters:**

| Name           | Type   | Description                                                                                                                                                                                                                             |
| -------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `weights`      | String | The weights object `WeightsResult`                                                                                                                                                                                                      |
| `values`       | Array  | The values that local moran statistics will be applied on.                                                                                                                                                                              |
| `permutations` | Number | <p>the number of permutations for the LISA computation. Default: 999.</p><ul><li>@param {String} permutationMethod The permutation method used for the LISA computation. Options are 'complete', 'lookup'. Default: 'lookup'.</li></ul> |
| `seed`         | Number | The seed for random number generator used in LISA statistics. Default: 123456789.                                                                                                                                                       |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1120](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1120)

**Returns:**

An instance of `LisaResult`TypeObject

**readGeoJSON(ab) → {String}**

Read a geojson map from a file object in the format of ArrayBuffer.

Read a geojson map from a file object in the format of ArrayBuffer. You can use `readFileSync` in fs to read the geojson file and return a `ArrayBuffer`; Or use FileReader.`readAsArrayBuffer` to read the content of a specified `Blob` of `File`.

**Parameters:**

| Name | Type        | Description                                               |
| ---- | ----------- | --------------------------------------------------------- |
| `ab` | ArrayBuffer | The content of the geojson file in format of ArrayBuffer. |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 64](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line64)

**Returns:**

A unique id of the geoda object.TypeString

**Example**

```
// In node.js
const fs = require('fs');
const jsgeoda = require('jsgeoda');
const geoda = await jsgeoda.New();

let ab = fs.readFileSync("NAT.geojson").buffer;
let nat = geoda.readGeojson(ab);
let numObs = geoda.getNumObs(nat);

E.g. the geojson file name.
```

**redcap(weights, k, values, method, minBound, boundVals, scaleMethod, distanceMethod) → {Object}**

Regionalization with dynamically constrained agglomerative clustering and partitioning (REDCAP).

Regionalization with dynamically constrained agglomerative clustering and partitioning (REDCAP)

**Parameters:**

| Name             | Type          | Description                                                                                        |
| ---------------- | ------------- | -------------------------------------------------------------------------------------------------- |
| `weights`        | WeightsResult | The weights object `WeightsResult`                                                                 |
| `k`              | Number        | The number of clusters                                                                             |
| `values`         | Array         | The list of numeric vectors of selected variable                                                   |
| `method`         | String        | The REDCAP method: {'single-linkage', 'average-linkage', 'complete-linkage', 'Ward-linkage'}.      |
| `minBound`       | Number        | The minimum value that the sum value of bounding variable in each cluster should be greater than   |
| `boundVals`      | Array         | The numeric vector of selected bounding variable                                                   |
| `scaleMethod`    | String        | The scaling method: {'raw', 'standardize', 'demean', 'mad', 'range\_standardize', 'range\_adjust'} |
| `distanceMethod` | String        | The distance method: {"euclidean", "manhattan"}                                                    |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1585](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1585)

**Returns:**

Return a ClusteringResult object: {'total\_ss', 'within\_ss', 'between\_ss', 'ratio', 'clusters'}TypeObject

**redcapMethods() → {Array}**

Helper function: Get REDCAP methods.

Helper function: Get REDCAP methods.Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1489](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1489)

**Returns:**

TypeArray

**scaleMethods() → {Object}**

Help function: Get scale methods.

Help function: Get scale methods.Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1206](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1206)

**Returns:**

TypeObject

**schc(weights, k, values, method, minBound, boundVals, scaleMethod, distanceMethod) → {Object}**

Spatially Constrained Hierarchical Clucstering (SCHC).

Spatially Constrained Hierarchical Clucstering (SCHC)

**Parameters:**

| Name             | Type          | Description                                                                                        |
| ---------------- | ------------- | -------------------------------------------------------------------------------------------------- |
| `weights`        | WeightsResult | The weights object `WeightsResult`                                                                 |
| `k`              | Number        | The number of clusters                                                                             |
| `values`         | Array         | The list of numeric vectors of selected variable                                                   |
| `method`         | String        | The method of agglomerative hierarchical clustering: {"single", "complete", "average","ward"}.     |
| `minBound`       | Number        | The minimum value that the sum value of bounding variable in each cluster should be greater than   |
| `boundVals`      | Array         | The numeric vector of selected bounding variable                                                   |
| `scaleMethod`    | String        | The scaling method: {'raw', 'standardize', 'demean', 'mad', 'range\_standardize', 'range\_adjust'} |
| `distanceMethod` | String        | The distance method: {"euclidean", "manhattan"}                                                    |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1640](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1640)

**Returns:**

Return a ClusteringResult object: {'total\_ss', 'within\_ss', 'between\_ss', 'ratio', 'clusters'}TypeObject

**schcMethods() → {Array}**

Get the SCHC methods.

Get the SCHC methods.Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1614](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1614)

**Returns:**

TypeArray

**skater(weights, k, values, minBound, boundVals, scaleMethod, distanceMethod) → {Object}**

Spatial C(K)luster Analysis by Tree Edge Removal.

Spatial C(K)luster Analysis by Tree Edge Removal

**Parameters:**

| Name             | Type          | Description                                                                                        |
| ---------------- | ------------- | -------------------------------------------------------------------------------------------------- |
| `weights`        | WeightsResult | The weights object `WeightsResult`                                                                 |
| `k`              | Number        | The number of clusters                                                                             |
| `values`         | Array         | The list of numeric vectors of selected variable                                                   |
| `minBound`       | Number        | The minimum value that the sum value of bounding variable int each cluster should be greater than  |
| `boundVals`      | Array         | The numeric vector of selected bounding variable                                                   |
| `scaleMethod`    | String        | The scaling method: {'raw', 'standardize', 'demean', 'mad', 'range\_standardize', 'range\_adjust'} |
| `distanceMethod` | String        | The distance method: {"euclidean", "manhattan"}                                                    |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 1514](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line1514)

**Returns:**

Return a ClusteringResult object: {'total\_ss', 'within\_ss', 'between\_ss', 'ratio', 'clusters'TypeObject

**spatialEB(weights, eventValues, baseValues) → {Array}**

Spatial Empirical Bayes (EB) Smoothing.

Spatial Empirical Bayes (EB) Smoothing

**Parameters:**

| Name          | Type          | Description                        |
| ------------- | ------------- | ---------------------------------- |
| `weights`     | WeightsResult | The weights object `WeightsResult` |
| `eventValues` | Array         | The values of an event variable.   |
| `baseValues`  | Array         | The values of an base variable.    |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 971](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line971)

**Returns:**

TypeArray

**spatialLag(weights, values, isBinary, rowStandardize, includeDiagonal) → {Array}**

Compute spatially lagged variable.

Compute spatially lagged variable.

**Parameters:**

| Name              | Type          | Description                                                                               |
| ----------------- | ------------- | ----------------------------------------------------------------------------------------- |
| `weights`         | WeightsResult | The weights object `WeightsResult`                                                        |
| `values`          | Array         | The values of a selected variable.                                                        |
| `isBinary`        | Boolean       | The bool value indicates if the spatial weights is used as binary weights. Default: TRUE. |
| `rowStandardize`  | Boolean       | The bool value indicates if use row-standardized weights. Default: TRUE                   |
| `includeDiagonal` | Bollean       | The bool value indicates if include diagonal of spatial weights. Default: FALSE           |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 932](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line932)

**Returns:**

TypeArray

**spatialRate(weights, eventValues, baseValues) → {Array}**

Spatial rate smoothing.

Spatial rate smoothing

**Parameters:**

| Name          | Type          | Description                        |
| ------------- | ------------- | ---------------------------------- |
| `weights`     | WeightsResult | The weights object `WeightsResult` |
| `eventValues` | Array         | The values of an event variable.   |
| `baseValues`  | Array         | The values of an base variable.    |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 954](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line954)

**Returns:**

TypeArray

**standardDeviationBreaks(values) → {Array}**

Standard deviation breaks.

Standard deviation breaks

**Parameters:**

| Name     | Type  | Description                      |
| -------- | ----- | -------------------------------- |
| `values` | Array | The values of selected variable. |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 780](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line780)

**Returns:**

Returns an array of break point values.TypeArray

**toVecDouble(input) → {Object}**

Help function: convert javascript Array e.g.

Help function: convert javascript Array e.g. \[] to GeoDa std::vector

**Parameters:**

| Name    | Type  | Description |
| ------- | ----- | ----------- |
| `input` | Array |             |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 683](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line683)

**Returns:**

TypeObject

**toVecInt(input) → {Object}**

Help function: convert javascript Array e.g.

Help function: convert javascript Array e.g. \[] to GeoDa std::vector

**Parameters:**

| Name    | Type  | Description |
| ------- | ----- | ----------- |
| `input` | Array |             |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 670](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line670)

**Returns:**

TypeObject

**toVecString(input) → {Object}**

Help function: convert javascript Array e.g.

Help function: convert javascript Array e.g. \[] to GeoDa std::vector

**Parameters:**

| Name    | Type  | Description |
| ------- | ----- | ----------- |
| `input` | Array |             |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 657](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line657)

**Returns:**

TypeObject

**toVecVecDouble(input) → {Object}**

Help function: convert javascript 2d Array e.g.

Help function: convert javascript 2d Array e.g. \[\[]] to GeoDa 2d std::vector

**Parameters:**

| Name    | Type  | Description |
| ------- | ----- | ----------- |
| `input` | Array |             |

Source:

* [geoda-proxy.js](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html), [line 700](https://app.gitbook.com/s/-MMxWNyMbqx5YG1sT6E6/apis/geoda-proxy.js.html#line700)

**Returns:**

TypeObject
