CoolFace
Apppublic

corvo7/Data_Analysis

sourceHugging Faceupdated 2y agoView on Hugging Face
1likes
RoadMap.py247 linesDownload Raw Back to pages
1import streamlit as st2 3# Custom CSS to style the page with 3D features4st.markdown("""5    <style>6    .main {7        background-color: #ffffff;8    }9    .center-image {10        display: block;11        margin-left: auto;12        margin-right: auto;13        width: 60%;14        box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.3);15        border-radius: 15px;16        margin-top: 20px;17    }18    .content {19        color: #333333;20        padding: 20px;21        font-size: 18px;22        box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);23        border-radius: 15px;24        background: #f8f9fa;25        margin-left: 20px;26        margin-top: 20px;27    }28    .button {29        font-size: 20px;30        margin-bottom: 20px;31        padding: 15px;32        box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);33        border-radius: 10px;34        background: #007bff;35        color: white;36        transition: transform 0.2s, background 0.2s;37        border: none;38        width: 100%;39        text-align: left;40    }41    .button:hover {42        box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.3);43        transform: scale(1.05);44        cursor: pointer;45        background: #0056b3;46    }47    .button:focus {48        outline: none;49        box-shadow: 6px 6px 15px rgba(0, 0, 0, 0.3);50        transform: scale(1.05);51        background: linear-gradient(to bottom, #003580, #002060);52    }53    </style>54    """, unsafe_allow_html=True)55 56# Page title57st.title("Data Analysis With Python Roadmap")58 59# Center image at the top60st.image("images/roadmap.jpg", use_column_width='always')61 62# Two-column layout63col1, col2 = st.columns([1, 2])64 65# Left column with the buttons66with col1:67    st.header("Topics")68    69    selection = None70    if st.button("Basic Python", key="basic_python"):71        selection = "Basic Python"72    if st.button("Intermediate Python", key="intermediate_python"):73        selection = "Intermediate Python"74    if st.button("Descriptive Statistics", key="descriptive_statistics"):75        selection = "Descriptive Statistics"76    if st.button("NumPy", key="numpy"):77        selection = "NumPy"78    if st.button("Pandas", key="pandas"):79        selection = "Pandas"80    if st.button("Matplotlib", key="matplotlib"):81        selection = "Matplotlib"82    if st.button("Seaborn", key="seaborn"):83        selection = "Seaborn"84    if st.button("Inferential Statistics", key="inferential_statistics"):85        selection = "Inferential Statistics"86 87# Right column with the topic description88with col2:89    if selection:90        if selection == "Basic Python":91            st.image("images/python_logo.png", width=50)92            st.markdown("""93            <div class='content'>94            <b>Basic Python:</b>95            <p>Basic Python covers the fundamental aspects of the Python programming language.</p>96            97            <b>Subtopics:</b>98            <ul>99            <li>Syntax: Understanding the basic syntax and structure of Python code.</li>100            <li>Data Types: Working with strings, lists, dictionaries, and tuples.</li>101            <li>Control Flow: Using loops, conditionals, and functions.</li>102            <li>File Handling: Reading from and writing to files.</li>103            </ul>104 105            <b>Example:</b>106            <p>Writing simple programs to automate repetitive tasks, such as renaming files in bulk.</p>107            </div>108            """, unsafe_allow_html=True)109            110        elif selection == "Intermediate Python":111            st.image("images/python_logo.png", width=50)112            st.markdown("""113            <div class='content'>114            <b>Intermediate Python:</b>115            <p>Intermediate Python includes more advanced features of Python programming.</p>116 117            <b>Subtopics:</b>118            <ul>119            <li>Modules and Packages: Importing and organizing code into modules.</li>120            <li>List Comprehensions: Creating lists in a more readable way.</li>121            <li>Error Handling: Using try, except blocks to handle errors.</li>122            <li>Classes and Objects: Understanding object-oriented programming concepts.</li>123            </ul>124 125            <b>Example:</b>126            <p>Building reusable code modules and handling exceptions in data processing scripts.</p>127            </div>128            """, unsafe_allow_html=True)129    130        elif selection == "Descriptive Statistics":131            st.image("images/statistics_logo.png", width=50)132            st.markdown("""133            <div class='content'>134            <b>Descriptive Statistics:</b>135            <p>Descriptive statistics summarize and describe the main features of a dataset.</p>136 137            <b>Subtopics:</b>138            <ul>139            <li>Central Tendency: Mean, median, mode.</li>140            <li>Dispersion: Variance, standard deviation, range.</li>141            <li>Distribution: Quartiles, percentiles, histograms.</li>142            </ul>143 144            <b>Example:</b>145            <p>Summarizing sales data to understand the average sales per month and the variability in sales.</p>146            </div>147            """, unsafe_allow_html=True)148            149        elif selection == "NumPy":150            st.image("images/numpy_logo.png", width=50)151            st.markdown("""152            <div class='content'>153            <b>NumPy:</b>154            <p>NumPy is a fundamental package for numerical computing in Python.</p>155 156            <b>Subtopics:</b>157            <ul>158            <li>Arrays: Creating and manipulating arrays.</li>159            <li>Mathematical Operations: Performing element-wise and matrix operations.</li>160            <li>Statistical Functions: Using built-in functions for analysis.</li>161            <li>Data Transformation: Reshaping and slicing arrays.</li>162            </ul>163 164            <b>Example:</b>165            <p>Performing fast and efficient calculations on large datasets, such as computing the sum of all elements in an array.</p>166            </div>167            """, unsafe_allow_html=True)168            169        elif selection == "Pandas":170            st.image("images/pandas_logo.png", width=100)171            st.markdown("""172            <div class='content'>173            <b>Pandas:</b>174            <p>Pandas is a powerful library for data manipulation and analysis in Python.</p>175 176            <b>Subtopics:</b>177            <ul>178            <li>DataFrames: Creating and manipulating DataFrames.</li>179            <li>Data Cleaning: Handling missing values and duplicates.</li>180            <li>Data Transformation: Merging, joining, and concatenating DataFrames.</li>181            <li>Data Analysis: Grouping and aggregating data.</li>182            </ul>183 184            <b>Example:</b>185            <p>Cleaning and analyzing sales data from different regions to find total sales per product category.</p>186            </div>187            """, unsafe_allow_html=True)188            189        elif selection == "Matplotlib":190            st.image("images/matplotlib_logo.png", width=100)191            st.markdown("""192            <div class='content'>193            <b>Matplotlib:</b>194            <p>Matplotlib is a plotting library for creating static, interactive, and animated visualizations in Python.</p>195 196            <b>Subtopics:</b>197            <ul>198            <li>Basic Plots: Creating line, bar, and scatter plots.</li>199            <li>Customization: Customizing plots with titles, labels, and legends.</li>200            <li>Subplots: Creating multiple plots in a single figure.</li>201            </ul>202 203            <b>Example:</b>204            <p>Visualizing sales trends over time with a line chart and customizing it to include titles and labels.</p>205            </div>206            """, unsafe_allow_html=True)207            208        elif selection == "Seaborn":209            st.image("images/seaborn_logo.png", width=100)210            st.markdown("""211            <div class='content'>212            <b>Seaborn:</b>213            <p>Seaborn is a data visualization library based on Matplotlib that provides a high-level interface for drawing attractive statistical graphics.</p>214 215            <b>Subtopics:</b>216            <ul>217            <li>Statistical Plots: Creating plots like histograms, box plots, and violin plots.</li>218            <li>Customization: Advanced customization of plots.</li>219            <li>Integration: Seamless integration with pandas DataFrames.</li>220            </ul>221 222            <b>Example:</b>223            <p>Creating a box plot to visualize the distribution of exam scores across different classes.</p>224            </div>225            """, unsafe_allow_html=True)226            227        elif selection == "Inferential Statistics":228            st.image("images/statistics_logo.png", width=50)229            st.markdown("""230            <div class='content'>231            <b>Inferential Statistics:</b>232            <p>Inferential statistics allow us to make predictions or inferences about a population based on a sample of data.</p>233 234            <b>Subtopics:</b>235            <ul>236            <li>Hypothesis Testing: Determining the validity of assumptions.</li>237            <li>Confidence Intervals: Estimating population parameters.</li>238            <li>Regression Analysis: Modeling relationships between variables.</li>239            <li>ANOVA and Chi-Square Tests: Comparing group means and categorical variables.</li>240            </ul>241 242            <b>Example:</b>243            <p>Using regression analysis to predict future sales based on past data trends and conducting hypothesis tests to determine if a new marketing strategy significantly impacts sales.</p>244            </div>245            """, unsafe_allow_html=True)246            247