This project focuses on analyzing sales data from Starbucks to gain insights into customer behavior, product performance, and sales trends across various locations. The analysis aims to help Starbucks optimize its operations, tailor marketing strategies, and enhance the overall customer experience.
The project directory is structured as follows:
Starbucks-Sales-Analysis/ │ ├── data/ │ └── starbucks_sales_data.csv # The dataset used for analysis │ ├── notebooks/ │ └── Starbucks_Sales_Analysis.ipynb # Jupyter Notebook with analysis │ ├── src/ │ ├── data_cleaning.py # Data cleaning scripts │ ├── eda.py # Exploratory data analysis scripts │ ├── visualization.py # Visualization scripts │ ├── requirements.txt # Python dependencies ├── README.md # Project documentation └── .gitignore # Files and directories to ignore in Git
The dataset starbucks_sales_data.csv
contains simulated sales records from various Starbucks locations, capturing details such as:
transaction_id
: Unique identifier for each transactiontransaction_date
: Date of the transactionstore_location
: Starbucks store locationproduct_category
: Category of the product sold (e.g., Beverages, Food)item_name
: Name of the item soldquantity_sold
: Quantity of the item soldtransaction_amount
: Total amount for the transactioncustomer_id
: Unique identifier for the customer
To set up the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/Starbucks-Sales-Analysis.git cd Starbucks-Sales-Analysis
2.Create a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate # On Windows, use venv\Scripts\activate
3.Install the required dependencies: pip install -r requirements.txt
Usage Running the Analysis The analysis can be run using the Jupyter Notebook provided in the notebooks directory. To start the notebook: jupyter notebook notebooks/Starbucks_Sales_Analysis.ipynb
Alternatively, you can run the analysis scripts from the src directory:
python src/data_cleaning.py python src/eda.py python src/visualization.py
Analyzing Sales Data The analysis includes:
Sales Trends: Understand sales over time, by day of the week, and across different store locations.
Customer Segmentation: Segment customers based on their purchasing behavior and average spending.
Product Performance: Evaluate the performance of different product categories and individual items.
Revenue Analysis: Calculate key metrics such as average transaction value (ATV) and sales per store.
Results
The key findings and insights from the analysis include:
Peak Sales Periods: Identified the days and times when sales are highest.
Top Performing Products: Discovered which products are driving the most revenue.
Customer Insights: Segmented customers based on visit frequency and spending habits, allowing for targeted marketing strategies.
These insights can help Starbucks optimize its operations, improve customer experience, and enhance marketing efforts.