Guides

How to Build a Data Dashboard with Streamlit

Arkzero ResearchApr 23, 20266 min read

Last updated Apr 23, 2026

Streamlit is an open-source Python framework that converts a script into a shareable web dashboard in minutes. Version 1.55.0, released March 2026, added URL state binding so dashboard filters become bookmarkable links. You install Streamlit with pip, write a script using st.dataframe, st.selectbox, and st.line_chart, then deploy free to Streamlit Community Cloud from a GitHub repository. No frontend skills are required.
A developer working at a computer, building a data dashboard in Python

Streamlit converts a Python script into an interactive web application. Each time a user changes a filter or slider, Streamlit reruns the script top-to-bottom and refreshes the display. There is no HTML, no JavaScript, and no separate server to configure. A working dashboard with filters and charts typically takes under 60 lines of Python.

As of April 2026, Streamlit has over 34,000 GitHub stars and is used by teams at Uber, Airbus, and Lyft for internal reporting tools. The framework is particularly useful for analysts who know Python but do not want to build frontend infrastructure from scratch.

Install Streamlit

Streamlit requires Python 3.9 or later. Python 3.12 is recommended for the best library compatibility in 2026.

Install via pip:

pip install streamlit

Verify the installation:

streamlit hello

A built-in demo app opens in your browser at http://localhost:8501. If the demo loads, setup is complete.

Set Up Your Project

Create a folder for your project and add two files:

sales-dashboard/
  app.py
  requirements.txt
  sales.csv

In requirements.txt, pin your dependencies:

streamlit>=1.55.0
pandas

Pinning the Streamlit version matters during deployment. Community Cloud will install exactly what is listed, so specifying >=1.55.0 ensures the URL binding feature described later in this guide is available.

Load and Display Data

For this example, sales.csv contains monthly sales records:

date,region,product,revenue
2026-01-05,North,Widget A,4200
2026-01-12,South,Widget B,3100
2026-02-01,North,Widget C,5800

In app.py, load the file and render it:

import streamlit as st
import pandas as pd

st.title("Sales Dashboard")

df = pd.read_csv("sales.csv", parse_dates=["date"])
st.dataframe(df)

Run the app:

streamlit run app.py

Streamlit opens a browser tab with the raw table. Every time you save the file, Streamlit detects the change and offers a rerun button at the top of the page. You do not need to restart the server.

Add Interactive Filters

Widgets in Streamlit are regular Python function calls. Place them above the dataframe to filter the data before it renders:

import streamlit as st
import pandas as pd

st.title("Sales Dashboard")

df = pd.read_csv("sales.csv", parse_dates=["date"])

regions = ["All"] + sorted(df["region"].unique().tolist())
selected_region = st.selectbox("Region", regions)

if selected_region != "All":
    df = df[df["region"] == selected_region]

st.dataframe(df)

Save and the dropdown appears immediately. Selecting "North" filters the table to North records only. No callback functions or event handlers are needed.

You can stack multiple filters by repeating the pattern for other columns, such as product category or date range.

Add Charts

Below the dataframe, add a revenue-over-time line chart:

chart_data = df.groupby("date")["revenue"].sum().reset_index()
st.line_chart(chart_data.set_index("date"))

Add a bar chart showing revenue by product:

product_data = df.groupby("product")["revenue"].sum().reset_index()
st.bar_chart(product_data.set_index("product"))

Both charts respond to the region filter automatically because the data is filtered before the chart lines execute. This is the core pattern in Streamlit: the script runs linearly, so placing a widget above a chart means the chart always reflects the filtered state.

Use Columns for Side-by-Side Layout

By default, Streamlit stacks elements vertically. To place charts side by side, use st.columns:

col1, col2 = st.columns(2)

with col1:
    st.subheader("Revenue Over Time")
    st.line_chart(chart_data.set_index("date"))

with col2:
    st.subheader("Revenue by Product")
    st.bar_chart(product_data.set_index("product"))

This creates a two-column grid. You can pass a list of relative widths to st.columns, such as st.columns([2, 1]), to give the left column twice the horizontal space.

Enable URL State Binding (Streamlit 1.55+)

Streamlit 1.55.0 introduced a bind parameter on widgets. It syncs the widget's current value to the URL query string, making dashboard states bookmarkable and shareable without exporting screenshots.

To enable it on the region selector:

selected_region = st.selectbox("Region", regions, bind="region")

When a user selects "South," the URL updates to ?region=South. Sharing that link loads the dashboard with the filter pre-applied. For teams that distribute filtered views via Slack or email, this removes the need to export static images every time a stakeholder asks for a specific cut of the data.

Deploy to Community Cloud

