Skip to content

noahkhomer18/legos-dashboard

Repository files navigation

🧱 LEGO Sets Analytics Dashboard

A professional data analysis platform for LEGO sets with interactive visualizations, comprehensive filtering, and deep insights. Built with modern web technologies and best practices in data visualization.

✨ Features

πŸ“Š Data Analysis & Processing

  • Data Cleaning: Removes records with missing critical values (price, age, pieces, image URL)
  • Calculated Columns: Age Range and Price Range categorization
  • Statistical Measures: Total sets, theme groups, average age, price, and pieces
  • Professional Data Types: Proper data type conversion and validation

🎯 Interactive Visualizations

  • Price Distribution: Histogram showing price ranges across all sets
  • Age Range Analysis: Pie chart breakdown of target age groups
  • Theme Popularity: Bar chart of top 10 themes by set count
  • Price vs Pieces: Scatter plot with age range color coding
  • Real-time Filtering: All charts update dynamically with filter changes

πŸ” Advanced Filtering

  • Theme Group Filter: Filter by major LEGO theme categories
  • Theme Filter: Filter by specific LEGO themes
  • Age Range Filter: Filter by target age groups (1-4, 5-9, 10-17, 18+)
  • Price Range Filter: Slider to set maximum price threshold
  • Dynamic Updates: All visualizations and tables update in real-time

πŸ“‹ Data Tables

  • Comprehensive Table: Shows set name, ID, theme, age range, pieces, price, and price range
  • Sortable Columns: Click column headers to sort data
  • Searchable: Built-in search functionality
  • Responsive Design: Works on all device sizes

🎭 Special Analysis

  • Disney Sets Analysis: Targeted analysis for Disney-themed sets for ages 5-9
  • Custom Queries: Answer specific business questions
  • Detailed Breakdowns: Comprehensive insights for specialized queries

πŸš€ Quick Start

Prerequisites

  • Python 3.8 or higher
  • LEGO dataset (lego_sets.csv) in the specified path

Installation

  1. Clone or download the project files

  2. Install required packages:

    pip install -r requirements.txt
  3. Ensure LEGO dataset is available:

    • Place lego_sets.csv in C:\Users\noahk\Downloads\LEGO+Sets\
    • Or update the path in lego_analysis.py

Running the Dashboard

Option 1: Full Platform (Recommended)

python run_dashboard.py

This will start:

  • Landing page at http://localhost:8080
  • Dashboard at http://localhost:8501

Option 2: Dashboard Only

streamlit run lego_analysis.py

πŸ“ Project Structure

lego-analytics/
β”œβ”€β”€ lego_analysis.py          # Main Streamlit dashboard
β”œβ”€β”€ index.html                # Professional landing page
β”œβ”€β”€ run_dashboard.py          # Launcher script
β”œβ”€β”€ requirements.txt          # Python dependencies
└── README.md                 # This file

🎯 Project Objectives Completed

βœ… Objective 1: Load and Prepare Data

  • Connected to lego_sets CSV file
  • Removed minifigs, bricksetURL, and thumbnailURL fields
  • Reviewed and corrected data types
  • Filtered out records with missing price, age, pieces, or image URL
  • Created Age Range conditional columns
  • Created Price Range conditional columns
  • Added measures for Total Sets, Total Groups, Avg. Age, Avg. Price, Avg. Pieces

βœ… Objective 2: Design Report Layout & Visuals

  • Professional report layout with modern design
  • Card visuals showing key metrics
  • Slicers for theme group, theme, and age range filtering
  • Comprehensive data table with all required columns
  • Interactive visualizations with cross-filtering

βœ… Objective 3: Add Interactive Components

  • Numeric range parameter for maximum price filtering
  • Dynamic filtering based on user selections
  • Interactive tooltips and hover effects
  • Professional styling and responsive design
  • Advanced data analysis capabilities

🎭 Final Project Question Answer

Question: What's the average number of pieces for Disney-themed LEGO sets targeting 5 to 9 year-olds?

Answer: The dashboard includes a special analysis section that calculates this exact metric. The system filters for:

  • Theme group containing "Disney"
  • Age range of "5 to 9"
  • Calculates the average number of pieces for matching sets

πŸ› οΈ Technologies Used

  • Python 3.8+: Core programming language
  • Streamlit: Web application framework
  • Pandas: Data manipulation and analysis
  • NumPy: Numerical computing
  • Plotly: Interactive visualizations
  • HTML/CSS/JavaScript: Landing page and styling
  • Responsive Design: Mobile-first approach

🎨 Design Features

Professional Styling

  • Modern gradient backgrounds
  • Clean, minimalist interface
  • Professional color scheme
  • Smooth animations and transitions
  • Responsive design for all devices

SEO Optimization

  • Meta tags for search engines
  • Open Graph tags for social sharing
  • Semantic HTML structure
  • Fast loading times
  • Mobile-friendly design

User Experience

  • Intuitive navigation
  • Clear visual hierarchy
  • Interactive elements
  • Real-time feedback
  • Professional typography

πŸ“Š Data Insights

The dashboard provides insights into:

  • Price Distribution: Understanding LEGO set pricing patterns
  • Age Targeting: Analysis of age-appropriate sets
  • Theme Popularity: Most popular LEGO themes
  • Piece Complexity: Relationship between price and piece count
  • Market Segments: Different LEGO product categories

πŸ”§ Customization

Adding New Visualizations

  1. Create new Plotly figures in the LEGOAnalyzer class
  2. Add them to the dashboard layout
  3. Ensure they respond to filters

Modifying Filters

  1. Update the sidebar filter section
  2. Modify the get_filtered_data method
  3. Ensure all visualizations update accordingly

Styling Changes

  1. Modify the CSS in the Streamlit app
  2. Update the landing page HTML/CSS
  3. Customize colors and fonts as needed

πŸ“ˆ Performance

  • Fast Loading: Optimized data processing
  • Responsive: Works on all device sizes
  • Efficient: Minimal memory usage
  • Scalable: Can handle larger datasets

🀝 Contributing

This project was created by Noah Khomer as a professional data analysis demonstration. Feel free to:

  • Fork the repository
  • Submit issues
  • Suggest improvements
  • Create pull requests

πŸ“„ License

This project is created for educational and demonstration purposes. Please respect the LEGO brand and data usage guidelines.

πŸ‘¨β€πŸ’» Author

Noah Khomer

  • Professional Data Analysis & Visualization
  • Modern Web Development
  • Interactive Dashboard Design

Made with ❀️ by Noah Khomer

Professional LEGO Sets Analytics Dashboard - Transforming data into actionable insights

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors