autk-db
autk-db is a browser-native spatial database powered by DuckDB. It lets you load, query, and transform urban data entirely on the browser.
Key capabilities:
- Load data from OpenStreetMap (using Overpass API or previously downloaded
.pbffiles, e.g. from Geofabrik), CSV, JSON, GeoJSON, and GeoTIFF. - Run spatial operations and custom SQL queries inside the browser.
- Export processed data for
autk-map,autk-compute,autk-plotor any software.
Package installation
To install autk-db, you must install its NPM pakage.
npm install @urban-toolkit/autk-dbYou can also have access to the library by installing the complete Autark package.
npm install @urban-toolkit/autkInitialization
The entry point of autk-db is the AutkDb class. To use it, you must create a database instance and await init() seting up DuckDB and loading its official spatial extension.
Basic workflow
Most autk-db workflows follow a simple three-step pattern. First, you load one or more datasets into DuckDB tables. Then you use autk-db methods to inspect, filter, join, or transform those tables. Finally, you bring the result back into JavaScript as GeoJSON, so use it in autk-map, autk-plot, autk-compute or any other software:
- Load data into named DuckDB tables.
- Query, analyze, or transform those tables inside DuckDB.
- Retrieve the result back into JavaScript when needed.