Spaces:
Running
Running
Update pages/RoadMap.py
Browse files- pages/RoadMap.py +107 -0
pages/RoadMap.py
CHANGED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.textsize(topic, font=font)
|
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")
|