Metadata-Version: 2.4
Name: bizlens
Version: 2.3.8
Summary: Teaching-first business analytics: descriptive stats, inference, classical ML, and process-mining intro with Rich tables
Author-email: Sudhanshu Singh <sudhanshu@solutiongate.in>
Maintainer-email: Sudhanshu Singh <sudhanshu@solutiongate.in>
License: MIT
Project-URL: Homepage, https://github.com/solutiongate-learn/bizlens
Project-URL: Documentation, https://github.com/solutiongate-learn/bizlens#readme
Project-URL: Repository, https://github.com/solutiongate-learn/bizlens
Project-URL: Issues, https://github.com/solutiongate-learn/bizlens/issues
Project-URL: Changelog, https://github.com/solutiongate-learn/bizlens/blob/main/CHANGELOG.md
Project-URL: RegressionExplorer, https://regression-explorer.lovable.app/
Project-URL: NLPPlayground, https://nlpplayground.streamlit.app/
Keywords: business analytics,statistics,process mining,machine learning,data analysis,descriptive analytics,education,rich tables
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Education
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas>=2.0.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: scipy>=1.10.0
Requires-Dist: statsmodels>=0.14.0
Requires-Dist: matplotlib>=3.7.0
Requires-Dist: seaborn>=0.12.0
Requires-Dist: plotly>=5.15.0
Requires-Dist: scikit-learn>=1.3.0
Requires-Dist: rich>=13.0.0
Requires-Dist: polars>=0.20.0
Requires-Dist: networkx>=2.8.0
Provides-Extra: dev
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=4.0; extra == "dev"
Requires-Dist: pytest>=7.0; extra == "dev"
Provides-Extra: streamlit
Requires-Dist: streamlit>=1.28; extra == "streamlit"
Dynamic: license-file

# BizLens 📊

**Teaching-first Python analytics for business students and practitioners**  
Descriptive · Diagnostic · Classical ML · Process mining intro · Rich tables

[![PyPI version](https://img.shields.io/pypi/v/bizlens.svg)](https://pypi.org/project/bizlens/)
[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

**Current release: v2.3.8**

BizLens is a lightweight analytics library designed for **BBA/MBA classrooms**, workshops, and reproducible demos. It focuses on clear tables, honest statistical reporting, and real teaching datasets — not an enterprise “do everything” suite.

---

## Install

```bash
pip install -U bizlens
```

Requires Python 3.9+.

```python
import bizlens as bl
print(bl.__version__)  # 2.3.5

tips = bl.load_dataset("tips")
bl.describe(tips, include_plots=False)
bl.tables.tables.frequency_table(tips["day"])
```

---

## What is in the package (honest map)

| Module | Role | Example |
|--------|------|---------|
| `tables` | Frequency, contingency, summary stats | `bl.tables.tables.frequency_table(s)` |
| `quality` | Completeness, profile, uniqueness | `bl.quality.quality.data_profile(df)` |
| `diagnostic` | Outliers, normality, missingness | `bl.diagnostic.diagnostic.detect_outliers(s)` |
| `inference` | CI, t-tests, ANOVA, correlation | `bl.inference.inference.confidence_interval(s)` |
| `eda` | Distributions, heatmaps, full report | `bl.eda.eda.full_report(df)` |
| `preprocess` | Messy-data labs, cleaning | `bl.preprocess.preprocess.make_messy_data(df)` |
| `process_mining` | Cases, variants, bottlenecks, DFG, resources | `bl.process_mining.process_mining.case_metrics(log)` |
| `ml` | Classical ML reports (sklearn) | `bl.ml.ml.linear_regression_report(...)` |
| `viz` | Notebook chart theme helpers | `bl.viz.apply_theme()` |
| `datasets` | Offline-first open tables + event-log generators | `bl.load_dataset("tips")` |
| `data_io` | CSV / Excel / public Google Sheet / open dataset loaders | `bl.data_io.load_open_dataset("penguins")` |
| `deploy` | Streamlit scaffold | `bl.deploy.deploy.streamlit_app(df, launch=False)` |

**Nested API style (by design):** `bl.<module>.<class>.<method>(...)`.

### What is *not* claimed as package features

- Full deep learning / LLM stack (use notebooks or sister apps)
- Complete BPMN/Petri-net conformance suite (`petri_net_from_log` is a teaching stub)
- Live Gradio export (not shipped)

---

## Interactive companions (sister products)

| Product | URL | Role |
|---------|-----|------|
| **Regression Explorer** | https://regression-explorer.lovable.app/ | Step-by-step OLS on business data |
| **NLPPlayground** | https://nlpplayground.streamlit.app/ | Python/R & NLP learning app |
| **Source** | https://github.com/solutiongate-learn/bizlens | Package + notebooks |

Suggested path for regression week: *Explorer (10 min) → Colab notebook (45 min) on the same sales case*.

---

## Curriculum notebooks (Colab)

Self-contained notebooks under [`notebooks/`](notebooks/). Each installs BizLens in the first code cell.

**Structure (every notebook):** Setup → **DATA (load only)** → Exploratory → Descriptive → Predictive (if applicable) → Insights → optional synthetic lab.  
**Data** is separated from analysis code; loaders support offline bundles, HTTPS CSV, Excel, and public Google Sheets.

### Foundations & descriptive / diagnostic

| Notebook | Colab | Primary data |
|----------|-------|----------------|
| [Data Prep 101](notebooks/New_Data_Prep_101.ipynb) | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/solutiongate-learn/bizlens/blob/main/notebooks/New_Data_Prep_101.ipynb) | `tips` (encoding first) |
| [Quick Start](notebooks/New_Quick_Start_bizlens.ipynb) | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/solutiongate-learn/bizlens/blob/main/notebooks/New_Quick_Start_bizlens.ipynb) | `tips` |
| [Statistical Inference](notebooks/New_Statistical_Inference.ipynb) | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/solutiongate-learn/bizlens/blob/main/notebooks/New_Statistical_Inference.ipynb) | `tips` |
| [Chi-Square](notebooks/New_ChiSquareTest.ipynb) | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/solutiongate-learn/bizlens/blob/main/notebooks/New_ChiSquareTest.ipynb) | `titanic` |
| [Probability & Distributions](notebooks/New_Probability_Distribution_Simulation.ipynb) | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/solutiongate-learn/bizlens/blob/main/notebooks/New_Probability_Distribution_Simulation.ipynb) | real then synthetic |

