Data_Analysis / pages /Intro.py
Adiga02's picture
Updated template
44ac1cb verified
raw
history blame
4.14 kB
import streamlit as st
import matplotlib.pyplot as plt
image_path_1 = 'C:/Users/DELL E5490/Desktop/project/data/.env/DataAnalysis.jpg'
image_path_2 = 'C:/Users/DELL E5490/Desktop/project/data/.env/Data-Analytics-Life-Cycle.jpg'
st.image(image_path_1, caption=None, use_column_width=True, clamp=True, channels="RGB", output_format="auto")
st.title("Intuition of Data Analysis")
if 'show_data' not in st.session_state:
st.session_state.show_data = False
if 'show_analysis' not in st.session_state:
st.session_state.show_analysis = False
if 'show_python' not in st.session_state:
st.session_state.show_python = False
if 'show_life_cycle' not in st.session_state:
st.session_state.show_life_cycle = False
def toggle(section):
st.session_state.show_data = False
st.session_state.show_analysis = False
st.session_state.show_python = False
st.session_state.show_life_cycle = False
if section == 'data':
st.session_state.show_data = True
elif section == 'analysis':
st.session_state.show_analysis = True
elif section == 'python':
st.session_state.show_python = True
elif section == 'life_cycle':
st.session_state.show_life_cycle = True
if st.button('What is Data πŸ“Š?'):
toggle('data')
if st.session_state.show_data:
st.write("Data consists of facts and information that are used to generate insights and conclusions.")
if st.button('What is Data Analysis πŸ“ˆ?'):
toggle('analysis')
if st.session_state.show_analysis:
st.write("""Data analysis is a comprehensive process that involves collecting, cleaning, transforming, integrating, reducing, and validating data to uncover meaningful insights. Python is a versatile and powerful tool for data analysis due to its extensive libraries, automation capabilities, and strong community support. By following a structured roadmap for data analysis, including univariate, bivariate, and multivariate analyses, you can effectively explore and understand your data to make informed decisions.""")
if st.button('Why Use Python for Data Analysis πŸ€”?'):
toggle('python')
if st.session_state.show_python:
st.markdown("""
While tools like Excel and Power BI are commonly used for data visualization and analysis, Python is a powerful language for data analysis due to several reasons:
- *Versatility*: Python can handle a wide variety of data types and sources, making it suitable for diverse data analysis tasks.
- *Libraries*: Python has extensive libraries such as Pandas, NumPy, Matplotlib, and Scikit-learn that facilitate data manipulation, analysis, and visualization.
- *Automation*: Python allows for automation of repetitive tasks and complex computations, improving efficiency and productivity.
- *Community Support*: Python has a large and active community which means abundant resources, tutorials, and support.
""")
advantages = ['Versatility', 'Libraries', 'Automation', 'Community Support']
scores = [8, 9, 7, 9]
fig, ax = plt.subplots()
ax.barh(advantages, scores, color=['blue', 'green', 'orange', 'red'])
ax.set_xlabel('Importance')
ax.set_title('Advantages of Python for Data Analysis')
st.pyplot(fig)
if st.button('Data Analysis Life Cycle πŸ”„'):
toggle('life_cycle')
if st.session_state.show_life_cycle:
st.markdown("""
The data analysis life cycle includes the following steps:
- **Case Scenario**: Define the problem statement and the objectives of the analysis.
- **Collect the Data**: If no data is available, fetch the data from relevant sources.
- **Data Understanding**: Preprocess the data by understanding its shape, data types, and description.
- **Data Cleaning**: Clean the null values in the data using imputation methods to ensure accurate analysis.
- **Data Visualization**: Understand the underlying patterns of the data through univariate and bivariate analyses.
- **Outlier Detection**: Remove outliers that create biases in the results.
- **Data Transformation**: Apply transformations for better understanding and analysis of the data.
""")