Skip to main content

DataAdvisor (data-advisor v0.4.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:

# 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:

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:

# 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:

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):

# 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:

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")

📄 Master Files in Root Directory

  • combined.txt: A single master file combining all 36 code modules with zero comments inside code blocks (ready for direct copy-pasting), searchable jump tags ([EXPERIMENT XX], [QUESTION QX], [COMBINED QUESTION CQX], [SIMPLE QUESTION SQX]), and an interactive Table of Contents.
  • notes.txt: Complete IoT practical examination cheat sheet covering one-time pip install commands, terminal execution order, protocol port mappings (CoAP 5683, MQTT 1883, Streamlit 8501), dataset-to-model feature matrices, Supabase REST syntax, and common exam error fixes.

📦 IoT Code Bank Architecture (36 Comprehensive Modules)

The code_bank/ directory contains 36 comprehensive modules divided into four logical tiers:

Complete Index of All 36 Modules:

Part 1: Standard Lab Experiments (01 to 17)

# Question File Category / Topic Included Code Files
1 01_dht22_serial.txt ESP32 DHT22 Temperature & Humidity (Serial) 1. sketch.ino, 2. diagram.json, 3. libraries.txt
2 02_ldr_serial.txt ESP32 LDR Light Intensity Monitoring 1. sketch.ino, 2. diagram.json
3 03_pir_serial.txt ESP32 PIR Motion Detection 1. sketch.ino, 2. diagram.json
4 04_mqtt_esp32_python.txt ESP32 MQTT Publisher & Python Subscriber 1. sketch.ino, 2. subscriber.py, 3. diagram.json, 4. libraries.txt
5 05_http_rest_supabase.txt HTTP REST API Cloud Storage & Web Dashboard 1. send_http_data.py, 2. app_http.py
6 06_mqtt_cloud_dashboard.txt MQTT Cloud Bridge & Streamlit Dashboard 1. publisher.py, 2. mqtt_bridge.py, 3. app.py
7 07_thingsboard_simulation.txt ThingsBoard MQTT Telemetry Simulation 1. simulate_thingsboard.py, 2. environmental_dashboard.json
8 08_coap_server_client_dashboard.txt CoAP Server & Client Dashboard 1. server.py, 2. client.py
9 09_mqtt_hivemq_mosquitto_dual.txt Dual MQTT (HiveMQ Public & Mosquitto Local) 1. dual_broker.py
10 10_coap_openmeteo_cloud.txt CoAP Environmental Monitoring & Cloud DB 1. server.py, 2. app.py
11 11_iss_tracker.txt Real-Time ISS Location Tracker & Plotter 1. iss_tracker.py
12 12_earthquake_dashboard.txt USGS Earthquake Analysis Dashboard 1. app.py
13 13_weather_analysis.txt Open-Meteo Weather Trend Visualizations 1. weather_analysis.py
14 14_air_quality_kochi.txt Kochi Air Quality Dashboard (PM2.5, PM10, AQI) 1. app.py
15 15_decision_tree_occupancy.txt Decision Tree Room Occupancy Classifier 1. occupancy_cli.py, 2. occupancy_app.py
16 16_linear_regression_beijing.txt Linear Regression Temperature Prediction 1. temperature_cli.py, 2. temperature_app.py
17 17_random_forest_air_quality.txt Random Forest 6-Class Air Quality Classifier 1. air_quality_cli.py, 2. air_quality_app.py

Part 2: Official Practical Exam Questions (Q1 to Q4)

# Question File Category / Topic Included Code Files
18 Q1_dht22_temperature_humidity.txt Section A: Q1 DHT22 Monitoring [30M] 1. sketch.ino, 2. diagram.json, 3. libraries.txt
19 Q2_ldr_light_intensity.txt Section A: Q2 LDR Intensity [30M] 1. sketch.ino, 2. diagram.json
20 Q3_coap_air_quality_random_forest.txt Section B: Q3 CoAP Air Quality & RF [30M] 1. server.py, 2. client.py, 3. app.py
21 Q4_coap_weather_decision_tree.txt Section B: Q4 CoAP Weather & DT [30M] 1. server.py, 2. client.py, 3. app.py

