This project analyzes and predicts coffee sales using historical sales data. It includes data preprocessing, exploratory data analysis (EDA), feature engineering, and machine learning models (Random Forest Regressor) to forecast sales trends. The project also visualizes sales patterns across different time periods and locations.
- Data Cleaning & Preprocessing
- Handled missing values
- Extracted Month, Day, Weekday from Date
- Exploratory Data Analysis (EDA)
- Sales distribution by country, category, and month
- Time series analysis of sales trends
- Machine Learning Model (Random Forest Regressor)
- Trained on extracted features
- Evaluated model using MAE & RMSE
- Optimized using hyperparameter tuning
- The dataset contains historical coffee sales data with columns such as:
Date(timestamp of sale)City(sales location)Category(type of coffee product)Sales(final sales amount)
git clone https://github.com/yourusername/coffee-sales-prediction.git
cd coffee-sales-predictionpip install -r requirements.txtjupyter notebookOpen coffee_sales.ipynb to explore the analysis and model.
- Feature Importance Analysis shows
Monthis the most influential predictor. - Actual vs. Predicted Sales Scatter Plot highlights model accuracy.
- Residual Analysis suggests further improvements needed.
- Add more features (holiday, promotions, etc.)
- Test other ML models (XGBoost, LSTM for time series)
- Deploy model as an API for real-time predictions
This project is open-source and available under the MIT License.
Feel free to submit pull requests and suggestions!
π‘ Developed by D Rajeev π