This project is a sales performance dashboard built using Streamlit. It allows users to visualize and analyze sales data stored in a PostgreSQL database. The dashboard provides key metrics, visualizations, and raw data to help understand sales performance over time.
dashboard.mp4
- Interactive Dashboard: User-friendly interface to explore sales data.
- Key Metrics: Displays total revenue, total orders, average order value, and top category.
- Dynamic Visualizations:
- Revenue Over Time: Line chart showing revenue trends.
- Revenue by Category: Bar chart displaying revenue distribution across categories.
- Top Products: Pie chart highlighting top-selling products.
- Data Filtering: Filter data by date range, category, and product.
- Raw Data View: Table view to explore the raw sales data.
- CSV Export: Export filtered data to CSV for further analysis.
-
Clone the repository:
git clone https://github.com/realshubhamraut/Sales-Performance-Analytics-Dashboard.git cd Sales-Performance-Analytics-Dashboard -
Install the required packages:
pip install -r requirements.txt
-
Set up PostgreSQL database:
- Ensure PostgreSQL is installed and running on your machine.
- Create a database named
sales_db. - Update the
DB_CONFIGdictionary in generate_data.py and app.py with your PostgreSQL credentials if they differ.
-
Generate and insert data:
python generate_data.py
-
Run the Streamlit app:
streamlit run app.py
-
Open your browser and navigate to
http://localhost:8501to view the dashboard.
- generate_data.py: Script to generate and insert sales data into the PostgreSQL database.
- app.py: Streamlit application to visualize and analyze sales data.
- requirements.txt: List of required Python packages.
- generated_data.csv: CSV file containing the generated sales data.
- README.md: Project documentation.
- Streamlit
- Pandas
- Matplotlib
- Psycopg2-binary
- Polars
- Numpy