Spaces:
Sleeping
Sleeping
File size: 4,038 Bytes
f6ad9db 7a76f54 04f6923 7a76f54 b10d4b1 04f6923 7a76f54 04f6923 7a76f54 b10d4b1 b6d3da9 b10d4b1 04f6923 7a76f54 b10d4b1 b6d3da9 7a76f54 b6d3da9 7a76f54 b6d3da9 7a76f54 b6d3da9 7a76f54 b6d3da9 7a76f54 b6d3da9 7a76f54 b6d3da9 7a76f54 b6d3da9 7a76f54 b6d3da9 04f6923 7a76f54 b10d4b1 7a76f54 b6d3da9 7a76f54 b6d3da9 7a76f54 b6d3da9 7a76f54 b6d3da9 7a76f54 b6d3da9 7a76f54 b6d3da9 7a76f54 b10d4b1 b6d3da9 7a76f54 b6d3da9 7a76f54 b6d3da9 7a76f54 b6d3da9 7a76f54 b6d3da9 7a76f54 b6d3da9 7a76f54 04f6923 7a76f54 |
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 |
import streamlit as st
from streamlit_lottie import st_lottie # For Lottie animations
import requests
# Function to load Lottie animations
def load_lottie_url(url):
response = requests.get(url)
if response.status_code == 200:
return response.json()
return None
# Custom CSS for enhanced styling
st.markdown(
"""
<style>
.stApp {
background: linear-gradient(135deg, #1f1c2c, #928dab);
color: #E0E0E0;
}
.stTitle {
text-align: center;
color: #76FF03;
}
.css-1d391kg p, .css-1v0mbdj p {
color: #B0BEC5;
}
.stButton > button:hover {
background-color: #4CAF50;
color: white;
transform: scale(1.05);
}
</style>
""",
unsafe_allow_html=True,
)
# App Title
st.title("π Data Types Explorer")
# Sidebar for navigation
st.sidebar.subheader("π Explore Data Types")
data_type = st.sidebar.selectbox(
"Select a Type of Data:",
["Structured Data", "Unstructured Data", "Semi-Structured Data"]
)
# Structured Data Section
if data_type == "Structured Data":
st.subheader("π Structured Data")
st.write("""
**Definition**: Structured data is organized and stored in a predefined format like rows and columns, making it easily searchable and manageable.
""")
st.markdown("""
**Features**:
- Fixed schema (e.g., tables with defined columns and data types).
- Easy to process using query languages like SQL.
- Relationships between data points are well-defined.
""")
st.markdown("**Examples**: Excel Files π, MySQL Databases πΎ")
if st.button("Learn About Excel Files π"):
st.subheader("Excel Files")
st.write("""
Excel files store structured data in rows and columns, making them ideal for analysis, visualization, and calculations.
""")
st.code("""
import pandas as pd
df = pd.read_excel('file.xlsx')
df.to_csv('file.csv', index=False)
""", language="python")
if st.button("Learn About MySQL Databases π»"):
st.subheader("MySQL Databases")
st.write("""
MySQL is a relational database management system for storing structured data in tables. SQL is used to query and manipulate data.
""")
# Unstructured Data Section
elif data_type == "Unstructured Data":
st.subheader("ποΈ Unstructured Data")
st.write("""
**Definition**: Unstructured data lacks any predefined structure or schema, making it the most difficult to organize and analyze.
""")
st.markdown("**Examples**: Images πΌοΈ, Videos π₯, Audio π, Text π")
if st.button("Learn About Images π·"):
st.subheader("Working with Images")
st.write("""
Images are a form of unstructured data represented as grids of pixels. Common formats include JPG, PNG, and BMP.
""")
if st.button("Learn About Videos π₯"):
st.subheader("Working with Videos")
st.write("""
Videos are sequences of frames used in various applications like object detection and activity recognition. Common formats include MP4 and AVI.
""")
# Semi-Structured Data Section
elif data_type == "Semi-Structured Data":
st.subheader("π Semi-Structured Data")
st.write("""
**Definition**: Semi-structured data is partially organized using tags or key-value pairs. It is more flexible than structured data.
""")
st.markdown("**Examples**: JSON Files π, XML Files π")
if st.button("Learn About JSON Files π"):
st.subheader("JSON Files")
st.write("""
JSON stores data as key-value pairs and is commonly used in APIs and web development.
""")
if st.button("Learn About XML Files π"):
st.subheader("XML Files")
st.write("""
XML stores data in a tree structure with nested elements. It is used in configuration files and data exchange.
""")
# Footer
st.write("This app provides a clear understanding of different data types. π")
|