Metadata-Version: 2.4
Name: vizify
Version: 0.6.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: openpyxl
Requires-Dist: xlrd
Requires-Dist: SQLAlchemy
Requires-Dist: PyMySQL
Requires-Dist: databricks-sql-connector[sqlalchemy]
Requires-Dist: flask-cors
Requires-Dist: plotly
Requires-Dist: google-genai
Requires-Dist: scikit-learn
Requires-Dist: reportlab
Requires-Dist: fpdf2
Requires-Dist: kaleido
Requires-Dist: numpy
Requires-Dist: seaborn
Requires-Dist: matplotlib
Requires-Dist: missingno
Requires-Dist: wordcloud
Requires-Dist: flask
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Vizify

Vizify is a Python data analysis library with a local interactive dashboard for exploring datasets, visualizing patterns, cleaning text, and training basic machine learning models.

## Features

- **Interactive charts:** D3 renders the dashboard charts and text visualizations; Plotly is available as an alternate view for supported charts.
- **Text analysis and cleaning:** word and n-gram frequencies, rule-based sentiment estimates, pattern extraction, TF-IDF terms, and configurable text cleaning.
- **Dataset storage:** imports are saved in a persistent SQLite workspace. CSV files and SQL query results are ingested in chunks; table browsing is paginated in SQL.
- **File sources:** CSV, Excel `.xlsx`, and Excel `.xls`.
- **Database sources:** MySQL and Databricks SQL Warehouse. Query results are imported as a local snapshot into SQLite.
- **Profiling and cleaning:** column summaries, missing values, filters, and a Magic Clean operation.
- **Machine learning:** basic regression and classification training, evaluation, live predictions, and model export.
- **AI analysis:** Gemini powered chart interpretation and a conversational data agent.

## Install

Install from PyPI:

```bash
pip install vizify
```

For development, install the Python dependencies and build the bundled dashboard:

```bash
pip install -r requirements.txt
cd frontend
npm install
npm run build
```

The dashboard is bundled into `vizify/static` and served by the local Flask server.

## Gemini API key

Vizify checks for a key in this order:

1. `GEMINI_API_KEY` environment variable.
2. The path in `VIZIFY_API_KEY_FILE`, if set.

`API.key` is reserved for PyPI publishing and is never used as a Gemini key or included in the Python package. For Gemini, use the environment variable or point `VIZIFY_API_KEY_FILE` to a separate local key file. The dashboard’s sidebar also accepts a key for the current session. Keep all key files out of source control and do not publish them.

PowerShell example:

```powershell
$env:GEMINI_API_KEY = "your-key"
```

## Launch the dashboard

```python
from vizify import Vizify

Vizify.launch_dashboard("sales.csv")
```

You can also pass a pandas dataframe:

```python
import pandas as pd
from vizify import Vizify

data = pd.read_excel("sales.xlsx")
Vizify.launch_dashboard(df=data)
```

The dashboard opens in your browser. Upload CSV or Excel data in the sidebar, or choose **Connect to MySQL / Databricks** to import a query result.

## Connect to a database

Open the Data Source panel, select MySQL or Databricks SQL Warehouse, enter the connection details, and provide a `SELECT` query. For example:

```sql
SELECT region, order_date, amount
FROM sales
WHERE order_date >= '2025-01-01'
```

MySQL uses a host, port, database, username, and password. Databricks uses the workspace hostname, access token, SQL warehouse HTTP path, and optional catalog and schema. The connector dependencies are installed with Vizify. Credentials are only used for the import request; they are not written to the SQLite workspace. The imported query result is a snapshot. Run the query again to refresh it.

## SQLite workspace

By default, Vizify stores the active dataset in:

```text
~/.vizify/workspace.sqlite3
```

Set `VIZIFY_DATA_DIR` to choose another directory. The active dataset is restored when the dashboard restarts. Table browsing and filtering use SQLite; full-data charting, text analysis, and model training load data into pandas as needed, so those operations still use memory proportional to the data being analyzed.

The engine and NLP processor are also available directly:

```python
from vizify import SQLiteDataEngine, NLPProcessor

engine = SQLiteDataEngine()
metadata = engine.ingest_csv("sales.csv", filename="sales.csv")
page = engine.get_paginated_data(page=1, limit=50)
```

## Python report example

```python
from vizify import Vizify

report = Vizify("sales.csv", api_key=None)  # Uses configured Gemini key when available
report.show_all_visualizations()
```

## Package contents

The Python distribution contains the dashboard frontend build under `vizify/static`. It does not contain local datasets, SQLite workspaces, or API key files.
