Close Menu
    Trending
    • How Smart Entrepreneurs Turn Mid-Year Tax Reviews Into Long-Term Financial Wins
    • Become a Better Data Scientist with These Prompt Engineering Tips and Tricks
    • Meanwhile in Europe: How We Learned to Stop Worrying and Love the AI Angst | by Andreas Maier | Jul, 2025
    • Transform Complexity into Opportunity with Digital Engineering
    • OpenAI Is Fighting Back Against Meta Poaching AI Talent
    • Lessons Learned After 6.5 Years Of Machine Learning
    • Handling Big Git Repos in AI Development | by Rajarshi Karmakar | Jul, 2025
    • National Lab’s Machine Learning Project to Advance Seismic Monitoring Across Energy Industries
    AIBS News
    • Home
    • Artificial Intelligence
    • Machine Learning
    • AI Technology
    • Data Science
    • More
      • Technology
      • Business
    AIBS News
    Home»Machine Learning»Streamlit Made Simple: Building Interactive Dashboards for Data Science | by Harshit Kandoi | Feb, 2025
    Machine Learning

    Streamlit Made Simple: Building Interactive Dashboards for Data Science | by Harshit Kandoi | Feb, 2025

    Team_AIBS NewsBy Team_AIBS NewsFebruary 1, 2025No Comments2 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    When you`ve put in your first Streamlit app, the following step is to function interactivity and visual elements to transform it proper right into a purposeful dashboard. On this part, we`ll create a option to comprise interactive widgets, present knowledge, and create engaging visualizations.

    Picture by UX Indonesia on Unsplash

    Including Interactivity

    Interactivity is what makes Streamlit stand out. With just a few traces of code, it’s possible you’ll add sliders, dropdown menus, buttons, and totally different widgets to make your app dynamic and user-friendly.

    Right here’s how you need to use some fashionable Streamlit widgets:

    1. Sliders
      Sliders are nice for numeric inputs or deciding on ranges. For instance:
    import streamlit as st

    st.title("Interactive Dashboard")
    worth = st.slider("Choose a worth", 0, 100, 50)
    st.write(f"You chose: {worth}")

    2. Dropdowns
    Dropdown menus let customers select from predefined choices:

    possibility = st.selectbox("Select a Possibility", ["A", "B", "C"])
    st.write(f"You chose: {possibility}")

    3. Buttons
    Buttons are perfect for triggering actions:

    if st.button("Click on Me"):
    st.write("Button clicked!")

    These widgets are usually not solely straightforward to implement but in addition present the constructing blocks for creating dynamic dashboards.

    Displaying Knowledge

    Streamlit makes it easy to show knowledge in a visually interesting means. Listed below are some frequent strategies:

    1. Displaying Tables with Pandas DataFrames
      Streamlit integrates seamlessly with Pandas to indicate tabular knowledge:
    import pandas as pd
    knowledge = pd.DataFrame({
    "Column A": [1, 2, 3],
    "Column B": [4, 5, 6]
    })
    st.write("Here is a DataFrame:")
    st.dataframe(knowledge)

    2. Highlighting Key Knowledge
    You’ll be able to model your knowledge to make insights stand out:
    st.desk(knowledge.model.highlight_max(axis=0))

    3. Creating Charts and Graphs
    Visualizations carry knowledge to life, and Streamlit helps many fashionable libraries:

    import matplotlib.pyplot as plt

    fig, ax = plt.subplots()
    ax.plot([1, 2, 3], [4, 5, 6])
    st.pyplot(fig)

    import plotly.categorical as px

    df = pd.DataFrame({
    "x": [1, 2, 3],
    "y": [4, 5, 6]
    })
    fig = px.line(df, x="x", y="y")
    st.plotly_chart(fig)

    Streamlit`s potential to combine interactive widgets with data and visualizations makes it a helpful gadget for growing engaging dashboards. Within the subsequent part, we`ll uncover a option to beautify these dashboards with customized layouts and superior options.



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleCan smelling a game make it more immersive?
    Next Article How I Built My First AI-Powered Web App in 20 Minutes | by Claudia Ng | Feb, 2025
    Team_AIBS News
    • Website

    Related Posts

    Machine Learning

    Meanwhile in Europe: How We Learned to Stop Worrying and Love the AI Angst | by Andreas Maier | Jul, 2025

    July 1, 2025
    Machine Learning

    Handling Big Git Repos in AI Development | by Rajarshi Karmakar | Jul, 2025

    July 1, 2025
    Machine Learning

    A Technical Overview of the Attention Mechanism in Deep Learning | by Silva.f.francis | Jun, 2025

    June 30, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    How Smart Entrepreneurs Turn Mid-Year Tax Reviews Into Long-Term Financial Wins

    July 1, 2025

    I Tried Buying a Car Through Amazon: Here Are the Pros, Cons

    December 10, 2024

    Amazon and eBay to pay ‘fair share’ for e-waste recycling

    December 10, 2024

    Artificial Intelligence Concerns & Predictions For 2025

    December 10, 2024

    Barbara Corcoran: Entrepreneurs Must ‘Embrace Change’

    December 10, 2024
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    Most Popular

    Google’s Largest Acquisition Is Cloud Security Platform Wiz

    March 20, 2025

    Fine-tuning Multimodal Embedding Models | by Shaw Talebi

    February 1, 2025

    Behind the Scenes of a Successful Data Analytics Project | by Ilona Hetsevich | Jan, 2025

    January 23, 2025
    Our Picks

    How Smart Entrepreneurs Turn Mid-Year Tax Reviews Into Long-Term Financial Wins

    July 1, 2025

    Become a Better Data Scientist with These Prompt Engineering Tips and Tricks

    July 1, 2025

    Meanwhile in Europe: How We Learned to Stop Worrying and Love the AI Angst | by Andreas Maier | Jul, 2025

    July 1, 2025
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2024 Aibsnews.comAll Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.