Part 3: Combined 2-Topic Exam Questions (CQ1 to CQ8)

# Question File Category / Combination Included Code Files
22 CQ1_coap_linear_regression.txt CoAP + Linear Regression + Streamlit 1. server.py, 2. client.py, 3. app.py
23 CQ2_coap_decision_tree_occupancy.txt CoAP + Decision Tree (Occupancy) + Streamlit 1. server.py, 2. client.py, 3. app.py
24 CQ3_mqtt_decision_tree_occupancy.txt MQTT + Decision Tree (Occupancy) + Streamlit 1. publisher.py, 2. subscriber.py, 3. app.py
25 CQ4_mqtt_random_forest_air_quality.txt MQTT + Random Forest (AQI) + Streamlit 1. publisher.py, 2. subscriber.py, 3. app.py
26 CQ5_mqtt_linear_regression.txt MQTT + Linear Regression (Temp) + Streamlit 1. publisher.py, 2. subscriber.py, 3. app.py
27 CQ6_esp32_serial_ml_occupancy.txt ESP32 Serial (DHT22+LDR) + Decision Tree + Streamlit 1. esp32_sensors.ino, 2. serial_classifier.py, 3. app.py
28 CQ7_mqtt_supabase_cloud.txt MQTT + Supabase Cloud DB + Streamlit 1. publisher.py, 2. mqtt_bridge.py, 3. app.py
29 CQ8_coap_supabase_cloud.txt CoAP + Supabase Cloud DB + Streamlit 1. server.py, 2. client_bridge.py, 3. app.py

Part 4: Minimal Diagnostic & Verification Scripts (SQ1 to SQ7)

# Question File Target Technology Tested Included Code Files
30 SQ1_supabase_crud.txt Supabase Cloud REST POST & GET Connection 1. test_supabase.py
31 SQ2_streamlit_minimal.txt Streamlit Dashboard Layout, Metrics & Alert Badges 1. test_app.py
32 SQ3_coap_minimal.txt Asynchronous CoAP Server & Client Pair (aiocoap) 1. server.py, 2. client.py
33 SQ4_mqtt_minimal.txt MQTT Publisher & Subscriber Pair (paho-mqtt) 1. publisher.py, 2. subscriber.py
34 SQ5_ml_minimal.txt Decision Tree, Random Forest & Linear Regression 1. test_models.py
35 SQ6_openmeteo_api.txt Direct Open-Meteo REST API Ingestion (requests) 1. test_api.py
36 SQ7_esp32_serial.txt ESP32 Serial JSON Transmitter & Python Listener 1. sketch.ino, 2. read_serial.py

🔒 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

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

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:

# 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

Metadata

Release files for data-advisor 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for data-advisor 0.4.0
File Size Uploaded Provenance Actions
data_advisor-0.4.0.tar.gz 146.1 kB Without provenance Details for data_advisor-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for data-advisor 0.4.0
File Interpreter ABI Platform Actions
data_advisor-0.4.0-py3-none-any.whl Python 3 none any Details for data_advisor-0.4.0-py3-none-any.whl

Total release size: 276.5 kB

Release files / data_advisor-0.4.0.tar.gz

Download URL data_advisor-0.4.0.tar.gz
Size 146.1 kB
Tags Source
SHA-256 checksum
How to use checksums
87916db3418396b124cea10d1df7e3309f3b4b36d1999246d972789cbe6057d0
BLAKE2b-256 checksum
How to use checksums
4943d1c0216a8a105047436ba030921ed6ced23c19b7f9c5f2996e9d3ebbddd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / data_advisor-0.4.0-py3-none-any.whl

Download URL data_advisor-0.4.0-py3-none-any.whl
Size 130.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
875136162556b3dfda6a1a6ab981cfbf792c45019f38fc6f812e098f6fa06d41
BLAKE2b-256 checksum
How to use checksums
7d9d4fee815c9750b982581ed892557cd0f30e0c32d6f2bd09e4db2d647395a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Security for data-advisor 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page