Which build to use
| Use | How to get it | Status |
|---|---|---|
| Python | pip install geosquare-engine | On PyPI, version 0.3.0 |
| DuckDB | Build bindings/duckdb with build.sh, then LOAD the extension | Not on PyPI. Linux can use a published build. |
| Browser | Build bindings/wasm with npm run build | Not on npm yet |
gsq CLI | Install 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_amd64Start 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.