Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
15 kB
5
Indexable
import matplotlib
matplotlib.use('TkAgg')  # Use the Tkinter backend

import matplotlib.pyplot as plt
import pandas as pd
import streamlit as st
import plotly.express as px


st.set_option('deprecation.showPyplotGlobalUse', False)

# Load your CSV data
df = pd.read_csv("Book1.csv")

# Set the page title and add some headers
#st.markdown('''<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHCBUREhgPERQSGBISGBkeEhIYHRIZGBIZGhoaGRgYHBgcIS4lHB4rHxgYJzgnKy8xNTY1GiQ7QDs0Py40NTEBDAwMEA8QHBISHzQsJCs0NDU0NDQxMTQ0NDo0NDQ0NDQ0NDE0NDExNDE0MTQ0MTQxNDQ0NDU0NDQ0NDQ0NDQ1NP/AABEIAJYBUQMBIgACEQEDEQH/xAAcAAEAAgMBAQEAAAAAAAAAAAAABAUBAwYCBwj/xABHEAACAQIBBgoHBAkDBAMAAAABAgADEQQFEhQhMdEGE0FRUlORkqHwIjJhcXKBsQczQsEVFhcjgrLC0vFzouE0VGK0JDU2/8QAGgEBAQADAQEAAAAAAAAAAAAAAAECAwQFBv/EACsRAAIBAwIGAQQCAwAAAAAAAAABAgMREgRRBRMUITFBYSKBobFxkTNC8P/aAAwDAQACEQMRAD8A+xRMWi0pDMTFotAMxMWi0AzExaLQDMTFotAMxMWi0AzExaLQDMTFotAMxMWi0AzExaLQDMTFotAMxMWi0AzExaLQDMTFotAMxMWi0AzExaLQDMTFotAMxMWi0AzIGVqqLSYVM8KwILIHJX23UapOtFoXZ3JJXTR8lqIC5Wlnst/RuvpH+EXnVcGeDzBhiK65ubrRDtv0mHJbkE68L7Jm07auunOGCVv2cFHh0YTzk77L0ZiYtFpxHoGYmLTMA/JOm1etq9+pvjTavW1e/U3yPE2kuSNNq9bV777402r1tXvvvkeIISNNq9bV7775jTqvW1e+++R4gpI06r1tXvvvjTqvW1e+++bcJkyrV1ohzT+JvRU+6+35S0o8GT+O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iIkB/9k="> width="400" height="400"''', unsafe_allow_html=True)
#st.markdown('''<img src="https://celebaltech.com/assets/img/celebal.webp" width="400" height="120">''', unsafe_allow_html=True)

#st.markdown('''<img style="float: right;" src="https://celebaltech.com/assets/img/celebal.webp" width="400" height="120">''', unsafe_allow_html=True)
st.markdown('''<img style="position: absolute; left:150px;" src="https://celebaltech.com/assets/img/celebal.webp" width="400" height="120">''', unsafe_allow_html=True)
st.markdown("<br>",unsafe_allow_html=True)
#st.title(" Celebal Technologies 🗃️")
st.markdown("<br>",unsafe_allow_html=True)
st.markdown("<br>",unsafe_allow_html=True)
st.markdown("<br>",unsafe_allow_html=True)

#st.markdown("---")
st.header("Unlock the Power of Data with CeleDA 🗃️")

# Create a sidebar for user inputs
st.sidebar.title("Settings")
####-------------------------------------------------------------------###############################
input_variable=st.text_area(label="",placeholder="What do u want from your data")


######################-----------------------------------------------------------------------------##########
#HERE WE HAVE TO PLACE FOR THE BACKGROUND
import streamlit as st
page_bg_img ='''
<style>
[data-testid="stAppViewContainer"] {
background-image: url("https://th.bing.com/th/id/OIG.FbdRDZLKWAGh3MD1us8C?w=270&h=270&c=6&r=0&o=5&dpr=1.3&pid=ImgGn");
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
[data-testid="stHeader"]{
background: lightblue;
}
</style>
'''
#st.markdown(page_bg_img, unsafe_allow_html=True)



#########3------------------------------------------------------------------------------------------------------
# Code for removing the made with streamlit and deploy on the U.I