### Predictive (classical ML)

| Notebook | Colab | Primary data |
|----------|-------|----------------|
| [Linear & Multiple Regression](notebooks/New_Linear_Multiple_Linear_Regression.ipynb) | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/solutiongate-learn/bizlens/blob/main/notebooks/New_Linear_Multiple_Linear_Regression.ipynb) | `sales_india_store_revenue` + `tips` |
| [Logistic Regression](notebooks/New_Logistic_Regression.ipynb) | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/solutiongate-learn/bizlens/blob/main/notebooks/New_Logistic_Regression.ipynb) | `titanic` |
| [Trees & Random Forests](notebooks/New_Decision_Trees_Random_Forests.ipynb) | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/solutiongate-learn/bizlens/blob/main/notebooks/New_Decision_Trees_Random_Forests.ipynb) | `titanic` |
| [PCA & Clustering](notebooks/New_PCA_Clustering.ipynb) | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/solutiongate-learn/bizlens/blob/main/notebooks/New_PCA_Clustering.ipynb) | `penguins` |

### Prescriptive / simulation (light)

| Notebook | Colab |
|----------|-------|
| [Conjoint Analysis](notebooks/New_Conjoint_Analysis.ipynb) | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/solutiongate-learn/bizlens/blob/main/notebooks/New_Conjoint_Analysis.ipynb) |
| [Q-Learning](notebooks/New_Q_Learning.ipynb) | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/solutiongate-learn/bizlens/blob/main/notebooks/New_Q_Learning.ipynb) |

Process-mining deep dives use the synthetic generators (`generate_hr_onboarding_event_log`, etc.) — domain-realistic, not anonymous noise.

---

## Data philosophy

1. **Lead with real or identifiable data** (`tips`, `titanic`, bundled Indian sales case).  
2. **Synthetic / random only later**, labeled as a lab with known ground truth.  
3. **Process logs** from generators are *teaching simulations* with real activity names — documented as such.

```python
# Bundled regression case (positive ₹ Lakh revenue)
sales = bl.load_dataset("sales_india_store_revenue")
bl.ml.ml.linear_regression_report(
    sales,
    features=["AdSpend_Lakh", "PriceIndex", "SalesStaff", "PromoDays"],
    target="Revenue_Lakh",
)
```

---

## Development & tests

```bash
git clone https://github.com/solutiongate-learn/bizlens.git
cd bizlens
python -m pip install -e ".[dev]"  # or: pip install -e .
python -m unittest tests.test_regressions -v
```

Release process: see [DEPLOY.md](DEPLOY.md). Roadmap: [ROADMAP.md](ROADMAP.md). Changelog: [CHANGELOG.md](CHANGELOG.md).

---

## Citation / teaching use

```text
Singh, S. (2026). BizLens (Version 2.3.8) [Computer software].
https://github.com/solutiongate-learn/bizlens
```

---

## License

MIT — see [LICENSE](LICENSE).

**Made for analysts, educators, and students · Solution Gate Learn**
