Files changed (1) hide show
  1. pages/RoadMap.py +139 -106
pages/RoadMap.py CHANGED
@@ -1,107 +1,140 @@
1
  import streamlit as st
2
- from PIL import Image, ImageDraw, ImageFont
3
-
4
- # Set page configuration
5
- st.set_page_config(page_title="Data Analysis Roadmap", layout="centered")
6
-
7
- # Title and description
8
- st.title("Roadmap for Data Analysis with Python")
9
- st.write("""
10
- This roadmap guides you through the essential steps and tools for mastering data analysis with Python.
11
- Each step builds upon the previous one to develop your skills progressively.
12
- """)
13
-
14
- # Define the sequence of topics
15
- topics = [
16
- "Statistics",
17
- "Numpy",
18
- "Pandas",
19
- "Matplotlib",
20
- "Seaborn",
21
- "Plotly",
22
- "Graph Visualization"
23
- ]
24
-
25
- # Create a roadmap visualization
26
- def create_roadmap_image(topics):
27
- # Image dimensions
28
- width, height = 800, 600
29
- # Box dimensions
30
- box_width, box_height = 200, 80
31
- # Gap between boxes
32
- gap = 20
33
-
34
- # Create a blank image with white background
35
- img = Image.new("RGB", (width, height), "white")
36
- draw = ImageDraw.Draw(img)
37
-
38
- # Load a font
39
- try:
40
- font = ImageFont.truetype("arial.ttf", 16)
41
- except IOError:
42
- font = ImageFont.load_default()
43
-
44
- # Calculate starting positions
45
- start_x = (width - box_width) // 2
46
- start_y = 50
47
-
48
- # Draw boxes with topics
49
- for i, topic in enumerate(topics):
50
- box_x = start_x
51
- box_y = start_y + i * (box_height + gap)
52
- draw.rectangle(
53
- [box_x, box_y, box_x + box_width, box_y + box_height],
54
- outline="black", width=2
55
- )
56
- text_width, text_height = draw.textbbox((0, 0), topic, font=font)[2:]
57
- text_x = box_x + (box_width - text_width) // 2
58
- text_y = box_y + (box_height - text_height) // 2
59
- draw.text((text_x, text_y), topic, fill="black", font=font)
60
-
61
- return img
62
-
63
- # Create and display the roadmap image
64
- roadmap_image = create_roadmap_image(topics)
65
- st.image(roadmap_image, caption="Roadmap for Data Analysis with Python", use_column_width=True)
66
-
67
- # Provide detailed content for each topic
68
- st.header("Detailed Roadmap")
69
-
70
- st.subheader("1. Statistics")
71
- st.write("""
72
- Statistics is the foundation of data analysis. Learn descriptive statistics, probability, distributions, hypothesis testing, and regression analysis.
73
- """)
74
-
75
- st.subheader("2. Numpy")
76
- st.write("""
77
- NumPy is the fundamental package for numerical computation in Python. It provides support for arrays, matrices, and many mathematical functions.
78
- """)
79
-
80
- st.subheader("3. Pandas")
81
- st.write("""
82
- Pandas is a powerful library for data manipulation and analysis. It provides data structures like DataFrames, which allow you to handle and analyze structured data efficiently.
83
- """)
84
-
85
- st.subheader("4. Matplotlib")
86
- st.write("""
87
- Matplotlib is a plotting library that provides tools to create static, animated, and interactive visualizations in Python.
88
- """)
89
-
90
- st.subheader("5. Seaborn")
91
- st.write("""
92
- Seaborn is built on top of Matplotlib and provides a high-level interface for drawing attractive and informative statistical graphics.
93
- """)
94
-
95
- st.subheader("6. Plotly")
96
- st.write("""
97
- Plotly is a graphing library that makes interactive, publication-quality graphs online. It supports many types of charts and visualizations.
98
- """)
99
-
100
- st.subheader("7. Graph Visualization")
101
- st.write("""
102
- Graph visualization involves the representation of data as nodes and edges. Libraries like NetworkX and Graphviz help in visualizing complex networks and relationships.
103
- """)
104
-
105
- # Footer
106
- st.write("---")
107
- st.write("Created by [Your Name] - A Roadmap to Becoming a Data Analysis Expert with Python")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
+
3
+ # Custom CSS to change the background color and add 3D arrows
4
+ st.markdown("""
5
+ <style>
6
+ .main {
7
+ background-color: #f0f2f6;
8
+ }
9
+ .separator {
10
+ border-top: 3px solid #bbb;
11
+ margin-top: 20px;
12
+ margin-bottom: 20px;
13
+ }
14
+ .content {
15
+ color: #333333;
16
+ }
17
+ .arrow {
18
+ font-size: 24px;
19
+ text-align: center;
20
+ margin-top: -10px;
21
+ margin-bottom: -10px;
22
+ }
23
+ .center-image {
24
+ display: block;
25
+ margin-left: auto;
26
+ margin-right: auto;
27
+ width: 50%;
28
+ }
29
+ </style>
30
+ """, unsafe_allow_html=True)
31
+
32
+ # Initialize session state
33
+ if 'open_expander' not in st.session_state:
34
+ st.session_state.open_expander = None
35
+
36
+ # Page title
37
+ st.title("Data Analysis Roadmap")
38
+
39
+ # Centered Image
40
+ st.image("images/data_analysis.png", use_column_width='always', output_format='PNG')
41
+
42
+ # Introduction
43
+ st.header("Introduction")
44
+ st.markdown("<div class='content'>This roadmap is designed for individuals with a basic understanding of Data Analysis. "
45
+ "It outlines the key topics and tools essential for advancing your skills in data analysis.</div>", unsafe_allow_html=True)
46
+
47
+ # Helper function to add images with 3D arrows
48
+ def add_skill_section(title, image_path, description, key):
49
+ if st.session_state.open_expander == key:
50
+ with st.expander(title, expanded=True):
51
+ st.image(image_path, width=100)
52
+ st.markdown(f"<div class='content'>{description}</div>", unsafe_allow_html=True)
53
+ st.session_state.open_expander = key
54
+ else:
55
+ with st.expander(title):
56
+ if st.button("Expand", key=key):
57
+ st.session_state.open_expander = key
58
+ st.experimental_rerun()
59
+
60
+ #st.markdown('<div class="arrow">⬇️</div>', unsafe_allow_html=True)
61
+
62
+ # Excel Section
63
+ add_skill_section("Excel", "images/excel_logo.png", """
64
+ Excel is a powerful tool for data manipulation and visualization. It's widely used due to its accessibility and robust features.
65
+
66
+ **Skills:**
67
+ - **Data Cleaning**: Removing errors and inconsistencies to ensure data quality.
68
+ - *Example*: Cleaning a sales dataset to remove duplicates.
69
+ - **Data Visualization**: Creating charts and graphs to represent data visually.
70
+ - *Example*: Visualizing sales trends over time with line charts.
71
+ - **Pivot Tables**: Summarizing data for easy analysis.
72
+ - *Example*: Summarizing sales by region and product.
73
+ - **Formulas and Functions**: Automating calculations and data manipulation.
74
+ - *Example*: Using VLOOKUP to combine data from multiple sheets.
75
+ - **Data Analysis Toolpak**: Advanced statistical analysis.
76
+ - *Example*: Running regression analysis on marketing data.
77
+ """, key="excel")
78
+
79
+ # SQL Section
80
+ add_skill_section("SQL", "images/sql_logo.png", """
81
+ SQL is essential for querying and managing databases. It's used to extract, manipulate, and analyze data stored in relational databases.
82
+
83
+ **Skills:**
84
+ - **Basic Queries (SELECT, INSERT, UPDATE, DELETE)**: Retrieving and modifying data.
85
+ - *Example*: Fetching customer information from a database.
86
+ - **Joins (INNER, LEFT, RIGHT, FULL)**: Combining data from multiple tables.
87
+ - *Example*: Joining customer and order tables to get complete order details.
88
+ - **Aggregations (GROUP BY, HAVING)**: Summarizing data.
89
+ - *Example*: Calculating total sales per region.
90
+ - **Subqueries and CTEs**: Writing complex queries.
91
+ - *Example*: Finding customers with orders above a certain amount.
92
+ - **Indexing and Optimization**: Improving query performance.
93
+ - *Example*: Adding an index to speed up search queries.
94
+ """, key="sql")
95
+
96
+ # Python Section
97
+ add_skill_section("Data Analysis Python", "images/python_logo.png", """
98
+ Python is a versatile language used for data analysis, offering powerful libraries for various data-related tasks.
99
+
100
+ **Skills:**
101
+ - **Libraries: pandas, numpy, matplotlib, seaborn**: Essential libraries for data manipulation and visualization.
102
+ - *Example*: Using pandas for data cleaning, matplotlib for plotting sales trends.
103
+ - **Data Cleaning and Preparation**: Preparing data for analysis.
104
+ - *Example*: Handling missing values in a dataset.
105
+ - **Data Visualization**: Creating detailed and interactive plots.
106
+ - *Example*: Creating scatter plots to visualize relationships between variables.
107
+ - **Statistical Analysis**: Performing statistical tests and analyses.
108
+ - *Example*: Running a t-test to compare means of two groups.
109
+ - **Automating Data Workflows**: Automating repetitive tasks.
110
+ - *Example*: Writing a script to fetch and process data daily.
111
+ """, key="python")
112
+
113
+ # Data Visualization Tools Section
114
+
115
+ add_skill_section("Power BI", "images/powerbi_logo.png", """
116
+ Power BI is a business analytics tool that provides interactive visualizations and business intelligence capabilities.
117
+
118
+ **Skills:**
119
+ - **Report Creation**: Designing detailed reports.
120
+ - *Example*: Creating financial reports for stakeholders.
121
+ - **DAX Functions**: Using Data Analysis Expressions for complex calculations.
122
+ - *Example*: Calculating year-over-year growth.
123
+ - **Data Modeling**: Structuring data for efficient analysis.
124
+ - *Example*: Creating a data model to analyze customer behavior.
125
+ """, key="powerbi")
126
+
127
+ # Statistics Section
128
+ add_skill_section("Statistics", "images/statistics_logo.png", """
129
+ Statistics form the backbone of data analysis, enabling data-driven decision-making.
130
+
131
+ **Skills:**
132
+ - **Descriptive Statistics (Mean, Median, Mode)**: Summarizing data.
133
+ - *Example*: Calculating average customer age.
134
+ - **Inferential Statistics (Hypothesis Testing, Confidence Intervals)**: Making predictions and generalizations.
135
+ - *Example*: Testing if a new marketing strategy increases sales.
136
+ - **Regression Analysis**: Understanding relationships between variables.
137
+ - *Example*: Analyzing the impact of price changes on sales volume.
138
+ - **Probability Theory**: Assessing risk and uncertainty.
139
+ - *Example*: Calculating the likelihood of customer churn.
140
+ """, key="statistics")