Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,40 +2,73 @@ import streamlit as st
|
|
| 2 |
import altair as alt
|
| 3 |
import pandas as pd
|
| 4 |
|
| 5 |
-
# Custom CSS for text styling
|
| 6 |
st.markdown("""
|
| 7 |
<style>
|
|
|
|
| 8 |
body {
|
| 9 |
-
background-color: #eef2f7;
|
| 10 |
}
|
|
|
|
| 11 |
h1 {
|
| 12 |
-
color: #
|
| 13 |
font-family: 'Roboto', sans-serif;
|
| 14 |
font-weight: 700;
|
| 15 |
text-align: center;
|
| 16 |
margin-bottom: 25px;
|
| 17 |
}
|
| 18 |
-
|
| 19 |
-
|
|
|
|
| 20 |
font-family: 'Roboto', sans-serif;
|
| 21 |
font-weight: 600;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
margin-top: 20px;
|
| 23 |
}
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
font-family: 'Georgia', serif;
|
| 27 |
-
line-height: 1.
|
|
|
|
| 28 |
margin-bottom: 20px;
|
| 29 |
}
|
|
|
|
| 30 |
.icon-bullet {
|
| 31 |
list-style-type: none;
|
| 32 |
padding-left: 20px;
|
| 33 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
.icon-bullet li::before {
|
| 35 |
content: "✔️";
|
| 36 |
padding-right: 10px;
|
| 37 |
color: #17a2b8;
|
| 38 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
</style>
|
| 40 |
""", unsafe_allow_html=True)
|
| 41 |
|
|
@@ -96,7 +129,7 @@ chart = alt.Chart(data).mark_bar().encode(
|
|
| 96 |
fontSize=18,
|
| 97 |
anchor='middle',
|
| 98 |
font='Roboto',
|
| 99 |
-
color='#
|
| 100 |
)
|
| 101 |
st.altair_chart(chart)
|
| 102 |
|
|
@@ -129,27 +162,4 @@ st.image("https://cdn-uploads.huggingface.co/production/uploads/64c972774515835c
|
|
| 129 |
# Introduction to Statistics
|
| 130 |
st.title("2 : INTRODUCTION TO STATISTICS")
|
| 131 |
st.markdown("""
|
| 132 |
-
_Statistics is a branch of mathematics focused on collecting, analyzing, interpreting
|
| 133 |
-
""", unsafe_allow_html=True)
|
| 134 |
-
|
| 135 |
-
# Descriptive Statistics Section with interactive elements
|
| 136 |
-
st.subheader("2.1 Descriptive Statistics")
|
| 137 |
-
st.markdown("""
|
| 138 |
-
Descriptive statistics summarize and describe the main features of a dataset. Key concepts include:
|
| 139 |
-
<ul class="icon-bullet">
|
| 140 |
-
<li>Measures of Central Tendency (Mean, Median, Mode)</li>
|
| 141 |
-
<li>Measures of Dispersion (Range, Variance, Standard Deviation)</li>
|
| 142 |
-
<li>Data Distributions (e.g., Gaussian, Random, Normal)</li>
|
| 143 |
-
</ul>
|
| 144 |
-
""", unsafe_allow_html=True)
|
| 145 |
-
|
| 146 |
-
# Example of an interactive chart for Central Tendency
|
| 147 |
-
values = st.slider('Select a range of values', 0, 100, (25, 75))
|
| 148 |
-
mean_value = sum(values) / len(values)
|
| 149 |
-
st.write(f"Mean Value: {mean_value}")
|
| 150 |
-
|
| 151 |
-
# Inferential Statistics Section
|
| 152 |
-
st.subheader("2.2 Inferential Statistics")
|
| 153 |
-
st.markdown("""
|
| 154 |
-
Inferential statistics involve making predictions or inferences about a population based on a sample. These methods are used to test hypotheses and estimate population parameters.
|
| 155 |
-
""", unsafe_allow_html=True)
|
|
|
|
| 2 |
import altair as alt
|
| 3 |
import pandas as pd
|
| 4 |
|
| 5 |
+
# Custom CSS for background, fonts, and text styling
|
| 6 |
st.markdown("""
|
| 7 |
<style>
|
| 8 |
+
/* Set a soft background color */
|
| 9 |
body {
|
| 10 |
+
background-color: #eef2f7;
|
| 11 |
}
|
| 12 |
+
/* Style for main title */
|
| 13 |
h1 {
|
| 14 |
+
color: #d63384;
|
| 15 |
font-family: 'Roboto', sans-serif;
|
| 16 |
font-weight: 700;
|
| 17 |
text-align: center;
|
| 18 |
margin-bottom: 25px;
|
| 19 |
}
|
| 20 |
+
/* Style for headers */
|
| 21 |
+
h2 {
|
| 22 |
+
color: #1f77b4;
|
| 23 |
font-family: 'Roboto', sans-serif;
|
| 24 |
font-weight: 600;
|
| 25 |
+
margin-top: 30px;
|
| 26 |
+
}
|
| 27 |
+
h3 {
|
| 28 |
+
color: #6c757d;
|
| 29 |
+
font-family: 'Roboto', sans-serif;
|
| 30 |
+
font-weight: 500;
|
| 31 |
margin-top: 20px;
|
| 32 |
}
|
| 33 |
+
/* Style for subheaders */
|
| 34 |
+
.custom-subheader {
|
| 35 |
+
color: #2ca02c;
|
| 36 |
+
font-family: 'Roboto', sans-serif;
|
| 37 |
+
font-weight: 600;
|
| 38 |
+
margin-bottom: 15px;
|
| 39 |
+
}
|
| 40 |
+
/* Paragraph styling */
|
| 41 |
+
p {
|
| 42 |
font-family: 'Georgia', serif;
|
| 43 |
+
line-height: 1.8;
|
| 44 |
+
color: #333333; /* Darker text color for better visibility */
|
| 45 |
margin-bottom: 20px;
|
| 46 |
}
|
| 47 |
+
/* List styling with checkmark bullets */
|
| 48 |
.icon-bullet {
|
| 49 |
list-style-type: none;
|
| 50 |
padding-left: 20px;
|
| 51 |
}
|
| 52 |
+
.icon-bullet li {
|
| 53 |
+
font-family: 'Georgia', serif;
|
| 54 |
+
font-size: 1.1em;
|
| 55 |
+
margin-bottom: 10px;
|
| 56 |
+
color: #333333; /* Darker text color for better visibility */
|
| 57 |
+
}
|
| 58 |
.icon-bullet li::before {
|
| 59 |
content: "✔️";
|
| 60 |
padding-right: 10px;
|
| 61 |
color: #17a2b8;
|
| 62 |
}
|
| 63 |
+
/* Sidebar styling */
|
| 64 |
+
.sidebar .sidebar-content {
|
| 65 |
+
background-color: #ffffff;
|
| 66 |
+
border-radius: 10px;
|
| 67 |
+
padding: 15px;
|
| 68 |
+
}
|
| 69 |
+
.sidebar h2 {
|
| 70 |
+
color: #495057;
|
| 71 |
+
}
|
| 72 |
</style>
|
| 73 |
""", unsafe_allow_html=True)
|
| 74 |
|
|
|
|
| 129 |
fontSize=18,
|
| 130 |
anchor='middle',
|
| 131 |
font='Roboto',
|
| 132 |
+
color='#343a40'
|
| 133 |
)
|
| 134 |
st.altair_chart(chart)
|
| 135 |
|
|
|
|
| 162 |
# Introduction to Statistics
|
| 163 |
st.title("2 : INTRODUCTION TO STATISTICS")
|
| 164 |
st.markdown("""
|
| 165 |
+
_Statistics is a branch of mathematics focused on collecting, analyzing, interpreting
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|