Metadata-Version: 2.4
Name: data_advisor
Version: 0.5.0
Summary: Autonomous Dataset Auditor, Diagnostic Engine & Practical Exam Code Bank for timed lab and practical examinations.
Author: Principal Data Science Architect
License-Expression: MIT
Keywords: data-analysis,eda,data-science,hypothesis-testing,code-generation,machine-learning,automated-eda,pandas,scipy,scikit-learn
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
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: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Software Development :: Code Generators
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: pandas>=1.3.0
Requires-Dist: numpy>=1.20.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: scikit-learn>=1.0.0
Requires-Dist: matplotlib>=3.4.0
Requires-Dist: seaborn>=0.11.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"

# DataAdvisor (`data-advisor` v0.5.0)

> **Autonomous Dataset Auditor, Diagnostic Engine & IoT Exam Code Bank**  
> Engineered for students, practitioners, and engineers during timed practical examinations and data analysis tasks.  
> **100% Offline**: Requires **zero internet connection** to inspect datasets, search code, or retrieve solutions.

---

## ⚡ Quickstart

### 1. Search Any Keyword Across the Code Bank
Search instantly across all IoT questions, Arduino sketches, Python protocols, and Machine Learning models:
```bash
# Terminal CLI:
data-advisor --search "dht22"
data-advisor --search "coap"
data-advisor --search "mqtt"
data-advisor --search "random forest"
data-advisor --list                    # List all 36 available modules
```

Or inside a Python script / Jupyter Notebook:
```python
from data_advisor import search

# List all available questions and experiments:
search()

# Search for any topic or keyword:
search("dht22")
search("coap")
search(["esp32", "mqtt"])
```

---

### 2. View / Retrieve Complete Question & Code Files (`get_file`)
Retrieve the full question statement, README setup instructions, and all source codes:
```bash
# Terminal CLI:
data-advisor --get Q1
data-advisor --get Q3
data-advisor --get CQ1
data-advisor --get SQ1
data-advisor --get 15 --line-numbers
```

Or inside Python:
```python
from data_advisor import get_file, read_file

# Print the complete question, instructions, and clean code:
get_file("CQ1")
get_file("Q3", line_numbers=True)

# Or return the content as a string:
content = read_file("08")
```

---

### 3. Audit Any Exam Dataset & Generate Python Code (`data_advisor`)
When given an unknown dataset (CSV, TSV, Excel, Parquet):
```bash
# Terminal CLI: Print diagnostic report + executable Python solution:
data-advisor exam_dataset.csv --code

# Specify target column and save generated Python script to a file:
data-advisor exam_dataset.csv --target churn --output solution.py
```

Or inside Python:
```python
from data_advisor import data_advisor

# 1-Line: Outputs diagnostic report AND prints full executable Python code:
data_advisor("exam_dataset.csv")

# With target variable and script export:
data_advisor("exam_dataset.csv", target="churn", output_script="solution.py")
```

---

## 📦 Android Practical Code Bank (38 Comprehensive Programs)

The `code_bank/` directory contains **38 practical programs** and a master `combined.txt`:

