[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ECQG8MSYWKCCD8XMGB6EAA":3,"skill-same:01M7ECQG8MSYWKCCD8XMGB6EAA":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7ECQG8MSYWKCCD8XMGB6EAA","bio-data-visualization-interactive-visualization",null,"Build interactive HTML\u002Fweb visualizations with plotly (Python\u002FR), bokeh (Python), and gganimate\u002Fplotly frames for animation, with awareness of current Kaleido static-export model (post-orca-EOL), HTML file-size bloat, and the limits of interactive-only output for journal submission. Use when producing zoomable\u002Fhoverable plots for notebook EDA, supplementary HTML, dashboards, or animated time-course \u002F iteration visualizations.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-data-visualization-interactive-visualization\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-data-visualization-interactive-visualization\ndescription: Build interactive HTML\u002Fweb visualizations with plotly (Python\u002FR), bokeh (Python), and gganimate\u002Fplotly frames for animation, with awareness of current Kaleido static-export model (post-orca-EOL), HTML file-size bloat, and the limits of interactive-only output for journal submission. Use when producing zoomable\u002Fhoverable plots for notebook EDA, supplementary HTML, dashboards, or animated time-course \u002F iteration visualizations.\ntool_type: mixed\nprimary_tool: plotly\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"data-visualization\u002Finteractive-visualization\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: plotly 5.24+, plotly R 4.10+, bokeh 3.4+, kaleido 1.0+ (note: v1 dropped bundled Chrome), gganimate 1.0.9+, altair 5.4+, htmlwidgets 1.6+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show \u003Cpackage>` then `help(module.function)`\n- R: `packageVersion('\u003Cpkg>')` then `?function_name`\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.\n\n# Interactive Visualization\n\n**\"Build an interactive plot\"** -> Render a zoomable, hoverable, panable HTML\u002Fweb visualization, knowing that interactive output is a SUPPLEMENT to (not replacement for) the static figure needed for journal submission. Choose plotly for fastest onboarding and ggplot2 conversion (`ggplotly`); bokeh for streaming\u002Fserver-side; altair for grammar-of-graphics; D3.js for full custom.\n\n- Python: `plotly.graph_objects`, `plotly.express`, `bokeh`, `altair`\n- R: `plotly` (via `ggplotly`), `htmlwidgets` ecosystem (leaflet, networkD3, DT)\n\n## The Single Most Important Modern Insight -- Kaleido v1 and the Static-Export Pipeline\n\nInteractive plots produce HTML, but journals need static PDF\u002FPNG. The plotly static-export pipeline changed materially in 2025:\n\n- **Orca is end-of-life** (deprecated 2021, removed pipeline 2025)\n- **`fig.write_image(..., engine='orca')` removed in plotly 6.2** (post-Sept 2025)\n- **Kaleido v1+ is the current standard** — pass no `engine=` argument\n- **Kaleido v1 dropped bundled Chrome** — requires installed Chrome \u002F Chromium\n- **EPS export removed in Kaleido v1** (was supported via orca's bundled Chromium)\n\nFor static export of plotly figures in 2026: `pip install kaleido`; verify Chrome installed; `fig.write_image('out.pdf')`. Test by writing to a known path and inspecting file size; silent failure on missing Chrome was a 2024-2025 pain point that v1 partially addresses with clearer errors.\n\n## Interactive vs Static — The Reproducibility Cost\n\nInteractive HTML has hidden trade-offs:\n\n- **File size**: a 5000-point plotly HTML is 3-5 MB (embedded JS bundle). 50000 points crashes browsers without WebGL acceleration.\n- **Non-citable**: a paper figure must be static. Always export static alongside.\n- **Browser version drift**: HTML from 2020 plotly may not render in 2026 browsers.\n- **Cannot be alt-text described**: accessibility weaker than static.\n\nUse interactive for notebooks (exploration), supplementary HTML (online journal supplement), dashboards (Streamlit\u002FDash\u002FShiny). For the journal figure, always also produce static.\n\n## plotly (Python) — Standard Interactive\n\n**Goal:** Build an interactive HTML plot with zoom, pan, and hover-tooltip behavior; export both interactive HTML for supplements and static PDF for the journal figure.\n\n**Approach:** Use `plotly.express` for declarative high-level plots OR `graph_objects` for fine control; enable WebGL via `render_mode='webgl'` or `Scattergl` for >5000 points; export HTML with `write_html()` and static with `write_image()` after installing Kaleido v1+ and Chrome.\n\n```python\nimport plotly.express as px\nimport plotly.graph_objects as go\n\n# Express: high-level, declarative\nfig = px.scatter(df, x='PC1', y='PC2', color='cluster',\n                  hover_data=['gene_count', 'sample_id'],\n                  color_discrete_sequence=['#0072B2', '#D55E00', '#009E73'],\n                  title='PCA')\nfig.update_layout(template='plotly_white', width=600, height=500)\n\n# WebGL acceleration for >5000 points\nfig = px.scatter(df, x='PC1', y='PC2', color='cluster', render_mode='webgl')\n\n# Save\nfig.write_html('pca.html')\nfig.write_image('pca.pdf')                   # requires kaleido + Chrome\n\n# Graph_objects: low-level\nfig = go.Figure(go.Scattergl(                 # Scattergl == WebGL scatter\n    x=df['PC1'], y=df['PC2'],\n    mode='markers',\n    marker=dict(color=df['cluster_code'], colorscale='Tab10', size=4),\n    text=df['sample_id'], hoverinfo='text'))\n```\n\n## plotly (R) — ggplotly Conversion\n\n```r\nlibrary(plotly)\nlibrary(ggplot2)\n\np \u003C- ggplot(df, aes(x = PC1, y = PC2, color = cluster, text = sample_id)) +\n    geom_point() + theme_classic()\n\n# Convert ggplot to interactive plotly\np_int \u003C- ggplotly(p, tooltip = c('text', 'x', 'y', 'colour'))\n\n# Save\nhtmlwidgets::saveWidget(p_int, 'pca.html', selfcontained = TRUE)\n```\n\nggplotly is the lowest-friction R interactive path — write ggplot, get plotly.\n\n## bokeh (Python) — Server-Side \u002F Streaming\n\n```python\nfrom bokeh.plotting import figure, output_file, save\nfrom bokeh.models import ColumnDataSource, HoverTool\n\noutput_file('pca_bokeh.html')\n\nsource = ColumnDataSource(df)\np = figure(title='PCA', x_axis_label='PC1', y_axis_label='PC2',\n           tools='pan,wheel_zoom,box_zoom,reset,hover,save')\np.scatter('PC1', 'PC2', source=source, size=8, alpha=0.7,\n          color={'field': 'cluster', 'transform': cluster_cmap})\np.add_tools(HoverTool(tooltips=[('Sample', '@sample_id'), ('Cluster', '@cluster')]))\nsave(p)\n```\n\nbokeh is stronger than plotly for streaming dashboards and server-side aggregation. Static export via `bokeh.io.export_png` requires selenium + Chrome.\n\n## Animation — gganimate (R) and plotly frames (Python)\n\n```r\nlibrary(gganimate)\np \u003C- ggplot(df, aes(x, y, color = condition)) +\n    geom_point(size = 3) +\n    theme_classic() +\n    transition_time(time) +                  # animate over time\n    labs(title = 'Time: {frame_time}')\n\nanim \u003C- animate(p, nframes = 100, fps = 20, width = 600, height = 400,\n                 renderer = gifski_renderer())\nanim_save('time_course.gif', anim)\n```\n\n```python\nimport plotly.express as px\nfig = px.scatter(df, x='x', y='y', color='condition',\n                  animation_frame='time',\n                  animation_group='entity_id',\n                  range_x=[xmin, xmax], range_y=[ymin, ymax])\nfig.write_html('time_course.html')\n```\n\nAnimation suits time-course data, iterative algorithm visualization, before-after comparisons. Limit to ≤100 frames; longer animations bloat file size and tax viewer attention.\n\n## htmlwidgets Ecosystem (R)\n\n```r\nlibrary(DT)                                 # interactive tables\ndatatable(df, filter = 'top', extensions = 'Buttons',\n          options = list(dom = 'Bfrtip', buttons = c('csv', 'excel')))\n\nlibrary(leaflet)                            # interactive maps\nleaflet(spatial_df) %>% addTiles() %>% addCircles()\n\nlibrary(networkD3)                          # interactive networks\nsankeyNetwork(...) %>% saveWidget('sankey.html')\n```\n\nhtmlwidgets is the R answer to plotly's JavaScript wrapping — many specialized packages for tables, maps, networks, all producing standalone HTML.\n\n## Per-Method Failure Modes\n\n### plotly static export silently fails\n\n**Trigger:** `fig.write_image('out.pdf')` without kaleido installed.\n\n**Mechanism:** plotly previously fell back to orca (now removed); current versions raise ValueError but older versions silently skipped.\n\n**Symptom:** No file written; OR file written with default settings.\n\n**Fix:** `pip install kaleido`; verify Chrome is installed (kaleido v1+ requires it); test with `fig.write_image('test.pdf')` after install.\n\n### orca dependency in older code\n\n**Trigger:** Following 2020-2022 plotly tutorials with `engine='orca'`.\n\n**Mechanism:** orca is EOL; `engine=` parameter deprecated in plotly 6.2 (post-Sep 2025).\n\n**Symptom:** ValueError or DeprecationWarning.\n\n**Fix:** Remove `engine=` argument; use Kaleido v1 (default).\n\n### EPS export needed but Kaleido v1 dropped it\n\n**Trigger:** Journal requires EPS; Kaleido v1 only supports PDF\u002FPNG\u002FSVG\u002FJPG\u002FWebP.\n\n**Mechanism:** Bundled Chromium in v0 supported EPS; v1 unbundled and dropped it.\n\n**Symptom:** kaleido error on EPS export.\n\n**Fix:** Export PDF, then convert via `pdf2ps` (ghostscript). For complex figures may produce raster EPS — verify acceptability with journal.\n\n### HTML file > 10 MB\n\n**Trigger:** Plotly scatter of 50000 points exported as HTML.\n\n**Mechanism:** Each point + hover data embedded; JS bundle ~3 MB; data scales linearly.\n\n**Symptom:** Browser hangs opening; reviewer's network throttles upload.\n\n**Fix:** Use Scattergl (WebGL); OR Datashader pre-aggregation; OR ship static + small HTML supplement.\n\n### gganimate slow on large frames\n\n**Trigger:** `transition_time` with 100+ frames and 10000+ points per frame.\n\n**Mechanism:** Each frame rendered independently.\n\n**Symptom:** Animation takes hours.\n\n**Fix:** Downsample frames; pre-aggregate per-frame data; OR use plotly animation (in-browser interpolation faster).\n\n### Interactive plot shown as figure in paper\n\n**Trigger:** Manuscript references interactive HTML as Figure 2.\n\n**Mechanism:** Journals require static; interactive HTML is supplement.\n\n**Symptom:** Submission requires figure resubmission as static.\n\n**Fix:** Always produce both static (figure) + interactive (supplement) versions.\n\n## Reconciliation\n\n| Pattern | Cause | Action |\n|---------|-------|--------|\n| Kaleido \u002F orca confusion in plotly | Pipeline changed 2024-2025 | Use Kaleido v1+; no `engine=` |\n| ggplotly drops some custom theme | Conversion loses non-translatable ggplot elements | Manually re-add via `plotly::layout()` |\n| bokeh static export fails | selenium not installed | `pip install selenium`; Chrome required |\n| htmlwidgets self-contained doesn't work offline | CDN-linked resources by default | `saveWidget(..., selfcontained = TRUE)` |\n\n## Quantitative Thresholds\n\n| Threshold | Value | Source |\n|-----------|-------|--------|\n| HTML file size warning | >10 MB | Practical |\n| Scattergl trigger | >5000 points | plotly performance |\n| Animation max frames | ~100 | Viewer attention + file size |\n| Selfcontained HTML on | always for portability | htmlwidgets best practice |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| Static export silent failure | kaleido \u002F Chrome missing | Install both |\n| HTML bloated | Large N points | Scattergl or Datashader |\n| orca DeprecationWarning | Following old tutorial | Remove engine=, use Kaleido v1 |\n| EPS export fails | Kaleido v1 dropped EPS | PDF + pdf2ps |\n| ggplotly tooltips show wrong fields | Default `tooltip` argument | Specify `tooltip = c(...)` |\n| Animation file too large | Too many frames | Downsample \u002F pre-aggregate |\n| Interactive cited as paper figure | Journal requires static | Produce both |\n\n## References\n\n- Sievert C. 2020. *Interactive Web-Based Data Visualization with R, plotly, and shiny.* Chapman and Hall\u002FCRC.\n- Plotly Python — Static Image Generation Changes (2024-2025). https:\u002F\u002Fplotly.com\u002Fpython\u002Fstatic-image-generation-changes\u002F\n- Bostock M, Ogievetsky V, Heer J. 2011. D³ Data-Driven Documents. *IEEE TVCG* 17(12):2301-2309.\n- Wickham H, Pedersen TL, Seidel D. 2022. gganimate (CRAN). https:\u002F\u002Fgganimate.com\n\n## Related Skills\n\n- reporting\u002Fquarto-reports - Embed interactive HTML in scientific reports\n- reporting\u002Frmarkdown-reports - htmlwidgets in Rmd\n- data-visualization\u002Fggplot2-fundamentals - ggplot input for ggplotly\n- data-visualization\u002Fdimensionality-reduction-plots - Interactive UMAP\u002FPCA exploration\n- data-visualization\u002Fnetwork-visualization - PyVis interactive networks\n","## Version Compatibility\n\nReference examples tested with: plotly 5.24+, plotly R 4.10+, bokeh 3.4+, kaleido 1.0+ (note: v1 dropped bundled Chrome), gganimate 1.0.9+, altair 5.4+, htmlwidgets 1.6+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show \u003Cpackage>` then `help(module.function)`\n- R: `packageVersion('\u003Cpkg>')` then `?function_name`\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.\n\n# Interactive Visualization\n\n**\"Build an interactive plot\"** -> Render a zoomable, hoverable, panable HTML\u002Fweb visualization, knowing that interactive output is a SUPPLEMENT to (not replacement for) the static figure needed for journal submission. Choose plotly for fastest onboarding and ggplot2 conversion (`ggplotly`); bokeh for streaming\u002Fserver-side; altair for grammar-of-graphics; D3.js for full custom.\n\n- Python: `plotly.graph_objects`, `plotly.express`, `bokeh`, `altair`\n- R: `plotly` (via `ggplotly`), `htmlwidgets` ecosystem (leaflet, networkD3, DT)\n\n## The Single Most Important Modern Insight -- Kaleido v1 and the Static-Export Pipeline\n\nInteractive plots produce HTML, but journals need static PDF\u002FPNG. The plotly static-export pipeline changed materially in 2025:\n\n- **Orca is end-of-life** (deprecated 2021, removed pipeline 2025)\n- **`fig.write_image(..., engine='orca')` removed in plotly 6.2** (post-Sept 2025)\n- **Kaleido v1+ is the current standard** — pass no `engine=` argument\n- **Kaleido v1 dropped bundled Chrome** — requires installed Chrome \u002F Chromium\n- **EPS export removed in Kaleido v1** (was supported via orca's bundled Chromium)\n\nFor static export of plotly figures in 2026: `pip install kaleido`; verify Chrome installed; `fig.write_image('out.pdf')`. Test by writing to a known path and inspecting file size; silent failure on missing Chrome was a 2024-2025 pain point that v1 partially addresses with clearer errors.\n\n## Interactive vs Static — The Reproducibility Cost\n\nInteractive HTML has hidden trade-offs:\n\n- **File size**: a 5000-point plotly HTML is 3-5 MB (embedded JS bundle). 50000 points crashes browsers without WebGL acceleration.\n- **Non-citable**: a paper figure must be static. Always export static alongside.\n- **Browser version drift**: HTML from 2020 plotly may not render in 2026 browsers.\n- **Cannot be alt-text described**: accessibility weaker than static.\n\nUse interactive for notebooks (exploration), supplementary HTML (online journal supplement), dashboards (Streamlit\u002FDash\u002FShiny). For the journal figure, always also produce static.\n\n## plotly (Python) — Standard Interactive\n\n**Goal:** Build an interactive HTML plot with zoom, pan, and hover-tooltip behavior; export both interactive HTML for supplements and static PDF for the journal figure.\n\n**Approach:** Use `plotly.express` for declarative high-level plots OR `graph_objects` for fine control; enable WebGL via `render_mode='webgl'` or `Scattergl` for >5000 points; export HTML with `write_html()` and static with `write_image()` after installing Kaleido v1+ and Chrome.\n\n```python\nimport plotly.express as px\nimport plotly.graph_objects as go\n\n# Express: high-level, declarative\nfig = px.scatter(df, x='PC1', y='PC2', color='cluster',\n                  hover_data=['gene_count', 'sample_id'],\n                  color_discrete_sequence=['#0072B2', '#D55E00', '#009E73'],\n                  title='PCA')\nfig.update_layout(template='plotly_white', width=600, height=500)\n\n# WebGL acceleration for >5000 points\nfig = px.scatter(df, x='PC1', y='PC2', color='cluster', render_mode='webgl')\n\n# Save\nfig.write_html('pca.html')\nfig.write_image('pca.pdf')                   # requires kaleido + Chrome\n\n# Graph_objects: low-level\nfig = go.Figure(go.Scattergl(                 # Scattergl == WebGL scatter\n    x=df['PC1'], y=df['PC2'],\n    mode='markers',\n    marker=dict(color=df['cluster_code'], colorscale='Tab10', size=4),\n    text=df['sample_id'], hoverinfo='text'))\n```\n\n## plotly (R) — ggplotly Conversion\n\n```r\nlibrary(plotly)\nlibrary(ggplot2)\n\np \u003C- ggplot(df, aes(x = PC1, y = PC2, color = cluster, text = sample_id)) +\n    geom_point() + theme_classic()\n\n# Convert ggplot to interactive plotly\np_int \u003C- ggplotly(p, tooltip = c('text', 'x', 'y', 'colour'))\n\n# Save\nhtmlwidgets::saveWidget(p_int, 'pca.html', selfcontained = TRUE)\n```\n\nggplotly is the lowest-friction R interactive path — write ggplot, get plotly.\n\n## bokeh (Python) — Server-Side \u002F Streaming\n\n```python\nfrom bokeh.plotting import figure, output_file, save\nfrom bokeh.models import ColumnDataSource, HoverTool\n\noutput_file('pca_bokeh.html')\n\nsource = ColumnDataSource(df)\np = figure(title='PCA', x_axis_label='PC1', y_axis_label='PC2',\n           tools='pan,wheel_zoom,box_zoom,reset,hover,save')\np.scatter('PC1', 'PC2', source=source, size=8, alpha=0.7,\n          color={'field': 'cluster', 'transform': cluster_cmap})\np.add_tools(HoverTool(tooltips=[('Sample', '@sample_id'), ('Cluster', '@cluster')]))\nsave(p)\n```\n\nbokeh is stronger than plotly for streaming dashboards and server-side aggregation. Static export via `bokeh.io.export_png` requires selenium + Chrome.\n\n## Animation — gganimate (R) and plotly frames (Python)\n\n```r\nlibrary(gganimate)\np \u003C- ggplot(df, aes(x, y, color = condition)) +\n    geom_point(size = 3) +\n    theme_classic() +\n    transition_time(time) +                  # animate over time\n    labs(title = 'Time: {frame_time}')\n\nanim \u003C- animate(p, nframes = 100, fps = 20, width = 600, height = 400,\n                 renderer = gifski_renderer())\nanim_save('time_course.gif', anim)\n```\n\n```python\nimport plotly.express as px\nfig = px.scatter(df, x='x', y='y', color='condition',\n                  animation_frame='time',\n                  animation_group='entity_id',\n                  range_x=[xmin, xmax], range_y=[ymin, ymax])\nfig.write_html('time_course.html')\n```\n\nAnimation suits time-course data, iterative algorithm visualization, before-after comparisons. Limit to ≤100 frames; longer animations bloat file size and tax viewer attention.\n\n## htmlwidgets Ecosystem (R)\n\n```r\nlibrary(DT)                                 # interactive tables\ndatatable(df, filter = 'top', extensions = 'Buttons',\n          options = list(dom = 'Bfrtip', buttons = c('csv', 'excel')))\n\nlibrary(leaflet)                            # interactive maps\nleaflet(spatial_df) %>% addTiles() %>% addCircles()\n\nlibrary(networkD3)                          # interactive networks\nsankeyNetwork(...) %>% saveWidget('sankey.html')\n```\n\nhtmlwidgets is the R answer to plotly's JavaScript wrapping — many specialized packages for tables, maps, networks, all producing standalone HTML.\n\n## Per-Method Failure Modes\n\n### plotly static export silently fails\n\n**Trigger:** `fig.write_image('out.pdf')` without kaleido installed.\n\n**Mechanism:** plotly previously fell back to orca (now removed); current versions raise ValueError but older versions silently skipped.\n\n**Symptom:** No file written; OR file written with default settings.\n\n**Fix:** `pip install kaleido`; verify Chrome is installed (kaleido v1+ requires it); test with `fig.write_image('test.pdf')` after install.\n\n### orca dependency in older code\n\n**Trigger:** Following 2020-2022 plotly tutorials with `engine='orca'`.\n\n**Mechanism:** orca is EOL; `engine=` parameter deprecated in plotly 6.2 (post-Sep 2025).\n\n**Symptom:** ValueError or DeprecationWarning.\n\n**Fix:** Remove `engine=` argument; use Kaleido v1 (default).\n\n### EPS export needed but Kaleido v1 dropped it\n\n**Trigger:** Journal requires EPS; Kaleido v1 only supports PDF\u002FPNG\u002FSVG\u002FJPG\u002FWebP.\n\n**Mechanism:** Bundled Chromium in v0 supported EPS; v1 unbundled and dropped it.\n\n**Symptom:** kaleido error on EPS export.\n\n**Fix:** Export PDF, then convert via `pdf2ps` (ghostscript). For complex figures may produce raster EPS — verify acceptability with journal.\n\n### HTML file > 10 MB\n\n**Trigger:** Plotly scatter of 50000 points exported as HTML.\n\n**Mechanism:** Each point + hover data embedded; JS bundle ~3 MB; data scales linearly.\n\n**Symptom:** Browser hangs opening; reviewer's network throttles upload.\n\n**Fix:** Use Scattergl (WebGL); OR Datashader pre-aggregation; OR ship static + small HTML supplement.\n\n### gganimate slow on large frames\n\n**Trigger:** `transition_time` with 100+ frames and 10000+ points per frame.\n\n**Mechanism:** Each frame rendered independently.\n\n**Symptom:** Animation takes hours.\n\n**Fix:** Downsample frames; pre-aggregate per-frame data; OR use plotly animation (in-browser interpolation faster).\n\n### Interactive plot shown as figure in paper\n\n**Trigger:** Manuscript references interactive HTML as Figure 2.\n\n**Mechanism:** Journals require static; interactive HTML is supplement.\n\n**Symptom:** Submission requires figure resubmission as static.\n\n**Fix:** Always produce both static (figure) + interactive (supplement) versions.\n\n## Reconciliation\n\n| Pattern | Cause | Action |\n|---------|-------|--------|\n| Kaleido \u002F orca confusion in plotly | Pipeline changed 2024-2025 | Use Kaleido v1+; no `engine=` |\n| ggplotly drops some custom theme | Conversion loses non-translatable ggplot elements | Manually re-add via `plotly::layout()` |\n| bokeh static export fails | selenium not installed | `pip install selenium`; Chrome required |\n| htmlwidgets self-contained doesn't work offline | CDN-linked resources by default | `saveWidget(..., selfcontained = TRUE)` |\n\n## Quantitative Thresholds\n\n| Threshold | Value | Source |\n|-----------|-------|--------|\n| HTML file size warning | >10 MB | Practical |\n| Scattergl trigger | >5000 points | plotly performance |\n| Animation max frames | ~100 | Viewer attention + file size |\n| Selfcontained HTML on | always for portability | htmlwidgets best practice |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| Static export silent failure | kaleido \u002F Chrome missing | Install both |\n| HTML bloated | Large N points | Scattergl or Datashader |\n| orca DeprecationWarning | Following old tutorial | Remove engine=, use Kaleido v1 |\n| EPS export fails | Kaleido v1 dropped EPS | PDF + pdf2ps |\n| ggplotly tooltips show wrong fields | Default `tooltip` argument | Specify `tooltip = c(...)` |\n| Animation file too large | Too many frames | Downsample \u002F pre-aggregate |\n| Interactive cited as paper figure | Journal requires static | Produce both |\n\n## References\n\n- Sievert C. 2020. *Interactive Web-Based Data Visualization with R, plotly, and shiny.* Chapman and Hall\u002FCRC.\n- Plotly Python — Static Image Generation Changes (2024-2025). https:\u002F\u002Fplotly.com\u002Fpython\u002Fstatic-image-generation-changes\u002F\n- Bostock M, Ogievetsky V, Heer J. 2011. D³ Data-Driven Documents. *IEEE TVCG* 17(12):2301-2309.\n- Wickham H, Pedersen TL, Seidel D. 2022. gganimate (CRAN). https:\u002F\u002Fgganimate.com\n\n## Related Skills\n\n- reporting\u002Fquarto-reports - Embed interactive HTML in scientific reports\n- reporting\u002Frmarkdown-reports - htmlwidgets in Rmd\n- data-visualization\u002Fggplot2-fundamentals - ggplot input for ggplotly\n- data-visualization\u002Fdimensionality-reduction-plots - Interactive UMAP\u002FPCA exploration\n- data-visualization\u002Fnetwork-visualization - PyVis interactive networks\n",{"name":5,"source":24,"license":15,"tool_type":25,"description":7,"imported_at":26,"source_path":27,"primary_tool":28,"source_repository":29},"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills","mixed","2026-09-20","data-visualization\u002Finteractive-visualization\u002FSKILL.md","plotly","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-data-visualization-interactive-visualization","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-data-visualization-interactive-visualization",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-data-visualization-interactive-visualization",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-data-visualization-interactive-visualization","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-data-visualization-interactive-visualization\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Finteractive_volcano.py","SCRIPT","脚本",1947,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-data-visualization-interactive-visualization\u002Fexamples\u002Finteractive_volcano.py",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"usage-guide.md","REFERENCE","参考文档",4084,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-data-visualization-interactive-visualization\u002Fusage-guide.md",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":70},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":70},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":70},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":70},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":70},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":70},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]