Metadata-Version: 2.1
Name: vizify
Version: 0.5.0
Summary: An automated data visualization package
Home-page: https://github.com/arun6832/vizify
Author: Arun M
Author-email: arunpappulli@gmail.com
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: pandas
Requires-Dist: numpy
Requires-Dist: seaborn
Requires-Dist: matplotlib
Requires-Dist: missingno
Requires-Dist: wordcloud
Requires-Dist: flask

# Vizify: Automated Data Analysis, Visualization, and Machine Learning

Vizify is a Python library designed to automate exploratory data analysis (EDA), statistical profiling, and predictive machine learning. It generates comprehensive static PDF reports with automated insights, serves a highly polished, interactive local web dashboard built with React and Flask, and integrates a conversational AI agent capable of writing and executing analysis code.

---

## Core Capabilities

### 1. Automated Visual Diagnostics
- **Descriptive Statistics**: Automatic computation of central tendency, spread, and missingness metrics.
- **Correlation Heatmaps**: Interactive Pearson/Spearman correlation matrices for numerical attributes.
- **Distribution Profiles**: Histograms, Kernel Density Estimators (KDE), and box plots displaying outliers.
- **Categorical Analyses**: High-resolution bar charts, pie charts, and categorical stacked comparisons.
- **Time-Series Outliers**: Temporal trend visualizations and automatic anomaly detection.

### 2. High-Performance Local Dashboard Studio
- **React + Flask SPA**: Served locally on a dynamically assigned free port, featuring a premium dark glassmorphism user interface.
- **Global Slicers**: Dynamic sidebar panels to filter the entire workspace by date ranges, category groups, or numerical ranges.
- **Interactive Visual Cards**: Native, client-side Plotly chart rendering for responsive data exploration.
- **Magic Cleaner**: Single-click utility to prune highly vacant columns, format currency values, and parse datetime structures.

### 3. No-Code Machine Learning Pipeline
- **Problem Classification**: Automatic problem detection (Regression vs. Classification) based on target attributes.
- **Advanced Preprocessing**: Scalers, categorical encoders, and missing value strategies (Mean/Median/KNN Imputation).
- **Algorithm Comparisons**: Simultaneous training and benchmarking of 5+ models (Linear/Logistic Regression, Random Forest, Decision Trees, SVM, and KNN).
- **Inference Playground**: Real-time What-If prediction sliders mapping features to instant model predictions.
- **Model Exports**: Download trained model bundles as serialized `.pkl` binary files.

### 4. Conversational AI Data Agent
- **Inline Charting**: Ask questions in plain English; the agent generates Python code, runs it in a sandboxed environment, captures console outputs, and renders interactive Plotly figures inline.
- **Per-Chart Intelligence**: Dedicated conversational interfaces below every card to interrogate specific data subsets.

---

## Installation

Install the package via pip:

```bash
pip install vizify
```

---

## International Business Use Case: Multinational Supply Chain Optimization

To demonstrate Vizify's capabilities, consider a multinational retailer analyzing its cross-border shipping delays and custom clearance times across Europe, North America, and Asia. The dataset (`supply_chain_logistics.csv`) contains logistics records including `Transit_Time_Days`, `Duty_Paid_USD`, `Shipping_Method`, `Destination_Continent`, and `Customs_Delay_Indicator` (0 for normal, 1 for delayed).

### 1. Generating a Static PDF Audit Report
To quickly share static logistics diagnostics with the executive board:

```python
from vizify import Vizify

# Initialize Vizify with the logistics dataset and Gemini API credentials
viz = Vizify("supply_chain_logistics.csv", api_key="YOUR_GEMINI_API_KEY")

# Generate and save all visualizations with AI commentary into a PDF report
viz.show_all_visualizations()
```
*Outputs: `Plots_Report.pdf` and `Plots_Report.html` containing visual summaries and automated insights.*

### 2. Launching the Local Web Studio Dashboard
For interactive data exploration and modeling, launch the Flask + React dashboard:

```python
from vizify import Vizify

# Start the local server and open the browser automatically
Vizify.launch_dashboard("supply_chain_logistics.csv")
```

Within the local dashboard, you can:
- **Filter Regions**: Use the sidebar global filters to restrict metrics exclusively to `Destination_Continent = 'Europe'`.
- **Magic Clean**: Convert unformatted currency columns (`Duty_Paid_USD` containing '$' or commas) to clean floats.
- **Train a Delay Predictor**: Navigate to the ML Studio tab, select `Customs_Delay_Indicator` as the classification target, select input variables, check the Random Forest classifier, and run training. Evaluate the confusion matrix and adjust transit sliders in the What-If Playground to simulate delay probabilities.
- **Interrogate the Data Agent**: Go to the AI Data Agent tab and enter: *"Plot the average transit time by shipping method for Europe as a bar chart and describe the insights."* The agent writes the code, runs the analysis, and displays the interactive chart.

---

## Technical Dependencies

Vizify relies on the following standard libraries:
- **Data Engineering**: `pandas`, `numpy`
- **Visualization**: `matplotlib`, `seaborn`, `plotly`
- **Machine Learning**: `scikit-learn`
- **PDF Generation**: `reportlab`, `fpdf2`
- **Local Server**: `flask`
- **GenAI Engine**: `google-genai`
