Metadata-Version: 2.4
Name: bizlens
Version: 2.2.15
Summary: Educational descriptive analytics + statistical inference + process mining. Rich tables, diagnostic checks, hypothesis testing, and business process analysis for teaching and analysis.
Home-page: https://github.com/solutiongate-learn/bizlens
Author: Sudhanshu Singh
Author-email: Sudhanshu Singh <cc9n8y8tqc@privaterelay.appleid.com>
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: Bug Tracker, https://github.com/solutiongate-learn/bizlens/issues
Project-URL: PyPI, https://pypi.org/project/bizlens/
Keywords: analytics,statistics,education,business-intelligence,descriptive-analytics,eda,data-visualization,outlier-detection,normality-test,synthetic-data,process-mining,teaching,sample-vs-population,skewness,data-science
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Education
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: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.21.0
Requires-Dist: pandas>=1.5.0
Requires-Dist: scipy>=1.9.0
Requires-Dist: statsmodels>=0.13.0
Requires-Dist: matplotlib>=3.6.0
Requires-Dist: seaborn>=0.12.0
Requires-Dist: plotly>=5.0.0
Requires-Dist: networkx>=2.6.0
Requires-Dist: scikit-learn>=1.0.0
Requires-Dist: rich>=13.0.0
Provides-Extra: jupyter
Requires-Dist: jupyter>=1.0.0; extra == "jupyter"
Requires-Dist: ipython>=7.30.0; extra == "jupyter"
Requires-Dist: ipykernel>=6.0.0; extra == "jupyter"
Provides-Extra: stats-advanced
Requires-Dist: phik>=0.11.0; extra == "stats-advanced"
Provides-Extra: process-mining
Requires-Dist: pm4py>=2.7.0; extra == "process-mining"
Provides-Extra: full
Requires-Dist: jupyter>=1.0.0; extra == "full"
Requires-Dist: ipython>=7.30.0; extra == "full"
Requires-Dist: ipykernel>=6.0.0; extra == "full"
Requires-Dist: phik>=0.11.0; extra == "full"
Requires-Dist: pm4py>=2.7.0; extra == "full"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: flake8>=6.0; extra == "dev"
Requires-Dist: mypy>=0.990; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# BizLens 📊

**Business analytics, statistical inference, and process mining — all in one package**

BizLens is a Python library for business analysts, data scientists, educators, and students. It delivers professional statistical analysis, beautiful Rich tables, and built-in support for business process mining — all with a single `pip install`.

---

## 🚀 Open in Google Colab — No Installation Needed

Click any link to launch a notebook instantly in your browser:

### Core Analytics

