Spaces:
Build error
Build error
File size: 5,931 Bytes
5cca6da efcf375 c5a0add a42f56d c5a0add a42f56d c5a0add a42f56d c5a0add a42f56d c5a0add a42f56d efcf375 b52c683 c5a0add b52c683 c5a0add a42f56d eac9b92 efcf375 b52c683 a42f56d 432d66b a42f56d b52c683 c5a0add a42f56d c5a0add a42f56d 64affd9 b52c683 c5a0add a42f56d c5a0add b52c683 7454ffb a42f56d fcaa169 a42f56d c5a0add b52c683 a42f56d c5a0add efcf375 c5a0add b52c683 c5a0add b52c683 efcf375 c5a0add b52c683 c5a0add b52c683 7454ffb c5a0add b52c683 c5a0add efcf375 b52c683 c5a0add b52c683 c5a0add b52c683 c5a0add 7454ffb 4f41aef c5a0add efcf375 b52c683 efcf375 b52c683 a42f56d efcf375 b52c683 c5a0add b52c683 c5a0add b52c683 c5a0add 7454ffb 3352063 c5a0add b52c683 c5a0add b52c683 c5a0add b52c683 c5a0add 7454ffb ab7a123 c5a0add ab7a123 c5a0add c1a50c4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
import streamlit as st
import altair as alt
import pandas as pd
# Custom CSS for background, fonts, and text styling
st.markdown("""
<style>
/* Set a soft background color */
body {
background-color: #eef2f7;
}
/* Style for main title */
h1 {
color: #d63384;
font-family: 'Roboto', sans-serif;
font-weight: 700;
text-align: center;
margin-bottom: 25px;
}
/* Style for headers */
h2 {
color: #808080;
font-family: 'Roboto', sans-serif;
font-weight: 600;
margin-top: 30px;
}
h3 {
color: #20B2AA;
font-family: 'Roboto', sans-serif;
font-weight: 500;
margin-top: 20px;
}
/* Style for subheaders */
.custom-subheader {
color: #2ca02c;
font-family: 'Roboto', sans-serif;
font-weight: 600;
margin-bottom: 15px;
}
/* Paragraph styling */
p {
font-family: 'Georgia', serif;
line-height: 1.8;
color: #F0FFF0; /* Darker text color for better visibility */
margin-bottom: 20px;
}
/* List styling with checkmark bullets */
.icon-bullet {
list-style-type: none;
padding-left: 20px;
}
.icon-bullet li {
font-family: 'Georgia', serif;
font-size: 1.1em;
margin-bottom: 10px;
color: #FFFFF0; /* Darker text color for better visibility */
}
.icon-bullet li::before {
content: "✔️";
padding-right: 10px;
color: #17a2b8;
}
/* Sidebar styling */
.sidebar .sidebar-content {
background-color: #ffffff;
border-radius: 10px;
padding: 15px;
}
.sidebar h2 {
color: #495057;
}
</style>
""", unsafe_allow_html=True)
# Sidebar for navigation
st.sidebar.title("Navigation")
st.sidebar.markdown("Use the sidebar to navigate through different sections.")
# Title Section
st.title("1 : INTRODUCTION TO STATISTICS")
st.markdown("""
In this section, we'll explore the basics of data analysis using Python. **Data Analysis** involves collecting, cleaning, and analyzing data to extract valuable insights. Let's start by understanding what we mean by *data*.
""", unsafe_allow_html=True)
# Header Section
st.header("What does the term 'data' refer to?")
st.subheader("DATA")
st.markdown("""
Data refers to a collection of information gathered from various sources. Here are a few examples:
""", unsafe_allow_html=True)
st.markdown("""
<ul class="icon-bullet">
<li>Images</li>
<li>Text</li>
<li>Videos</li>
<li>Audio recordings</li>
</ul>
""", unsafe_allow_html=True)
# Data Classification Section with a chart
st.header("Data Classification")
st.subheader("Structured Data")
st.markdown("""
Structured data is organized and formatted, making it easy to search, analyze, and store in databases. Common examples include:
<ul class="icon-bullet">
<li>Excel Documents</li>
<li>SQL Databases</li>
</ul>
""", unsafe_allow_html=True)
st.image('https://cdn-uploads.huggingface.co/production/uploads/64c972774515835c4dadd754/dSbyOXaQ6N_Kg2TLxgEyt.png', width=400)
# Visualization example for Structured Data
data = pd.DataFrame({
'Category': ['Excel', 'SQL', 'CSV', 'JSON'],
'Count': [45, 35, 30, 40]
})
chart = alt.Chart(data).mark_bar().encode(
x=alt.X('Category', title='Data Format'),
y=alt.Y('Count', title='Count'),
color=alt.Color('Category', legend=None)
).properties(
title='Structured Data Types',
width=500,
height=300
).configure_title(
fontSize=18,
anchor='middle',
font='Roboto',
color='#343a40'
)
st.altair_chart(chart)
st.subheader("Unstructured Data")
st.markdown("""
Unstructured data doesn't follow a specific format and is often difficult to organize. Examples include:
<ul class="icon-bullet">
<li>Images</li>
<li>Videos</li>
<li>Text documents</li>
<li>Social Media Feeds</li>
</ul>
""", unsafe_allow_html=True)
st.image("https://cdn-uploads.huggingface.co/production/uploads/64c972774515835c4dadd754/xhaNBRanDaj8esumqo9hl.png", width=400)
st.subheader("Semi-Structured Data")
st.markdown("""
Semi-structured data contains elements of both structured and unstructured data. Examples include:
<ul class="icon-bullet">
<li>CSV Files</li>
<li>JSON Files</li>
<li>Emails</li>
<li>HTML Documents</li>
</ul>
""", unsafe_allow_html=True)
st.image("https://cdn-uploads.huggingface.co/production/uploads/64c972774515835c4dadd754/Nupc6BePInRVo9gJwLfWH.png", width=400)
# Introduction to Statistics
st.title("2 : INTRODUCTION TO STATISTICS")
st.markdown("""
_Statistics is a branch of mathematics focused on collecting, analyzing, interpreting, and presenting data. It can be divided into two main categories:_
""", unsafe_allow_html=True)
# Descriptive Statistics Section with interactive elements
st.subheader("2.1 Descriptive Statistics")
st.markdown("""
Descriptive statistics summarize and describe the main features of a dataset. Key concepts include:
<ul class="icon-bullet">
<li>Measures of Central Tendency (Mean, Median, Mode)</li>
<li>Measures of Dispersion (Range, Variance, Standard Deviation)</li>
<li>Data Distributions (e.g., Gaussian, Random, Normal)</li>
</ul>
""", unsafe_allow_html=True)
# Example of an interactive chart for Central Tendency
values = st.slider('Select a range of values', 0, 100, (25, 75))
mean_value = sum(values) / len(values)
st.write(f"Mean Value: {mean_value}")
# Inferential Statistics Section
st.subheader("2.2 Inferential Statistics")
st.markdown("""
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.
""", unsafe_allow_html=True)
|