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( """ """, 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. 🎉")