https://github.com/cnoret/retail-data-analysis
Let's analyze historical sales data from a large retail chain and predict weekly sales using machine learning on a Streamlit web app
https://github.com/cnoret/retail-data-analysis
data-analysis data-analyst data-science data-vizualisation pandas python streamlit streamlit-webapp
Last synced: about 2 months ago
JSON representation
Let's analyze historical sales data from a large retail chain and predict weekly sales using machine learning on a Streamlit web app
- Host: GitHub
- URL: https://github.com/cnoret/retail-data-analysis
- Owner: cnoret
- License: mit
- Created: 2024-07-18T10:35:45.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-02-27T13:21:43.000Z (over 1 year ago)
- Last Synced: 2025-02-27T18:49:13.577Z (over 1 year ago)
- Topics: data-analysis, data-analyst, data-science, data-vizualisation, pandas, python, streamlit, streamlit-webapp
- Language: Jupyter Notebook
- Homepage: https://retail-data-analysis.streamlit.app/
- Size: 10.6 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Retail Data Analysis and Prediction Project
## Overview
This project is designed to analyze historical sales data from a large retail chain and predict weekly sales using machine learning models. The project involves data preprocessing, exploratory data analysis (EDA), and the development of predictive models to forecast sales. The project is implemented in Python and presented using a Streamlit web application.
## Features
- **Data Exploration:** Analyze the historical sales data, visualize trends, distributions, and relationships between different variables.
- **Correlation Analysis:** Compute and visualize the correlation matrix to understand the relationships between different features.
- **Sales Trend Analysis:** Explore the sales trends over time to identify patterns and seasonal effects.
- **Predictive Modeling:** Use machine learning models (e.g., Linear Regression, Random Forest Regressor) to predict weekly sales.
- **Interactive Predictions:** Allow users to input data and generate predictions for weekly sales using the trained models.
## Technologies Used
- **Python 🐍**
- Pandas
- NumPy
- Matplotlib
- Seaborn
- Scikit-Learn
- Streamlit
- **Development Tools**
- Jupyter Notebook
- Visual Studio Code
- Git
- GitHub
## Project Structure
- `data/` - Folder containing the dataset files.
- `images/` - Folder containing images used in the project.
- `content/` - Folder containing the different .py pages for the Streamlit app
- `app.py` - The main Streamlit application file.
- `README.md` - The file you are currently reading.
- `requirements.txt` - Python dependencies required to run the project.
## Getting Started
### Prerequisites
Make sure you have Python 3.8+ installed on your machine. You'll also need to install the dependencies listed in the `requirements.txt` file.
### Installation
1. **Clone the repository:**
```bash
git clone https://github.com/cnoret/retail-data-analysis.git
retail-data-analysis
```
3. **Install the required packages: (If you prefer, in a virtual environment)**
```bash
pip install -r requirements.txt
```
### Running the Application
1. **Navigate to the project directory:**
```bash
cd retail-data-analysis
```
2. **Run the Streamlit app:**
```bash
streamlit run app.py
```
3. **Access the application in your browser:**
- The application should automatically open in your default web browser. If not, navigate to `http://localhost:8501/` in your browser.
### Project Walkthrough
1. **Data Exploration:**
- Start by exploring the datasets used in the project. The app will display data overviews, summaries, and visualizations to help understand the data.
2. **Correlation Matrix:**
- Visualize the correlation matrix to understand the relationships between different features in the data.
3. **Sales Trend Analysis:**
- Analyze the sales trends over time to identify significant patterns and peaks.
4. **Modeling:**
- Train machine learning models to predict weekly sales based on historical data. The app allows you to choose between different models and evaluate their performance.
5. **Make Predictions:**
- Use the app to input new data and generate predictions for weekly sales using the trained models.
## License
This project is open-source and available under the [MIT License](LICENSE).