Adiga02 commited on
Commit
44ac1cb
Β·
verified Β·
1 Parent(s): d1e2c43

Updated template

Browse files
Files changed (1) hide show
  1. pages/Intro.py +91 -0
pages/Intro.py CHANGED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import matplotlib.pyplot as plt
3
+
4
+ image_path_1 = 'C:/Users/DELL E5490/Desktop/project/data/.env/DataAnalysis.jpg'
5
+ image_path_2 = 'C:/Users/DELL E5490/Desktop/project/data/.env/Data-Analytics-Life-Cycle.jpg'
6
+
7
+
8
+ st.image(image_path_1, caption=None, use_column_width=True, clamp=True, channels="RGB", output_format="auto")
9
+
10
+
11
+ st.title("Intuition of Data Analysis")
12
+
13
+ if 'show_data' not in st.session_state:
14
+ st.session_state.show_data = False
15
+ if 'show_analysis' not in st.session_state:
16
+ st.session_state.show_analysis = False
17
+ if 'show_python' not in st.session_state:
18
+ st.session_state.show_python = False
19
+ if 'show_life_cycle' not in st.session_state:
20
+ st.session_state.show_life_cycle = False
21
+
22
+
23
+ def toggle(section):
24
+ st.session_state.show_data = False
25
+ st.session_state.show_analysis = False
26
+ st.session_state.show_python = False
27
+ st.session_state.show_life_cycle = False
28
+
29
+ if section == 'data':
30
+ st.session_state.show_data = True
31
+ elif section == 'analysis':
32
+ st.session_state.show_analysis = True
33
+ elif section == 'python':
34
+ st.session_state.show_python = True
35
+ elif section == 'life_cycle':
36
+ st.session_state.show_life_cycle = True
37
+
38
+
39
+ if st.button('What is Data πŸ“Š?'):
40
+ toggle('data')
41
+
42
+ if st.session_state.show_data:
43
+ st.write("Data consists of facts and information that are used to generate insights and conclusions.")
44
+
45
+
46
+ if st.button('What is Data Analysis πŸ“ˆ?'):
47
+ toggle('analysis')
48
+
49
+ if st.session_state.show_analysis:
50
+ 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.""")
51
+
52
+
53
+ if st.button('Why Use Python for Data Analysis πŸ€”?'):
54
+ toggle('python')
55
+
56
+ if st.session_state.show_python:
57
+ st.markdown("""
58
+ 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:
59
+
60
+ - *Versatility*: Python can handle a wide variety of data types and sources, making it suitable for diverse data analysis tasks.
61
+ - *Libraries*: Python has extensive libraries such as Pandas, NumPy, Matplotlib, and Scikit-learn that facilitate data manipulation, analysis, and visualization.
62
+ - *Automation*: Python allows for automation of repetitive tasks and complex computations, improving efficiency and productivity.
63
+ - *Community Support*: Python has a large and active community which means abundant resources, tutorials, and support.
64
+ """)
65
+
66
+ advantages = ['Versatility', 'Libraries', 'Automation', 'Community Support']
67
+ scores = [8, 9, 7, 9]
68
+
69
+ fig, ax = plt.subplots()
70
+ ax.barh(advantages, scores, color=['blue', 'green', 'orange', 'red'])
71
+ ax.set_xlabel('Importance')
72
+ ax.set_title('Advantages of Python for Data Analysis')
73
+
74
+ st.pyplot(fig)
75
+
76
+
77
+ if st.button('Data Analysis Life Cycle πŸ”„'):
78
+ toggle('life_cycle')
79
+
80
+ if st.session_state.show_life_cycle:
81
+ st.markdown("""
82
+ The data analysis life cycle includes the following steps:
83
+
84
+ - **Case Scenario**: Define the problem statement and the objectives of the analysis.
85
+ - **Collect the Data**: If no data is available, fetch the data from relevant sources.
86
+ - **Data Understanding**: Preprocess the data by understanding its shape, data types, and description.
87
+ - **Data Cleaning**: Clean the null values in the data using imputation methods to ensure accurate analysis.
88
+ - **Data Visualization**: Understand the underlying patterns of the data through univariate and bivariate analyses.
89
+ - **Outlier Detection**: Remove outliers that create biases in the results.
90
+ - **Data Transformation**: Apply transformations for better understanding and analysis of the data.
91
+ """)