Using DuckDB-Wasm to query a parquet file and plotting the results using Observable Plot.
Svelte is used, although this example should generalize well to other frameworks using Vite.
- Clone repository to local machine
- Install dependencies with
npm i
- Open browser at http://localhost:5173/
- Most of the DuckDB interface code is based off the sveltekit-typescript example
- The parquet file comes from Voltron Data's nyc-taxi-tiny dataset, which they host freely. They have an awesome tutorial on how to access the entire dataset as part of the vignette for the {arrow} R package.
- The scaffolding for this repository is provided by Vite's svelte-ts template. A new project with this template can be created using
npm create vite@latest myapp -- --template svelte-ts
.