st.markdown("""

<style>

.css-h5rgaw.ea3mdgi1

{

    visibility:hidden;

}

.css-1wbqy5l.e17vllj40

{

    visibility:hidden;

}

.css-fblp2m.ex0cdmw0                       

{

    visibility:hidden;

}            

.css-18ni7ap.ezrtsby2            

{

    visibility:hidden;

} 
            
</style>

""", unsafe_allow_html=True)    

#########----------------------------------------------------------------------------#####################
st.markdown(
    """
    <style>
    body {
        background-color: #f0f0f0; /* Background color */
        font-family: Arial, sans-serif; /* Font family */
    }
    .sidebar .sidebar-content {
        background-color: #333333; /* Sidebar background color */
        color: white; /* Sidebar text color */
    }
    .css-2trqyj {
        color: #333333 !important; /* Widget text color */
    }
    .table {
        background-color: white; /* Table background color */
    }
    .table th {
        background-color: #333333; /* Table header background color */
        color: white; /* Table header text color */
    }
    .table tbody tr:hover {
        background-color: #f2f2f2; /* Table row hover color */
    }
    </style>
    """,
    unsafe_allow_html=True,
)

# 14-09-23 Changes
normal_ui = st.button("Analytic UI")
graphical_ui = st.button("Graphical UI")

# Add general information and style the sidebar
st.sidebar.markdown(
    f"""
    ## General Information
    Welcome to Celebal Data Analyzer. your one-stop solution for analyzing and visualizing data.
    Our app allows you to explore your data with ease. You can choose from various visualization options to gain valuable insights.
    """
)

# 14-09-23 moved the below lines to graphical UI Hit condition
if graphical_ui:
    # Add usage instructions in the sidebar
    st.sidebar.markdown("---")
    st.sidebar.markdown("### Usage Instructions")
    st.sidebar.markdown(
        f"""
        1. Use the checkboxes below to customize your analysis.
        2. Your graphs will be displayed in the main area.
        """
    )

    # Add checkboxes for customization in the sidebar
    show_bar = st.sidebar.checkbox("Show Bar Chart")
    show_line = st.sidebar.checkbox("Show Line Chart")
    show_scatter = st.sidebar.checkbox("Show Scatter Plot")

# Add contact information in the sidebar
st.sidebar.markdown("---")
st.sidebar.markdown("### Contact Us")
st.sidebar.markdown(
    """
    If you have any questions or need assistance, please contact us at:
    [contact@celebal.com](mailto:contact@celebal.com)
    """
)

# Display the DataFrame with custom styling
#st.subheader("📋 Table of Data")
# Convert the DataFrame to HTML and remove the index column
table_html = df.to_html(index=False, escape=False, classes=["table", "table-bordered", "table-hover"])
# Display the HTML table
st.write(table_html, unsafe_allow_html=True)








check = st.checkbox("click to see the query", value=False)

# 14-09-23 moved the below if conditions to graphical UI hit button condition
if graphical_ui:
    # Create Matplotlib plots based on user input
    if show_bar:
        st.subheader("📊 Data Visualization")
        try:
            column_names = df.columns
            x = df[column_names[0]]
            y = df[column_names[1]]
            fig=px.bar(df,x=x,y=y,color=column_names[0])
            st.plotly_chart(fig)
        except:
            st.write("An error occurred while creating the bar chart.")

    if show_line:
        st.subheader("📊 Data Visualization")
        try:
            column_names = df.columns
            x = df[column_names[0]]
            y = df[column_names[1]]
            fig=px.line(df,x=x,y=y,color=column_names[0])
            st.plotly_chart(fig)
        except:
            st.write("An error occurred while creating the line chart.")

    if show_scatter:
        st.subheader("📊 Data Visualization")
        try:
            column_names = df.columns
            x = df[column_names[0]]
            y = df[column_names[1]]
            fig=px.scatter(df,x=x,y=y,color=column_names[0])
            st.plotly_chart(fig)
        except:
            st.write("An error occurred while creating the scatter plot.")

# Add "About Us" at the end of the sidebar
st.sidebar.markdown("---")
st.sidebar.markdown("### About Us")
st.sidebar.markdown(
    """
    Learn more about [Celebal Technologies](https://www.celebaltech.com/).
    """
)