import streamlit as st def main(): st.set_page_config(page_title="Data Demystified", page_icon="πŸ“Š", layout="wide") # Custom CSS for better engagement st.markdown(""" """, unsafe_allow_html=True) pages = { "🏠 Introduction": intro_page, "πŸ“š Data Types Overview": types_page, "πŸ—‚οΈ Structured Data": structured_page, "🧩 Semi-Structured Data": semi_structured_page, "🎨 Unstructured Data": unstructured_page } with st.sidebar: st.title("Navigation") page = st.radio("Go to", list(pages.keys())) pages[page]() def intro_page(): st.markdown('
πŸ“Š Welcome to Data Science Fundamentals
', unsafe_allow_html=True) col1, col2 = st.columns([3, 2]) with col1: st.write(""" ### What is Data Science? Data Science is the art of extracting meaningful insights from raw data - like being a digital detective uncovering hidden patterns in the numbers! **Did you know?** πŸ€” Every day, we create 2.5 quintillion bytes of data - that's equivalent to 250,000 Libraries of Congress! """, unsafe_allow_html=True) st.markdown(""" ### Why It Matters: - Predict future trends 🌟 - Solve complex problems 🧩 - Power AI innovations πŸ€– - Drive business decisions πŸ’Ό """) with col2: st.image("https://cdn-uploads.huggingface.co/production/uploads/64c972774515835c4dadd754/qpmLGi47ucDCWYEi8eZhE.png", caption="Data is Everywhere!", width=300) def types_page(): st.header("πŸ“¦ The Three Data Superheroes") with st.expander("πŸ” Quick Comparison"): st.table({ "Type": ["Structured", "Semi-Structured", "Unstructured"], "Organization": ["Perfectly Organized", "Partially Organized", "Chaotic Creativity"], "Examples": ["SQL Databases, Excel", "JSON, XML, CSV", "Images, Videos, Text"] }) cols = st.columns(3) data_types = [ ("πŸ—‚οΈ Structured", "Neat rows & columns", "#e3f2fd"), ("🧩 Semi-Structured", "Flexible tags & markers", "#f0f4c3"), ("🎨 Unstructured", "Creative free-form", "#ffcdd2") ] for col, (icon, desc, color) in zip(cols, data_types): with col: st.markdown(f"""

{icon} {desc.split()[0]}

{' '.join(desc.split()[1:])}

""", unsafe_allow_html=True) def structured_page(): st.header("πŸ—‚οΈ Structured Data: The Organized Perfectionist") with st.container(): st.markdown(""" ### Characteristics: - Strict schema πŸ”’ - Tabular format πŸ“Š - Easy to query πŸ” **Did you know?** πŸ€” The first computerized database appeared in 1963 - it weighed more than a car! πŸš—πŸ’Ύ """, unsafe_allow_html=True) st.image("https://cdn-uploads.huggingface.co/production/uploads/64c972774515835c4dadd754/dSbyOXaQ6N_Kg2TLxgEyt.png", width=400, caption="Structured Data Example") with st.expander("πŸ’‘ Real-World Examples"): st.markdown(""" - Financial records πŸ’° - Inventory systems πŸ“¦ - Student databases πŸŽ“ - Railway timetables πŸš„ """) def semi_structured_page(): st.header("🧩 Semi-Structured Data: The Flexible Friend") with st.container(): st.markdown(""" ### Why It's Special: - Partial organization 🎭 - Self-describing formats πŸ“ - Web-friendly 🌐 **Did you know?** πŸ€” JSON was created in 2001 - the same year Wikipedia launched! πŸŽ‚πŸ“š """, unsafe_allow_html=True) cols = st.columns(2) with cols[0]: st.code(""" { "name": "Data Hero", "skills": ["JSON", "XML", "CSV"], "mission": "Bring order to chaos!" } """, language="json") with cols[1]: st.markdown(""" ### Common Formats: - JSON (Web APIs) 🌍 - XML (Document markup) πŸ“„ - CSV (Spreadsheet data) πŸ“‹ - Email headers πŸ“§ """) def unstructured_page(): st.header("🎨 Unstructured Data: The Creative Chaos") with st.container(): st.markdown(""" ### The Wild West of Data: - No predefined format 🎨 - Human-friendly formats 😊 - Requires AI processing πŸ€– **Did you know?** πŸ€” 90% of all digital data is unstructured - that's like having 1000 Netflix movies for every person on Earth! 🍿🌍 """, unsafe_allow_html=True) st.image("https://cdn-uploads.huggingface.co/production/uploads/64c972774515835c4dadd754/xhaNBRanDaj8esumqo9hl.png", width=400, caption="Unstructured Data in Action") with st.expander("🌐 Modern Applications"): st.markdown(""" - Facial recognition systems πŸ‘©πŸ’» - Voice assistants πŸ—£οΈ - Medical image analysis πŸ₯ - Social media monitoring πŸ“± """) if __name__ == "__main__": main()