Streamlit Community Cloud provides free hosting for public apps connected to a GitHub repository.

  1. Push your project folder to a new GitHub repository. Include app.py, requirements.txt, and sales.csv.
  2. Go to share.streamlit.io and sign in with GitHub.
  3. Click "Create app," then "Yup, I have an app."
  4. Select your repository, branch (main), and file path (app.py).
  5. Choose a subdomain for your app URL, then click "Deploy."

Deployment typically completes in two to three minutes. After that, any commit pushed to the connected branch triggers an automatic redeployment. The app URL stays the same across redeployments.

One constraint to plan around: Community Cloud does not support persistent local file storage. If your app needs to write data or use a local database, connect a hosted database such as Supabase or PlanetScale instead of writing to the filesystem.

Performance at Scale

Streamlit reruns the entire script on every user interaction. For small datasets under a few hundred thousand rows, this is fast enough to feel instant. For larger datasets, use st.cache_data to cache expensive operations:

@st.cache_data
def load_data():
    return pd.read_csv("sales.csv", parse_dates=["date"])

df = load_data()

With caching enabled, the CSV loads once and the cached result is reused across reruns until the file changes. For aggregations on large datasets, DuckDB embedded inside a Streamlit app can run SQL on files up to several gigabytes without any server.

Summary

Install Streamlit with pip, write a Python script using st.dataframe, st.selectbox, and st.line_chart, and deploy free to Community Cloud from GitHub. Use st.columns for side-by-side layouts and @st.cache_data for any expensive data loading. Version 1.55.0's bind parameter turns any widget into a shareable URL parameter. For teams that need to go from a raw file to a filtered, interactive view without writing Python, VSLZ handles the entire analysis pipeline from a single prompt and file upload.

FAQ

Does Streamlit require frontend or JavaScript knowledge?

No. Streamlit is a pure Python framework. You write Python functions and Streamlit renders them as HTML, CSS, and JavaScript automatically. No knowledge of frontend development is required to build a working dashboard.

Can Streamlit connect to a SQL database?

Yes. Streamlit has a built-in st.connection API that supports SQLite, PostgreSQL, MySQL, Snowflake, and other databases. You define the connection in a secrets.toml file or Streamlit Community Cloud's secrets manager, then call st.connection('mydb', type='sql') in your script to run queries directly.

How much does Streamlit Community Cloud cost?

Streamlit Community Cloud is free for public apps with unlimited deployments. Private apps require a paid workspace plan. For most analytics and internal reporting use cases, the free tier is sufficient, provided the source GitHub repository is public.

What is the difference between Streamlit and Dash?

Both are Python dashboard frameworks, but they differ in architecture. Streamlit uses a top-to-bottom rerun model where the entire script re-executes on each interaction, which is simpler to write but less suited for complex stateful applications. Dash uses a callback system where functions respond to specific input changes, offering more fine-grained control but requiring more boilerplate. Streamlit is generally faster to build with for straightforward data visualizations.

How do I add user authentication to a Streamlit app?

Streamlit 1.39 introduced st.login and st.logout built-in commands that integrate with OAuth providers including Google, GitHub, Microsoft, and Auth0. You configure the provider credentials in secrets.toml and call st.login() at the top of your app. Users who are not authenticated see a login button instead of the dashboard. Prior to v1.39, authentication required third-party packages such as streamlit-authenticator.

Related

OpenMetadata data catalog interface showing database schema discovery
Guides

How to Set Up OpenMetadata for Data Discovery

OpenMetadata is an open-source data catalog that gives teams a single place to discover, document, and govern their data assets. Setting it up takes under 30 minutes using Docker: spin up the containers, log into the UI at localhost:8585, then connect your first data source using one of 90+ pre-built connectors. Once ingestion runs, every table, column, and owner is searchable and lineage-linked across your entire stack.

Arkzero Research · Apr 29, 2026
Streamlit logo on a clean white background
Guides

How to Build a Data Dashboard with Streamlit

Streamlit is an open-source Python library that turns a script into a shareable web dashboard without any front-end code. Install it with pip, write a Python file that loads your CSV with pandas, add sidebar widgets for filtering, and render interactive charts with Plotly. Push the file to GitHub, connect it to Streamlit Community Cloud, and anyone with the URL can view live results. No server configuration required.

Arkzero Research · Apr 29, 2026
Airbyte Cloud data integration platform
Guides

How to Set Up Airbyte Cloud for Data Syncing

Airbyte Cloud is a managed data integration platform that syncs data from SaaS tools, databases, and APIs into a central warehouse without requiring Docker, infrastructure, or engineering resources. A free 30-day trial lets you connect sources like Salesforce, HubSpot, Stripe, or Google Sheets to destinations like BigQuery, Snowflake, or Postgres in minutes. This guide walks through the full setup from account creation to your first automated sync.

Arkzero Research · Apr 29, 2026