Skip to content

Get Started ​

GeoDaLib comes packed with powerful spatial analysis tools into 4 packages:

  • πŸ“¦ @geoda/core
    • πŸ—ΊοΈ Mapping
    • πŸ“Š Data Exploration
    • βš–οΈ Spatial Weights
    • ⚑ Spatial Operations
  • πŸ“¦ @geoda/lisa
    • πŸ“ Spatial Autocorrelation Analysis
  • πŸ“¦ @geoda/regression
    • πŸ“ˆ Spatial Regression
  • πŸ“¦ @geoda/clustering
    • πŸ“ Spatial Clustering

Each package works independently, so you can install only the packages you need.

Installation ​

To install GeoDaLib javascript library:

bash
npm install @geoda/core
bash
pnpm add @geoda/core
bash
yarn add @geoda/core

Prerequisites ​

  • Node.js (22.11.0 recommended)
  • Yarn (4.0.0 recommended)

Example ​

Here is a quick example of using GeoDaLib to apply Local Moran statistics on some example data:

ts
import { localMoran } from '@geoda/lisa';

// exmaple data
const data = [3.0, 3.0, 0.0, 9.0, 8.0, 8.5];
const neighbors = [[1], [0], [], [4, 5], [3, 5], [3, 4]];
const permutation = 99;

// call local moran
const result = await localMoran({ data, neighbors, permutation });