Skip to content

Client downloads via duckdb-wasm#155

Merged
Shane98c merged 13 commits into
mainfrom
Shane98c/duckdb-wasm
Apr 22, 2026
Merged

Client downloads via duckdb-wasm#155
Shane98c merged 13 commits into
mainfrom
Shane98c/duckdb-wasm

Conversation

@Shane98c
Copy link
Copy Markdown
Member

This skips our lambda for a direct download via duckdb-wasm (which is lazily downloaded when someone clicks the dl button). It uses the hive-partitioned files on s3.

CSV exactly matches the lamda outputs.

Doing geojson here instead of geopackage because it's a lot easier to create! Also aligns with the stats downloads. (still centroids which avoids memory errors on the biggest counties).

License info is attached to the GeoJSON in a similar way to what we were doing with GeoPackage (adding a little metadata to the top level).

Testing LA county: this finished for me in the browser when lambda seemed to hang, so that seems like an improvement!

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ocr-web-prod Ready Ready Preview, Comment Apr 21, 2026 7:01pm
ocr-web-qa Ready Ready Preview, Comment Apr 21, 2026 7:01pm
ocr-web-staging Ready Ready Preview, Comment Apr 21, 2026 7:01pm

Request Review

@Shane98c Shane98c requested a review from katamartin April 13, 2026 22:53
Copy link
Copy Markdown
Member

@katamartin katamartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking + feeling great to me!

Left a few minor suggestions below. But two high-level things to confirm before merging:

  • Let's prep a PR to update the screenshot + reference to GeoPackage in the docs site.
  • I'm seeing diffs in CSV contents when I compare the Lambda version to the new version -- are you seeing the same? I think we should make sure we have a good explanation for those.

Comment thread lib/config.ts Outdated
Comment thread lib/config.ts Outdated
Comment thread lib/config.ts Outdated
Copy link
Copy Markdown
Member

@katamartin katamartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one tracking suggestion, otherwise lgtm!

controller.signal.aborted ||
(error instanceof DOMException && error.name === 'AbortError')
if (!isAbort) {
track('data_download_error', {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should also track a new data_download_cancel or similar with duration of download when isAbort?

Comment thread components/results/download.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants