🌱 Agro-Data-Intelligence (v0.2.1)
Welcome to the agro-data-intelligence framework! This package is designed to make data auditing, cleaning, and Explainable Machine Learning (XAI) for agricultural datasets incredibly simple, robust, and professional.
🏆 Test Results & Reliability
We take data integrity seriously. This package is fully tested:
- Unit & Integration Tests: ✅ Passed (100% success rate)
- Real Dataset Tests: ✅ Passed (Handles missing, duplicate, and extreme bounds seamlessly)
- Code Coverage: 🛡️ 87% Code Coverage
📥 1. Installation & Setup
Install the package via PyPI and import it alongside pandas.
# Install from PyPI (Terminal)
pip install agro-data-intelligence
# In your Python script / Jupyter Notebook
import pandas as pd
import data_audit # Registers the 'audit' accessor automatically
🔍 2. Scanning Data for Issues (scan)
The first step is to scan the dataset for missing values, duplicates, and outliers.
# Load your dataset
df = pd.read_csv("agricultural_data.csv")
# Scan the data
issues = df.audit.scan()
# View the issues
print(issues)
🛠️ 3. Fixing the Data (fix)
Once the data is scanned, users can fix the issues. There are three modes:
A. Auto Mode (Default)
Automatically fills missing values (median/mode) and clips outliers.
df.audit.fix(mode='auto')
B. Suggest Mode
Doesn't change the data, but suggests what should be done.
suggestions = df.audit.fix(mode='suggest')
print(suggestions)
C. Manual Mode (Professional Syntax)
Allows the user to precisely fix data by using the sid (Specific ID) helper.
from data_audit import sid
df.audit.fix(
mode="manual",
fixes=[
sid(10, 120.0), # Fix Issue ID 10 -> Replace with 120.0
sid("Soil_Type", "Loamy"), # Fill missing values in 'Soil_Type' with 'Loamy'
sid((15, "Age"), 99.0), # Change row 15, column 'Age' directly to 99.0
sid(12, "ignore") # Explicitly ignore Issue ID 12
]
)
📊 4. Generating Reports (summary & report)
Users can generate detailed statistical summary and audit reports.
# Quick statistical summary of the dataframe
print(df.audit.summary())
# Full audit report (Including ML status)
print(df.audit.report())
🤖 5. Machine Learning & AI (ml)
The package has an integrated Machine Learning module that automatically configures models based on your data.
Recommend a Model
Find the best model for your target variable based on dataset size and distribution:
print(df.audit.ml.recommend(target='Crop_Yield'))
Train a Model
# Tell the model what column you want to predict
df.audit.ml.train(target='Crop_Yield')
Evaluate the Model
See how well the model performed (Accuracy, F1-Score, R2 Score, RMSE, etc.).
print(df.audit.ml.evaluate())
Explain Predictions (XAI)
Explain why the model made a specific prediction for a specific row of data.
# Get a single row of data (e.g., the first farm in the dataset)
local_farm_data = df.iloc[0:1]
# Explain the prediction
explanation = df.audit.ml.explain(local_data=local_farm_data)
print(explanation)
👽 6. Finding Anomalies (anomaly)
Find completely weird or unusual rows in the dataset using Unsupervised Machine Learning (Isolation Forests).
# Get the rows that are considered severe anomalies
weird_farms = df.audit.anomaly()
print(weird_farms)
📜 7. Viewing History Log (history)
Users can see a trail of every action the auditor performed on their data.
print(df.audit.history())
📜 License
This project is licensed under the strict open-source AGPL-3.0 License. Any commercial online service utilizing this package must disclose their modified source code.
Metadata
Release files for agro-data-intelligence 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| agro_data_intelligence-0.2.2.tar.gz | 22.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agro_data_intelligence-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.7 kB
Release files / agro_data_intelligence-0.2.2.tar.gz
| Download URL | agro_data_intelligence-0.2.2.tar.gz |
|---|---|
| Size | 22.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f01ab0ae2dc59005ae09ef4c57db9d830f8f1fa21940c5e00e497f26f9afd4f1
|
|
BLAKE2b-256 checksum How to use checksums |
279c7c811cbead55bf10a9d7c15795e925f22b05f907db8802b539e8169843a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / agro_data_intelligence-0.2.2-py3-none-any.whl
| Download URL | agro_data_intelligence-0.2.2-py3-none-any.whl |
|---|---|
| Size | 21.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4050031fae4620fda5a8143a48e72fb526567737cd58266e0c0143490615425a
|
|
BLAKE2b-256 checksum How to use checksums |
9bb96dafef52a1b6dfe64ec0a59f335bb4f55e29304045bebc6f3ba765092e1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for agro-data-intelligence 0.2.2
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.