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.
- 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
- 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
- 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
- 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
- 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
- Python 3.8 or higher
- LEGO dataset (lego_sets.csv) in the specified path
-
Clone or download the project files
-
Install required packages:
pip install -r requirements.txt
-
Ensure LEGO dataset is available:
- Place
lego_sets.csvinC:\Users\noahk\Downloads\LEGO+Sets\ - Or update the path in
lego_analysis.py
- Place
python run_dashboard.pyThis will start:
- Landing page at
http://localhost:8080 - Dashboard at
http://localhost:8501
streamlit run lego_analysis.pylego-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
- 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
- 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
- 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
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
- 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
- Modern gradient backgrounds
- Clean, minimalist interface
- Professional color scheme
- Smooth animations and transitions
- Responsive design for all devices
- Meta tags for search engines
- Open Graph tags for social sharing
- Semantic HTML structure
- Fast loading times
- Mobile-friendly design
- Intuitive navigation
- Clear visual hierarchy
- Interactive elements
- Real-time feedback
- Professional typography
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
- Create new Plotly figures in the
LEGOAnalyzerclass - Add them to the dashboard layout
- Ensure they respond to filters
- Update the sidebar filter section
- Modify the
get_filtered_datamethod - Ensure all visualizations update accordingly
- Modify the CSS in the Streamlit app
- Update the landing page HTML/CSS
- Customize colors and fonts as needed
- Fast Loading: Optimized data processing
- Responsive: Works on all device sizes
- Efficient: Minimal memory usage
- Scalable: Can handle larger datasets
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
This project is created for educational and demonstration purposes. Please respect the LEGO brand and data usage guidelines.
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