Streamlit Dashboard Generator

Jilanee
 from google_sheet_integration import load_google_sheet_data

import streamlit as st

# Use st.cache_data for caching to avoid deprecation warning
import pandas as pd
import numpy as np
import pydeck as pdk
import plotly.express as px

def load_data(session_state):
    if 'df' not in session_state:
        session_state.df = pd.DataFrame(columns=['Date', 'Value'])
    return session_state.df

def add_data(session_state, date, value):
    new_data = {'Date': date, 'Value': value}
    session_state.df = pd.concat([session_state.df, pd.DataFrame([new_data])], ignore_index=True)

def main():
    st.title("Interactive Dashboard")
    st.markdown("### Dashboard dataset with date time series i.e 1st column contain date time + bonus to use interactive map add data_longitude and data_latitude columns in your csv files")

    session_state = st.session_state

About this template

Generate streamlit dashboards from chatbot-generated datasets and visualize them with corresponding graphs.

Introduction to the Streamlit Dashboard Generator Template

This template is designed to help you create interactive dashboards using Streamlit, a powerful tool for building data applications. The template includes features for manual data entry, loading datasets from Google Sheets, uploading CSV files, and visualizing data with different chart types and an interactive map. It's perfect for non-technical builders who want to visualize and interact with their data without delving into the complexities of coding.

Getting Started with the Template

To begin using this template, simply click on "Start with this Template" on the Lazy platform. This will pre-populate the code in the Lazy Builder interface, so you won't need to copy, paste, or delete any code.

Initial Setup

Before you can use the template, you'll need to ensure that you have the necessary Google Sheet URLs that the template will use to load data. These URLs should be direct links to CSV exports of your Google Sheets. If you need to obtain these URLs, follow these steps: 1. Open your Google Sheet. 2. Click on 'File' in the top menu. 3. Select 'Publish to the web'. 4. Choose the sheet you want to publish and select 'Comma-separated values (.csv)' as the format. 5. Click 'Publish', then copy the provided URL.

Test: Deploying the App

Once you have your Google Sheet URLs ready, click the "Test" button on the Lazy platform. This will begin the deployment of your app and launch the Lazy CLI. The Lazy platform handles all the deployment details, so you don't need to worry about installing libraries or setting up your environment.

Entering Input

If the template requires any user input, you will be prompted to provide it through the Lazy CLI after pressing the "Test" button. Follow the prompts to enter any necessary information.

Using the App

After deployment, you will be provided with a dedicated server link to access your interactive dashboard. The dashboard allows you to: - Manually enter data and visualize it with line, bar, or area charts. - Load datasets from Google Sheets and visualize them. - Upload CSV files and create separate charts for each file. - View an interactive map if your dataset includes 'data_longitude' and 'data_latitude' columns. Navigate through the dashboard's interface to explore and interact with your data. You can add new data points, select different chart types, and switch between datasets to see various visualizations.

Integrating the App

If you wish to integrate the dashboard into another service or frontend, you can use the server link provided by Lazy. For example, you might want to embed the dashboard into a website or share it with others. Simply use the link in the appropriate place, such as an iframe on a webpage or a link in an email. Remember, the Lazy platform has taken care of the deployment, so you can focus on using and sharing your interactive dashboard. If you encounter any issues or need further assistance, refer to the documentation provided in the code or reach out to Lazy's customer support for help.
Category
Technology
Last published
May 18, 2024

More templates like this

CSV Deduper

A webpage that dedupes a CSV based on the values in the first column and allows for downloading.

Python
Flask

Versatile Input Form

Develop a versatile input form for users.

Streamlit
Python

AI Specific Website Scraper

Provide a url and the information you need to extract . It will provide you the extracted information from that url

Selenium
Python
Home
/
Streamlit Dashboard Generator