You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When any filter is active, facet counts now reflect the intersection
of all OTHER active filters. For example, selecting SESAR as source
updates material/context/specimen counts to show only what exists
in SESAR data. Uses parallel GROUP BY queries via DuckDB-WASM.
Counts update via DOM manipulation to avoid resetting checkbox
selections. Zero-count facet values are dimmed for visual clarity.
When no filters are active, pre-computed summaries are used (instant).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: tutorials/isamples_explorer.qmd
+155-7Lines changed: 155 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Search and explore **6.7 million physical samples** from scientific collections
12
12
13
13
::: {.callout-note}
14
14
### Serverless Architecture
15
-
This app uses a **two-tier loading strategy**: a 2KB pre-computed summary loads instantly for facet counts (source, material, context, specimen type), while the full ~280 MB Parquet file is only queried when drilling into records. All powered by DuckDB-WASM in your browser -- no server required!
15
+
This app uses a **two-tier loading strategy**: a 2KB pre-computed summary loads instantly for facet counts, while the full ~280 MB Parquet file is queried on demand. **Cross-filtering** keeps counts accurate — selecting a source updates material/context/specimen counts to reflect only that source's samples. All powered by DuckDB-WASM in your browser — no server required!
16
16
:::
17
17
18
18
## Setup
@@ -92,7 +92,6 @@ facetSummariesWarning
92
92
//| code-fold: true
93
93
// Source checkboxes with counts - uses pre-computed summaries for instant load
94
94
viewof sourceCheckboxes = {
95
-
// Use pre-computed facet summaries (instant) instead of scanning full parquet
96
95
const counts = facetsByType.source;
97
96
const options = counts.map(r => r.value);
98
97
@@ -104,7 +103,7 @@ viewof sourceCheckboxes = {
104
103
const count = r ? Number(r.count).toLocaleString() : "0";
0 commit comments