| # | Program File | Topic / Description |
|---|:---|:---|
| **1** | `01_NameDisplay.txt` | Displays Name and Email ID |
| **2** | `02_MarksCalculate.txt` | Calculate Total and Average Marks of 3 Subjects |
| **3** | `03_AndroidLayouts.txt` | Android Layouts Demonstration |
| **4** | `04_Calculator.txt` | Simple Calculator App |
| **5** | `05_TextColorChange.txt` | Text Color Change on Button Click |
| **6** | `06_DateTimeLinear.txt` | Date and Time Display in LinearLayout |
| **7** | `07_ToastMessage.txt` | Toast Message on Activity Launch |
| **8** | `08_AlertBox.txt` | Alert Dialog Box |
| **9** | `09_GreetingCard.txt` | Greeting Card with Image Display |
| **10** | `10_PlayAudioVideo.txt` | Audio Player App |
| **11** | `11_OnlineVideo.txt` | Video Stream Player from URL |
| **12** | `12_OptionsMenu.txt` | Options Menu Demonstration |
| **13** | `13_ContextMenu.txt` | Context Menu for Background Color Change |
| **14** | `14_CheckBoxRadioButton.txt` | RadioButton and CheckBox Demonstration |
| **15** | `15_ButtonClickNewActivity.txt` | Launch New Activity on Button Click |
| **16** | `16_StudentActivity.txt` | Pass Student Data to New Activity |
| **17** | `17_EmployeeActivity.txt` | Calculate Employee Salary in New Activity |
| **18** | `18_CustomBroadcast.txt` | Custom Intent Broadcast Receiver |
| **19** | `19_AirplaneMode.txt` | System Intent Broadcast (Airplane Mode) |
| **20** | `20_BatteryLow.txt` | System Intent Broadcast (Battery Low) |
| **21** | `21_AlarmClock.txt` | Alarm Clock Application |
| **22** | `22_ContactDisplay.txt` | ListView Contact Display |
| **23** | `23_FoodOrderApp.txt` | Food Ordering Application |
| **24** | `24_ThreeActivityApp.txt` | Three Activity Navigation Flow |
| **25** | `25_StudentDatabase.txt` | SQLite Student Database (Insert & View) |
| **26** | `26_LibraryManagement.txt` | Library Management SQLite System |
| **27** | `27_ProductDatabase.txt` | Product Database with ListView & GridView |
| **28** | `28_CounterApp.txt` | Counter Application |
| **29** | `29_TextToSpeechApp.txt` | Text-to-Speech Engine |
| **30** | `30_AsynchronousTask.txt` | Background AsyncTask Execution |
| **31** | `31_LoginRegistration.txt` | Login & Registration with SQLite Database |
| **32** | `32_FlashLightApp.txt` | Camera Flashlight Controller |
| **33** | `33_ShakeColorApp.txt` | Accelerometer Shake Sensor Color Change |
| **34** | `34_CommunicationApp.txt` | SMS, Email, and Phone Call Manager |
| **35** | `35_SensorsApp.txt` | Light and Proximity Sensors Demonstration |
| **36** | `36_HallBookingSystem.txt` | Campus Hall Booking System |
| **37** | `37_HospitalManagement.txt` | Hospital Patient Management System |
| **38** | `38_StudentDatabase_CRUD.txt` | Full SQLite CRUD Student Database |
| **39** | `combined.txt` | Master Combined File with All 38 Programs |

---

## 🔒 100% Offline Capability

- **Zero Network Required**: Does not connect to the internet to run searches, load code files, or inspect datasets.
- **Local Fallback Datasets**: Machine learning scripts support local offline CSV datasets (`city_day.csv`, `PRSA_Data_...csv`, `datatraining.txt`) and include automatic synthetic data generators if dataset files are missing.
- **Local Protocol Testing**: CoAP server/client examples bind to `127.0.0.1:5683` (localhost UDP) and local MQTT uses `localhost:1883`.

---

## 🚀 Building & Publishing to PyPI

### 1. Build the Distribution
```powershell
python -m build
```
*(Generates the universal wheel `.whl` and source distribution `.tar.gz` in `dist/` bundling all 36 code bank modules, `notes.txt`, and `combined.txt`).*

### 2. Upload to PyPI
```powershell
python -m twine upload dist/*
```
- **Username**: `__token__`
- **Password**: `<paste your PyPI API token starting with pypi-...>`

---

## 💻 Installation on Other Machines

On any lab system, exam machine, or virtual environment:
```bash
# Install directly from PyPI
pip install data-advisor

# Or install locally in editable mode
pip install -e .
```

### CLI Command Summary:
| Command | Action |
|:---|:---|
| `data-advisor --list` or `-l` | List all 36 questions & files in the code bank |
| `data-advisor --search "<keyword>"` or `-s` | Search questions matching any keyword or phrase |
| `data-advisor --get <CQ1/Q3/SQ1/08>` or `-g` | Print complete question statement, setup instructions & code |
| `data-advisor <dataset.csv> --code` | Audit dataset and output complete copy-pasteable Python code |
| `data-advisor <dataset.csv> -o run.py` | Save generated Python data science pipeline to `run.py` |
