An end-to-end exploratory data analysis of ~9,800 orders from a US retail superstore (2015–2018), going beyond a revenue-only view to find where the business is actually profitable — and where it isn't. Includes a Jupyter notebook, a reusable analysis script, and a live interactive Streamlit dashboard.
▶ Live dashboard • 📓 Notebook • 📄 One-page summary 📊 View on Kaggle
- Project Purpose
- Key Findings
- Interactive Dashboard
- Repository Structure
- Tech Stack
- How to Run
- Data & Methodology
- Further Improvements
Most public "Superstore" EDA projects stop at "which category sells the most?". This one goes a step further and asks the questions a business stakeholder actually needs answered:
- Which customer segments and individuals generate the most revenue and lifetime value — not just the most orders?
- Which product categories are genuinely profitable, and which are quietly losing money?
- Does discounting help or hurt the bottom line, and at what threshold does it flip?
- Which regions look strong on sales but are actually unprofitable?
- How has the business trended year over year, and what's the seasonal pattern?
| Metric | Value |
|---|---|
| Total Sales | $2.26M |
| Total Profit | $278,979 |
| Overall Profit Margin | 12.3% |
| Orders / Unique Customers | 4,922 / 793 |
| Repeat Customer Rate | 98.4% |
1. Furniture is a volume trap. It's the #2 category by revenue but dead last by profit — Tables (-9.0% margin) and Bookcases (-3.0% margin) are outright loss-making.
2. Discounts above ~20% destroy profit. Average profit per order goes negative once discount exceeds 0.2, and the 30-50% band loses ~$157 per order on average.
3. Texas, Ohio, Pennsylvania and Illinois are profitability blind spots — all top-10 states by sales, all net-negative on profit.
4. Growth resumed strongly after a 2016 dip: sales fell 4.3% in 2016, then grew 30.6% (2017) and 20.3% (2018). A SARIMA forecast projects the next 6 months, including the seasonal Jan/Feb dip seen every prior year.
5. Customer segmentation & CLTV: Consumers are the largest segment by headcount and revenue, but Corporate customers carry the highest average lifetime value per customer.
Full workings, RFM customer tiering, shipping-mode analysis, and the discount/geography/time-series breakdowns are in the notebook.
A Streamlit dashboard lets you filter by date range, segment, category and region, with live KPIs, profitability breakdowns, a US profit/sales choropleth, and time-trend charts.
streamlit run dashboard/app.pyOr run it as a container, no local Python setup needed:
docker run -p 8501:8501 ghcr.io/subhranshupan/super-store-data-analysis-project:latest(Published automatically by .github/workflows/release.yml on every version tag - see Packages.)
Live demo: deployed for free on Streamlit Community Cloud - link added here once deployed (see the Deployment step in Further Improvements below).
.
├── .github/workflows/
│ ├── ci.yml # lint + test + smoke-run on every push/PR
│ └── release.yml # on version tag: publish wheel/sdist + Docker image
├── .streamlit/
│ └── config.toml # dashboard theme, used on Streamlit Cloud too
├── superstore/ # shared package - single source of truth
│ ├── data.py # load_data / clean_data
│ └── forecast.py # forecast_monthly_sales (SARIMA)
├── data/
│ ├── superstore_sales.csv # cleaned, enriched dataset
│ └── README.md # data dictionary + enrichment methodology
├── notebooks/
│ └── SuperStore_Sales_Analysis.ipynb
├── scripts/
│ └── run_analysis.py # computes metrics + saves charts, using superstore/
├── dashboard/
│ └── app.py # Streamlit dashboard (Customers/Products/Geo/Trends/Forecast)
├── tests/
│ └── test_data.py, test_forecast.py, conftest.py # pytest suite (9 tests)
├── reports/
│ ├── metrics.json # all computed KPIs, machine-readable
│ ├── rfm_customer_segments.csv # per-customer RFM scores/tiers
│ ├── subcategory_profitability.csv
│ └── Executive_Summary.pdf # one-page recruiter-friendly summary
├── assets/images/ # chart exports used in this README
├── Dockerfile / .dockerignore # containerized dashboard, published to GHCR on release
├── CHANGELOG.md
├── requirements.txt
├── requirements-dev.txt # + pytest, ruff, build
├── pyproject.toml # packaging + pytest/ruff config
└── LICENSE
- Python (Pandas, NumPy) — data cleaning and analysis
- Matplotlib / Seaborn — static charts
- Plotly — interactive choropleth, sunburst and treemap visualizations
- Statsmodels (SARIMA) — monthly sales forecasting
- Streamlit — interactive dashboard
- Jupyter Notebook — primary analysis narrative
- pytest + ruff — automated tests and linting
- GitHub Actions — CI on every push/PR, releases (PyPI-style package + Docker image) on every version tag
- Docker / GitHub Container Registry (GHCR) — the dashboard ships as a container
git clone https://github.com/SubhranshuPan/Super-Store-Data-Analysis-Project.git
cd Super-Store-Data-Analysis-Project
python -m venv .venv && source .venv/bin/activate # optional but recommended
pip install -r requirements.txt # or requirements-dev.txt to also get pytest/ruff
# Reproduce all metrics + chart images (incl. the forecast chart)
python scripts/run_analysis.py
# Explore the full narrative notebook
jupyter notebook notebooks/SuperStore_Sales_Analysis.ipynb
# Launch the interactive dashboard (Customers / Products / Geography / Trends / Forecast)
streamlit run dashboard/app.py
# Run the test suite / linter
pytest
ruff check .The base dataset ships with order, customer, product and geography attributes plus Sales, but not Profit, Discount or Quantity. Those three fields were sourced from the public "Sample – Superstore" reference dataset and merged in on Row ID, after verifying an exact match on Product ID/Customer Name/Sales for every row. Full details in data/README.md.
- Sales forecasting: a SARIMA model forecasts sales 3-12 months ahead with an 80% confidence band — see the notebook's Forecast section or the dashboard's Forecast tab.
- Automated tests:
tests/(pytest) covers the cleaning and forecasting logic insuperstore/— 9 tests, run withpytest. - CI:
.github/workflows/ci.ymllints with ruff, runs the test suite, and smoke-runsscripts/run_analysis.pyon every push/PR tomain. - Shared module: cleaning/loading logic lives once in
superstore/data.pyand is imported by the notebook,scripts/run_analysis.py, anddashboard/app.py— no more duplicated logic across the three. - Packaging & releases:
superstorebuilds as an installable wheel/sdist (pyproject.toml), and.github/workflows/release.ymlpublishes both the Python package (attached to the GitHub Release) and a Docker image of the dashboard (to GHCR, under this repo's Packages tab) on everyvX.Y.Ztag. SeeCHANGELOG.mdfor the v1.0.0 notes. - Deploy the dashboard publicly: the app, Docker image and
.streamlit/config.tomltheme are all ready — once this repo is pushed to GitHub, deploy for free at share.streamlit.io pointing atdashboard/app.pyonmain, and add the live link at the top of this README. This is the one step that needs a GitHub push + your own Streamlit account, so it's left for you to click through.
Subhranshu Panda — GitHub · open to Data Analyst / Data Science part-time and internship roles.





