Code is Science is back: the journal code policy tracker now covers 24 journals.See the tracker

Streamlit vs Dash vs Shiny: choosing a dashboard for research data

The same small app in all three frameworks, a hosting table for research data, and a checklist for keeping a dashboard reproducible after the paper is out.

PracticeBy the Code is Science editorsNov 19, 202610 min read
Line illustration of a laptop showing line charts and sliders on a lab desk, next to a microscope, a small server box with cables and an open notebook
Key takeaways
  • Streamlit gets a working app fastest because it reruns your whole script on every input; large apps then need caching and session state.
  • Dash wires each input to each output with callbacks: more code, precise control, and strong linked Plotly charts.
  • Shiny recomputes only the outputs that depend on a changed input, and is the natural choice if your group writes R.
  • For a paper companion, prefer an app that runs in the browser as static files (Shinylive, Panel Pyodide export) and archive the code with a DOI.

Streamlit, Dash and Shiny are three widely used ways to turn a research analysis into an interactive dashboard without writing a web front end yourself. In short: Streamlit is the fastest route from a Python script to something a collaborator can click; Dash gives the most explicit control over layout and chart interactions; Shiny is the natural choice for R users, and its Python version offers the most careful approach to recomputing only what changed. All three are free and open source. The right one depends less on features than on who will use the dashboard, where it will run and how long it has to live.

Research dashboards also differ from business ones in ways most framework comparisons ignore. The data may be unpublished or personal, the audience may be three co-authors or a public reader of a paper, and the app often has to survive a PhD student leaving the lab. This guide compares the frameworks with those constraints in mind.

A dashboard sometimes grows into a data platform, with user accounts, scheduled pipelines and models served to other groups. At that point the work is mostly software engineering. Some labs take it to a campus research software engineering team; others commission external data science development services for the platform parts and keep the analysis in house. Either way the choice of framework made today decides how much has to be rewritten later.

What does a research dashboard need to do?

A research dashboard needs to do one job well, and that job decides the framework more than any benchmark. Most research dashboards fall into one of four types:

  • Exploration for the team. A few people filter and plot a dataset while the analysis is still moving. Speed of change matters most; polish matters least.
  • Sharing with collaborators or partners. A field partner, a clinician or a funder needs to see results without running code. Access control and a stable address matter.
  • Companion to a paper. Readers explore the published data or model. The app must still work years later, and it must match the figures in the paper exactly.
  • Monitoring an instrument or a study. A dashboard shows incoming data from sensors, a survey or a running simulation. It needs scheduled updates and must not fall over when several people open it at once.

Write down which type you are building before you choose. A team exploration tool that later becomes a paper companion is the most common path, and it is where most rewrites happen.

How do Streamlit, Dash and Shiny compare?

The three frameworks differ mainly in how they react to user input and how much layout control they hand you. The table below includes Panel as a fourth option, because it fits notebook-heavy research groups well and often gets left out of these comparisons.

StreamlitDashShinyPanel
LanguagePythonPython (also R, Julia)R and PythonPython
How it reacts to inputReruns the whole scriptCallbacks you wire by handReactive graph, recomputes only what depends on the inputReactive parameters and callbacks
Time to a first app (rough)MinutesAn hour or twoAbout an hourAbout an hour
Layout controlLimited, column-basedFull HTML/CSS controlGood, Bootstrap-basedGood, template-based
Works inside JupyterNo, separate scriptYes, inline since Dash 2.11No, separate app fileYes, native
Runs without a serverCommunity project stliteNo official optionShinylive (official)Pyodide export (official)
Open-source licenceApache-2.0MITMIT (Python package)BSD-3-Clause

"Runs without a server" means the app runs in the visitor's browser through WebAssembly, so it can be hosted as static files. That matters a lot for paper companions, as the hosting section explains.

How does each framework handle interactivity?

Each framework answers one question differently: when a user moves a slider, what code runs again? The same small app makes the difference visible. It reads a CSV of soil moisture readings, lets the user pick a field site and draws a line chart for that site.

Streamlit: the script reruns from the top

import pandas as pd
import streamlit as st

df = pd.read_csv("plots.csv")
site = st.selectbox("Site", sorted(df["site"].unique()))
st.line_chart(df[df["site"] == site], x="date", y="soil_moisture")

Streamlit runs your script top to bottom every time any input changes. That is why a working app takes five lines: there are no callbacks to wire, and the code reads like an ordinary analysis script.

