This project is a data visualization dashboard built with Streamlit and Plotly. It analyzes customer shopping behavior and spending habits based on a dataset. The dashboard provides interactive filters and various charts to explore sales trends, customer demographics, and spending patterns.
The sidebar allows you to filter the data based on:
- Gender: Select specific genders to analyze.
- Category: Choose specific product categories.
- Age Range: Adjust the slider to focus on a specific age group.
The dashboard includes the following interactive charts:
- Sales by Category: Bar chart showing the number of items sold per category.
- Customer Age Distribution: Histogram of customer age groups.
- Gender Distribution: Pie chart showing the male vs. female ratio.
- Spending Hierarchy: Treemap of total spending by category and item.
- Seasonal Preferences: Sunburst chart showing category distribution by season.
- Customer Flow: Parallel categories diagram visualizing the flow from Gender to Category to Size.
- Spending Distribution: Box plot of purchase amounts per category.
- Review Ratings: Violin plot showing the density of review ratings by category.
- Age vs. Spending Relationship: Scatter plot correlating age and purchase amount, colored by subscription status.
-
Clone the repository or download the project files.
-
Ensure you have Python installed on your system.
-
Install the required Python libraries:
pip install streamlit pandas plotly
-
Navigate to the project directory in your terminal.
-
Run the Streamlit application:
streamlit run main.py
Note: If you encounter issues running the
streamlitcommand directly, you can use:python -m streamlit run main.py
-
The dashboard will automatically open in your default web browser (usually at
http://localhost:8501).
main.py: The main Python script containing the Streamlit application logic and visualizations.shopping_behavior.csv: The dataset file containing customer shopping data.README.md: This documentation file.
- Python 3.x
- Streamlit
- Pandas
- Plotly Express