Docs

Engine

geosquare-engine is a Rust core with four front ends. They all follow the same rules.

Which build to use

UseHow to get itStatus
Pythonpip install geosquare-engineOn PyPI, version 0.3.0
DuckDBBuild bindings/duckdb with build.sh, then LOAD the extensionNot on PyPI. Linux can use a published build.
BrowserBuild bindings/wasm with npm run buildNot on npm yet
gsq CLIInstall from the repo. It needs the DuckDB extension.Not on PyPI yet

Build the browser package

terminal
cargo install wasm-bindgen-cli --version 0.2.130 --locked   # once
cd bindings/wasm
npm run build                                               # writes pkg/

The version of wasm-bindgen-cli must match Cargo.toml. The playground on this site uses a build of the same code.

Build the DuckDB extension

terminal
cd bindings/duckdb
DUCKDB_PLATFORM=osx_arm64 ./build.sh   # on Linux, use linux_amd64

Start DuckDB with duckdb -unsigned for a local build. Then run LOAD 'build/osx_arm64/geosquare_v2.duckdb_extension';.

Rollup rules

Rollups combine fine cells into a coarser parent level. The rules are sum, weighted_mean, median, max and min. NULL values are skipped, not counted as 0. The browser and DuckDB follow the same rules.

Read more