The cost appears as the app grows. Every interaction repeats every step, including loading data and fitting models, unless you mark those steps for caching. Streamlit has added tools to manage this: st.cache_data for results, st.session_state for values that must survive a rerun, and fragments that rerun only part of the page. They work, but in a large app you end up managing state by hand.

Dash: you wire inputs to outputs

import pandas as pd
import plotly.express as px
from dash import Dash, dcc, html, Input, Output, callback

df = pd.read_csv("plots.csv")
sites = sorted(df["site"].unique())

app = Dash(__name__)
app.layout = html.Div([
    dcc.Dropdown(sites, value=sites[0], id="site"),
    dcc.Graph(id="chart"),
])

@callback(Output("chart", "figure"), Input("site", "value"))
def update(site):
    return px.line(df[df["site"] == site], x="date", y="soil_moisture")

if __name__ == "__main__":
    app.run(debug=True)

Dash separates the layout from the logic. Each callback declares which component properties it reads and which it updates, and only that function runs when its input changes. The code is longer, but nothing reruns by surprise.

Dash is built on Plotly, so linked charts are its strength: selecting points on a scatter plot can filter a table and a map at the same time. The price is boilerplate. A dashboard with a dozen linked controls needs a dozen or more callbacks, and their dependencies become something you have to document.

Shiny: a reactive graph decides what reruns

import matplotlib.pyplot as plt
import pandas as pd
from shiny.express import input, render, ui

df = pd.read_csv("plots.csv")
ui.input_select("site", "Site", sorted(df["site"].unique()))

@render.plot
def chart():
    d = df[df["site"] == input.site()]
    fig, ax = plt.subplots()
    ax.plot(d["date"], d["soil_moisture"])
    return fig

Shiny records which outputs read which inputs, and when an input changes it reruns only the outputs that depend on it. You get Dash's precision without wiring callbacks yourself. Posit, which develops Shiny, sets out this difference in its own Shiny vs Streamlit comparison. Read it as a vendor document, but the technical point holds: in Shiny, patterns that work for a small app keep working for a large one.

Shiny started in R, where it has been widely used in statistics and the life sciences for more than a decade. Shiny for Python is younger, with a smaller ecosystem of extensions. If your group already writes R, Shiny for R is usually the shortest path. If the analysis lives in Python, both are workable.

Which framework fits which research situation?

Match the framework to the situation, not to the most popular comparison post. These are the defaults we would suggest:

  • A quick tool for your own team: Streamlit. You will have something useful the same afternoon, and rewriting it later costs little because there is little code.
  • Your group writes R: Shiny for R. Rewriting working R models in Python to use a different dashboard tool is rarely worth it.
  • A paper companion that must outlive the grant: Shiny with Shinylive, or Panel exported to Pyodide, so the app can be hosted as static files and archived with the paper.
  • Linked plots and fine layout control: Dash. Cross-filtering several Plotly charts is where it is strongest.
  • The analysis lives in Jupyter notebooks: Panel, which runs inside a notebook and serves the same objects as an app. VoilĂ , which turns a notebook into a page, is fine for a one-off demo.
  • Monitoring incoming data for several users: Shiny or Dash. Both handle partial updates without rerunning everything on every refresh.

Whichever you pick, keep the analysis code outside the dashboard file. Put data loading, cleaning and models in a module or package, and let the app only call those functions. Our guide to packaging Python research code shows how. If you switch frameworks later, you then rewrite only the interface.

Where should a research dashboard be hosted?

Host a research dashboard where its data is allowed to live, and where it will still be running when someone reads your paper. Those two conditions remove most options before features come into it.

Hosting routeGood forWatch out for
Static, in the browser (Shinylive, Panel Pyodide export, stlite)Paper companions, public data, long life on GitHub Pages or an institutional web serverAll code and data are sent to the visitor; first load is slow; not every package runs in WebAssembly
Free community hosting (for example Streamlit Community Cloud)Demos and teaching with public dataApps are deployed from a GitHub repository, are usually public and may sleep when idle; no place for unpublished or personal data
Institutional server or JupyterHubUnpublished or sensitive data, use behind university loginSomeone must patch and maintain the server after you leave
Commercial platform (Posit Connect, Dash Enterprise)Groups and departments with many apps, single sign-on, scheduled jobsLicence cost; check whether your institution already pays for one
A science gatewayTools used by many outside groups, with accounts and computeA real software project with its own budget and staff

Can a research dashboard run as static files?

