{"id":24539785,"url":"https://github.com/walidalsafadi/store-sales-ts-forecasting","last_synced_at":"2026-01-25T00:02:22.362Z","repository":{"id":259430120,"uuid":"863548497","full_name":"WalidAlsafadi/Store-Sales-TS-Forecasting","owner":"WalidAlsafadi","description":"Use machine learning to predict grocery sales","archived":false,"fork":false,"pushed_at":"2024-10-24T11:16:41.000Z","size":853,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T23:52:07.618Z","etag":null,"topics":["data-visualization","eda","feature-engineering","model-optimization","time-series-forecasting","xgboost"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WalidAlsafadi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-26T13:39:03.000Z","updated_at":"2025-01-05T13:05:48.000Z","dependencies_parsed_at":"2024-10-25T10:12:19.196Z","dependency_job_id":"2992714b-69e7-44de-9348-9b069bacd91d","html_url":"https://github.com/WalidAlsafadi/Store-Sales-TS-Forecasting","commit_stats":null,"previous_names":["walidkw/store-sales-ts-forecasting","walidalsafadi/store-sales-ts-forecasting"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WalidAlsafadi/Store-Sales-TS-Forecasting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalidAlsafadi%2FStore-Sales-TS-Forecasting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalidAlsafadi%2FStore-Sales-TS-Forecasting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalidAlsafadi%2FStore-Sales-TS-Forecasting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalidAlsafadi%2FStore-Sales-TS-Forecasting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WalidAlsafadi","download_url":"https://codeload.github.com/WalidAlsafadi/Store-Sales-TS-Forecasting/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WalidAlsafadi%2FStore-Sales-TS-Forecasting/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28739321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T22:12:27.248Z","status":"ssl_error","status_checked_at":"2026-01-24T22:12:10.529Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-visualization","eda","feature-engineering","model-optimization","time-series-forecasting","xgboost"],"created_at":"2025-01-22T17:16:18.430Z","updated_at":"2026-01-25T00:02:22.337Z","avatar_url":"https://github.com/WalidAlsafadi.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Sales Forecasting Using Time Series Analysis with XGBoost**\n\n## **Project Overview** 🎯\nThis project aims to forecast sales for thousands of product families sold at Favorita stores using historical data. The analysis is performed using XGBoost, a powerful machine learning algorithm. Through feature engineering and model tuning, the project provides both short-term and long-term sales predictions, with a focus on generating a 30-day forecast.\n\n## **Project Workflow** 📈\n\n1. **Data Collection and Preprocessing**:\n    - Used historical sales data provided by Favorita stores.\n    - Processed the data to handle missing values and outliers.\n    - Performed feature engineering to create lag features and rolling statistics.\n    - Applied one-hot encoding for categorical variables and scaling for numerical variables.\n\n2. **Exploratory Data Analysis (EDA)**:\n    - Visualized sales trends over time.\n    - Analyzed seasonal effects, promotions, and other external factors influencing sales.\n\n3. **Feature Engineering**:\n    - Created lag features and rolling windows to capture historical patterns.\n    - Engineered calendar-related features such as day of the week, month, and promotions.\n\n4. **Model Building**:\n    - Implemented **XGBoost** for time series forecasting.\n    - Fine-tuned the model using RMSE and RMSLE as evaluation metrics.\n    - Generated a 30-day sales forecast.\n\n5. **Model Evaluation**:\n    - Used RMSE and RMSLE to assess the model’s accuracy.\n    - Compared the model’s predictions against actual sales data for validation.\n\n## **Key Features** 🛠️\n- **XGBoost Model**: Applied an advanced machine learning approach for time series forecasting.\n- **Feature Engineering**: Integrated lag and rolling statistics to enhance forecast accuracy.\n- **Data Visualization**: Plots and charts to illustrate key trends and model performance.\n- **30-Day Sales Forecast**: Focused on predicting future sales, with results analyzed for potential improvements.\n\n## **Challenges \u0026 Improvements** 🔧\n- **Current Challenge**: The 30-day forecast results show a linear pattern, lacking the nuanced shape of actual sales data.\n- **Future Work**: Exploring advanced techniques such as model stacking, ensemble methods, and deeper time-series models (e.g., ARIMA, LSTM) to improve forecast accuracy.\n\n## **Results** 📊\n- Achieved a RMSLE of 0.409.\n- Significant improvement in prediction accuracy through feature engineering.\n\n### **Check it out on Kaggle 🔗**\nYou can also explore the project on Kaggle: https://www.kaggle.com/code/walidkw/store-sales-ts-forecasting-xgboost\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalidalsafadi%2Fstore-sales-ts-forecasting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwalidalsafadi%2Fstore-sales-ts-forecasting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwalidalsafadi%2Fstore-sales-ts-forecasting/lists"}