Commit ·
5009b4c
1
Parent(s): e0b240e
Lead with Sankey as navigation view; unify into Catalog views tabs
Browse files
app.py
CHANGED
|
@@ -571,51 +571,52 @@ with gr.Blocks(
|
|
| 571 |
)
|
| 572 |
|
| 573 |
with gr.Accordion(
|
| 574 |
-
"
|
| 575 |
open=True,
|
| 576 |
elem_classes=["eeg-overview"],
|
| 577 |
):
|
| 578 |
-
gr.
|
| 579 |
-
|
| 580 |
-
|
| 581 |
-
|
| 582 |
-
|
| 583 |
-
|
| 584 |
-
|
| 585 |
-
|
| 586 |
-
|
| 587 |
-
|
| 588 |
-
|
| 589 |
-
|
| 590 |
-
|
| 591 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 592 |
with gr.Tab("Treemap"):
|
| 593 |
gr.HTML(
|
| 594 |
-
'<p class="eeg-overview__lede">
|
| 595 |
-
'
|
| 596 |
-
'
|
| 597 |
-
+ _plot_iframe("dataset_treemap", height=
|
| 598 |
elem_classes=["eeg-plot"],
|
| 599 |
)
|
| 600 |
with gr.Tab("Growth"):
|
| 601 |
gr.HTML(
|
| 602 |
'<p class="eeg-overview__lede">New datasets added to the '
|
| 603 |
-
'catalog over time, colored by source.
|
|
|
|
| 604 |
+ _plot_iframe("dataset_growth", height=520, title="Catalog growth"),
|
| 605 |
elem_classes=["eeg-plot"],
|
| 606 |
)
|
| 607 |
-
with gr.Tab("Sankey"):
|
| 608 |
-
gr.HTML(
|
| 609 |
-
'<p class="eeg-overview__lede">Flow from modality to '
|
| 610 |
-
'pathology to source — follow the thickest lines to see '
|
| 611 |
-
'where the catalog’s weight lies.</p>'
|
| 612 |
-
+ _plot_iframe("dataset_sankey", height=560, title="Dataset sankey"),
|
| 613 |
-
elem_classes=["eeg-plot"],
|
| 614 |
-
)
|
| 615 |
with gr.Tab("Clinical"):
|
| 616 |
gr.HTML(
|
| 617 |
'<p class="eeg-overview__lede">Clinical populations '
|
| 618 |
-
'represented in the catalog
|
| 619 |
'neurodegenerative and psychiatric conditions.</p>'
|
| 620 |
+ _plot_iframe("dataset_clinical", height=520, title="Clinical breakdown"),
|
| 621 |
elem_classes=["eeg-plot"],
|
|
|
|
| 571 |
)
|
| 572 |
|
| 573 |
with gr.Accordion(
|
| 574 |
+
"Catalog views",
|
| 575 |
open=True,
|
| 576 |
elem_classes=["eeg-overview"],
|
| 577 |
):
|
| 578 |
+
with gr.Tabs(elem_classes=["eeg-tabs"]):
|
| 579 |
+
with gr.Tab("Flow"):
|
| 580 |
+
gr.HTML(
|
| 581 |
+
'<p class="eeg-overview__lede">The catalog as a navigation '
|
| 582 |
+
'map. Every dataset flows from its <em>experimental '
|
| 583 |
+
'modality</em> (left) to its <em>clinical population</em> '
|
| 584 |
+
'(middle) to its <em>repository</em> (right). Ribbon '
|
| 585 |
+
'thickness is the dataset count along that path — follow '
|
| 586 |
+
'any color to see where a paradigm of interest lives.</p>'
|
| 587 |
+
+ _plot_iframe("dataset_sankey", height=640, title="Catalog flow (sankey)"),
|
| 588 |
+
elem_classes=["eeg-plot"],
|
| 589 |
+
)
|
| 590 |
+
with gr.Tab("Bubbles"):
|
| 591 |
+
gr.HTML(
|
| 592 |
+
'<p class="eeg-overview__lede">Every dataset as an '
|
| 593 |
+
'individual mark. Bubble size is recording count, color is '
|
| 594 |
+
'experimental modality, axes span subjects × duration. '
|
| 595 |
+
'Hover to find a specific dataset; use the filter below to '
|
| 596 |
+
'narrow the field.</p>'
|
| 597 |
+
+ _plot_iframe("dataset_bubble", height=780, title="Dataset bubble chart"),
|
| 598 |
+
elem_classes=["eeg-plot"],
|
| 599 |
+
)
|
| 600 |
with gr.Tab("Treemap"):
|
| 601 |
gr.HTML(
|
| 602 |
+
'<p class="eeg-overview__lede">Nested rectangles grouped by '
|
| 603 |
+
'modality. Area is proportional to recording count — the '
|
| 604 |
+
'biggest tiles are the heaviest contributors.</p>'
|
| 605 |
+
+ _plot_iframe("dataset_treemap", height=820, title="Dataset treemap"),
|
| 606 |
elem_classes=["eeg-plot"],
|
| 607 |
)
|
| 608 |
with gr.Tab("Growth"):
|
| 609 |
gr.HTML(
|
| 610 |
'<p class="eeg-overview__lede">New datasets added to the '
|
| 611 |
+
'catalog over time, colored by source. The slope tells you '
|
| 612 |
+
'how fast the archive has expanded.</p>'
|
| 613 |
+ _plot_iframe("dataset_growth", height=520, title="Catalog growth"),
|
| 614 |
elem_classes=["eeg-plot"],
|
| 615 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 616 |
with gr.Tab("Clinical"):
|
| 617 |
gr.HTML(
|
| 618 |
'<p class="eeg-overview__lede">Clinical populations '
|
| 619 |
+
'represented in the catalog — from healthy controls to '
|
| 620 |
'neurodegenerative and psychiatric conditions.</p>'
|
| 621 |
+ _plot_iframe("dataset_clinical", height=520, title="Clinical breakdown"),
|
| 622 |
elem_classes=["eeg-plot"],
|
style.css
CHANGED
|
@@ -571,6 +571,42 @@ html.dark .eeg-card__rec { filter: invert(1) hue-rotate(180deg) brightness(1.1);
|
|
| 571 |
line-height: 1.55;
|
| 572 |
max-width: 78ch;
|
| 573 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 574 |
|
| 575 |
/* Plotly fragments ship their own .eegdash-figure wrapper. Let it render as-is
|
| 576 |
but make sure it doesn't get boxed twice by gradio's surrounding block. */
|
|
|
|
| 571 |
line-height: 1.55;
|
| 572 |
max-width: 78ch;
|
| 573 |
}
|
| 574 |
+
.eeg-overview__lede em {
|
| 575 |
+
font-style: normal;
|
| 576 |
+
color: var(--ink);
|
| 577 |
+
font-weight: 600;
|
| 578 |
+
background: var(--brand-soft);
|
| 579 |
+
padding: 1px 6px;
|
| 580 |
+
border-radius: 4px;
|
| 581 |
+
}
|
| 582 |
+
|
| 583 |
+
/* Tab strip inside Catalog views — make the tab buttons chip-like so the
|
| 584 |
+
"Flow / Bubbles / Treemap / …" row reads as a choice of lens, not a
|
| 585 |
+
throwaway. */
|
| 586 |
+
.eeg-tabs [role="tablist"] {
|
| 587 |
+
gap: 6px !important;
|
| 588 |
+
border-bottom: 1px solid var(--outline) !important;
|
| 589 |
+
padding: 0 0 0 2px !important;
|
| 590 |
+
margin-bottom: 14px !important;
|
| 591 |
+
}
|
| 592 |
+
.eeg-tabs [role="tab"] {
|
| 593 |
+
padding: 8px 14px !important;
|
| 594 |
+
border-radius: 10px 10px 0 0 !important;
|
| 595 |
+
font-weight: 500 !important;
|
| 596 |
+
font-size: 13.5px !important;
|
| 597 |
+
color: var(--muted) !important;
|
| 598 |
+
border: 1px solid transparent !important;
|
| 599 |
+
border-bottom: 0 !important;
|
| 600 |
+
background: transparent !important;
|
| 601 |
+
transition: color 150ms ease, background 150ms ease;
|
| 602 |
+
}
|
| 603 |
+
.eeg-tabs [role="tab"]:hover { color: var(--ink) !important; background: var(--subtle) !important; }
|
| 604 |
+
.eeg-tabs [role="tab"][aria-selected="true"] {
|
| 605 |
+
color: var(--brand) !important;
|
| 606 |
+
background: var(--surface) !important;
|
| 607 |
+
border-color: var(--outline) !important;
|
| 608 |
+
box-shadow: 0 1px 0 0 var(--surface);
|
| 609 |
+
}
|
| 610 |
|
| 611 |
/* Plotly fragments ship their own .eegdash-figure wrapper. Let it render as-is
|
| 612 |
but make sure it doesn't get boxed twice by gradio's surrounding block. */
|