| Notebook | Colab Link | What You'll Learn |
|----------|-----------|-------------------|
| **Quick Start** | [![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) | Overview, frequency tables, outlier detection |
| **Descriptive Analytics** | [![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_Descriptive_Analytics.ipynb) | Frequency, percentile, contingency, data profile |
| **Statistical Inference** | [![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_Statistica_Inference.ipynb) | Confidence intervals, t-tests, ANOVA, correlation |
| **Chi-Square & Association** | [![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) | Chi-square, contingency tables, Cramér's V |
| **Probability & Distributions** | [![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) | Distribution fitting, simulation, sampling |

### Machine Learning

| Notebook | Colab Link | What You'll Learn |
|----------|-----------|-------------------|
| **Linear & Multiple Regression** | [![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) | OLS regression, diagnostics, predictions |
| **Logistic Regression** | [![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_Logistics_Regression.ipynb) | Binary classification, ROC, confusion matrix |
| **Decision Trees & Random Forests** | [![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) | Tree models, feature importance, ensembles |
| **PCA & Clustering** | [![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) | Dimensionality reduction, K-Means, DBSCAN |
| **Conjoint Analysis** | [![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) | Preference modeling, attribute utilities |
| **Q-Learning** | [![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) | Reinforcement learning basics, Q-table |

### Process Mining

| Notebook | Colab Link | What You'll Learn |
|----------|-----------|-------------------|
| **Process Mining** | [![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_Process_Mining.ipynb) | Case metrics, bottlenecks, variants, resources |
| **Process Mining (Advanced)** | [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/solutiongate-learn/bizlens/blob/main/notebooks/New2_Process_Mining.ipynb) | BizLens + optional pm4py integration |

> All notebooks auto-install BizLens on first run — just click the Colab badge and run the first cell.

---

## 💾 Installation

```bash
pip install bizlens
```

```bash
# With process mining extras (pm4py)
pip install bizlens[process-mining]
```

```bash
# Latest from source
git clone https://github.com/solutiongate-learn/bizlens.git
cd bizlens && pip install -e .
```

---

## 📦 Modules at a Glance

| Module | Key Functions |
|--------|--------------|
| `bl.tables` | `frequency_table`, `percentile_table`, `contingency_table`, `summary_statistics` |
| `bl.diagnostic` | `detect_outliers`, `normality_test`, `correlation_analysis`, `missing_value_analysis` |
| `bl.inference` | `confidence_interval`, `two_sample_ttest`, `anova_test`, `paired_ttest`, `correlation_test` |
| `bl.process_mining` | `case_metrics`, `variant_discovery`, `bottleneck_analysis`, `resource_analysis` |
| `bl.quality` | `data_profile`, `completeness_report`, `consistency_check` |
| `bl.describe()` | Smart all-in-one data exploration |

---

## 💡 Quick Examples

```python
import bizlens as bl
import pandas as pd

# Load a built-in teaching dataset (returns pandas DataFrame)
df = bl.load_dataset('titanic')   # or 'tips', 'iris', 'penguins', 'diamonds', 'mpg'

# Frequency distribution
bl.tables.frequency_table(df['sex'])

# Summary statistics
bl.tables.summary_statistics(df[['age', 'fare']])

# Contingency table with chi-square test
table, stats = bl.tables.contingency_table(df, 'sex', 'survived')
print(f"Chi² = {stats['chi2']:.3f}, p = {stats['p_value']:.4f}, Cramér's V = {stats['cramers_v']:.3f}")

# Data quality profile
bl.quality.data_profile(df)

# Confidence interval
import numpy as np
bl.inference.confidence_interval(df['age'].dropna(), confidence=0.95)

# Two-sample t-test
bl.inference.two_sample_ttest(df[df['sex']=='male']['fare'], df[df['sex']=='female']['fare'])
```

### Process Mining

```python
# Load a built-in event log (returns pandas DataFrame)
event_log = bl.generate_hr_onboarding_event_log()

bl.process_mining.case_metrics(event_log)
bl.process_mining.bottleneck_analysis(event_log)
bl.process_mining.variant_discovery(event_log)
bl.process_mining.resource_analysis(event_log, resource_col='resource')
```

### Polars Users

```python
# BizLens also accepts polars DataFrames
import polars as pl
df_pl = pl.from_pandas(bl.load_dataset('titanic'))
bl.tables.frequency_table(df_pl['sex'])     # works transparently
bl.quality.data_profile(df_pl)              # works transparently
```

---

## 🔄 Supported Environments

| Environment | Status |
|------------|--------|
| Google Colab | ✅ Recommended |
| Jupyter Notebook / JupyterLab | ✅ Full |
| VS Code (Jupyter extension) | ✅ Full |
| Terminal / scripts | ✅ Full |

---

## 📊 Version

- **Current**: 2.2.13
- **Python**: 3.9+
- **License**: MIT

---

## 📞 Support

- **Issues**: [GitHub Issues](https://github.com/solutiongate-learn/bizlens/issues)
- **Discussions**: [GitHub Discussions](https://github.com/solutiongate-learn/bizlens/discussions)
- **PyPI**: [pypi.org/project/bizlens](https://pypi.org/project/bizlens/)

---

**Made with ❤️ for business analysts, data scientists, and students**
