Skip to content

Using DuckDB-Wasm to query a parquet file and plot the results using Observable Plot.

Notifications You must be signed in to change notification settings

duckdb-wasm-examples/observableplot-svelte-typescript

Repository files navigation

DuckDB-Wasm + Observable Plot + Svelte & TypeScript

Screenshot of output

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.

Recommended IDE Setup

VS Code + Svelte.

How to run

  1. Clone repository to local machine
  2. Install dependencies with npm i
  3. Open browser at http://localhost:5173/

Sources

  1. Most of the DuckDB interface code is based off the sveltekit-typescript example
  2. 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.
  3. 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.

About

Using DuckDB-Wasm to query a parquet file and plot the results using Observable Plot.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published