Yes: a static, in-browser app needs no server, so it keeps working as long as the files are hosted. The Shinylive documentation explains that the app runs entirely in the browser through Pyodide, a version of Python compiled to WebAssembly, and can be deployed to any static web host. It also states the trade-offs: the first visit downloads about 13 MB, not every Python package is available, and the code and data cannot be kept secret from the user. For public data behind a published paper, those trade-offs are usually acceptable, and there is no server to keep alive.

How do you handle sensitive data and sign-in?

Check what your data permissions allow before you upload anything. If the data are personal, clinical or covered by an ethics approval or a data use agreement, those documents decide where the app may run. Free hosting is the wrong place for unpublished or personal data, however convenient it is.

When users need to sign in, Streamlit now has built-in login through OpenID Connect providers such as Microsoft Entra ID, which many universities use. For the other frameworks, sign-in usually comes from the hosting layer: a university single sign-on proxy or a commercial platform.

How do you keep a dashboard reproducible and citable?

A running dashboard cannot be archived, but the code and environment behind it can. Treat the app as one more output of the analysis, built from versioned code and data, not as the place where results live.

  1. Put the logic in tested functions. Data cleaning and models live in a module with tests, so the dashboard and the paper's figures call the same code. Our guide to testing research code covers where to start.
  2. Pin the environment. Record exact package versions in a lockfile or container image next to the app. Framework updates change behaviour; Streamlit and Dash both release frequently. See our guide to reproducible environments.
  3. Make every published number reproducible without the app. Each figure in the paper should come from a script, not from a screenshot of a filtered dashboard view.
  4. Archive a release with a DOI. Tag the version of the app that matches the paper and archive it, so readers can run that exact version even after the live site changes. Our guide to archiving code with a DOI takes about fifteen minutes.
  5. State in the paper what the dashboard is. Write "an interactive companion to Figures 2 to 4", not "the results are available at", and give the archived version alongside the live address.

What breaks when a dashboard gets real users?

A dashboard that works for its author usually fails in predictable places once other people depend on it. Plan for these before they happen:

  • Speed. Loading a large file on every interaction is fine for one user and painful for twenty. Cache data loading, precompute heavy aggregates, and move large datasets into a database or Parquet files.
  • Concurrent users. Each Streamlit session reruns its own script, and memory use grows with every open tab. Test with several people at once before a workshop or a launch.
  • Access. "Send me the link" stops working when a partner organisation needs accounts. Decide early whether sign-in comes from the framework, the server or an institutional proxy.
  • Maintenance. Dependencies break, certificates expire and servers need patches. Name a maintainer and a backup, and write down how the app is deployed.

When the list of requests includes accounts, scheduled data pulls, an API for other tools or computation on a cluster, the dashboard has become a platform. That is usually the point to involve a research software engineer; our guide to working with research software engineers explains how. Larger tools often end up as a science gateway, which is planned and funded as a software project in its own right.

What to do this week: build a first version

You can test a framework on your own data in an afternoon. Keep the first version small:

  1. Write down the dashboard type from the list above and who will use it.
  2. Move data loading into a function in a separate module and add one test for it.
  3. Build the soil-moisture style app on your own data: one input, one chart. If you use Streamlit, add st.cache_data to the loader.
  4. Check where the data may be hosted before you deploy anywhere outside your laptop.
  5. Commit the app with a pinned environment so the next person can run it.

If the one-input version answers a real question for your team, you have chosen well enough. Add features one at a time from there.

Questions about research dashboards

Is Streamlit or Dash better for scientific data?

Neither is better in general. Streamlit is faster to write and suits small team tools. Dash suits dashboards with many linked charts and a fixed layout. For research data the bigger questions are where the data may be hosted and how long the app must keep running.

Can I use Shiny with Python instead of R?

Yes. Shiny for Python is an MIT-licensed package from Posit that uses the same reactive model as Shiny for R. Its ecosystem of extensions is smaller than the R version's, so check that the widgets you need exist before you commit.

Can a research dashboard run without a server?

Yes, if the data can be public. Shinylive and Panel's Pyodide export run the app in the visitor's browser through WebAssembly, so it can be hosted as static files on GitHub Pages or an institutional web server. All code and data are sent to the browser, and not every Python package is available.

Where should I host a dashboard with sensitive or unpublished data?

On infrastructure your institution controls, behind its sign-in, and only where your ethics approval or data use agreement allows. Free public hosting services are not suitable for personal or unpublished data.

How do I cite a dashboard in a paper?

Cite the archived version of its code, not only the live address. Tag the release that matches the paper, archive it with a DOI, and describe the app as an interactive companion to specific figures that can also be reproduced from scripts.

Keep reading. More from the desk.