Skip to main content

🌊 AI-Aquatica

PyPI version Downloads DOI Documentation License: MIT PyPI Downloads CI GitHub release (latest by date)

AI-Aquatica is a comprehensive open-source Python library designed to analyze water quality data using advanced AI and statistical tools.
It facilitates preprocessing, modeling, visualization, and reporting of hydrochemical datasets with minimal effort – empowering researchers and professionals in hydrology, ecology, and environmental monitoring.


✨ Features

  • ✅ Data Import: Load datasets from CSV, Excel, JSON, SQL, NoSQL, and APIs.
  • 🧼 Data Cleaning: Remove duplicates and handle missing values via multiple strategies.
  • 📏 Data Standardization: Normalize and standardize data (Z-score, MinMax, log, sqrt, Box-Cox).
  • 🧠 Missing Data Imputation: Fill gaps with:
    • Mean, Median, Mode
    • KNN Imputer
    • Regression Imputer
    • Autoencoder Neural Network
  • ⚖️ Ion Balance: Detect chemical inconsistencies and auto-correct based on ionic ratios.
  • 📊 Statistical Analysis: Get descriptive statistics, correlation matrices, ANOVA, time series decomposition.
  • 🤖 AI/ML Modeling:
    • Regression & Classification (Logistic, SVM, Tree, RF)
    • Clustering (KMeans, DBSCAN)
    • Anomaly Detection (LOF, Isolation Forest)
    • Synthetic Data (GAN-based generation)
  • 📈 Visualization:
    • Basic: Line, Bar, Pie, Scatter, Heatmaps
    • Advanced: PCA, t-SNE, Interactive Bubble Charts
  • 📝 Report Generation:
    • Automatic HTML reports (statistics, ML evaluation, recommendations)

🛠 Installation

pip install ai-aquatica

Optional extras provide deep-learning and interactive visualization support:

# Install TensorFlow-powered utilities
pip install "ai-aquatica[deep_learning]"

# Install Plotly-based interactive charts
pip install "ai-aquatica[interactive]"

# Or grab everything
pip install "ai-aquatica[all]"

Or from GitHub:

git clone https://github.com/TyMill/AI-Aquatica.git
cd AI-Aquatica
pip install -e .[all]

Full guide: installation.md


📘 Documentation

Read the full documentation on GitHub Pages:
👉 https://tymill.github.io/AI-Aquatica/

Explore individual usage examples:

  • usage_data_cleaning.md
  • usage_data_loading.md
  • usage_missing_data.md
  • usage_statistical_analysis.md
  • ... and more!

💡 Quick Start Example

from ai_aquatica.ml_analysis import train_classification_model
import pandas as pd
import numpy as np

# Create mock dataset
df = pd.DataFrame({
    'NO3': np.random.rand(100),
    'pH': np.random.rand(100),
    'target': np.random.randint(0, 2, 100)
})

X = df[['NO3', 'pH']]
y = df['target']

# Train a random forest classification model using AI-Aquatica's helper
model = train_classification_model(X, y, model_type='random_forest')
print("Model trained successfully.")

Report Generation Templates

AI-Aquatica ships with ready-to-use Jinja2 templates stored in ai_aquatica/templates. By default the report utilities render these files to create:

  • statistical_report.html (plus an accompanying heatmap.png chart),
  • interpretation_report.html,
  • further_analysis_report.html.

The templates are available immediately after installation, but if you installed only the minimal dependencies make sure jinja2 is present:

pip install jinja2

You can point the report functions to your own template directory by passing the template_dir parameter. The directory should contain files named like the bundled templates so the engine can find them.

from ai_aquatica.report_generation import generate_statistical_report

custom_templates = "/path/to/my/templates"  # folder with statistical_report_template.html, etc.
generate_statistical_report(
    data=df,
    report_path="reports/wq_stat_report.html",
    template_dir=custom_templates,
)

Need more control? Copy the files from ai_aquatica/templates, modify them, and point template_dir to the folder containing your customized versions.


🤝 Contributing

Contributions are welcome! Please feel free to fork the repo and submit a pull request.
We especially welcome:

  • New preprocessing or AI models
  • Example notebooks / visual dashboards
  • Dataset integrations

📄 License

This project is licensed under the MIT License.


🙏 Acknowledgments

Special thanks to:

  • Open-source contributors
  • Environmental data science community
  • University of Szczecin & BNP Paribas for ongoing support

📫 Questions? Suggestions? Open an issue or email the maintainer.

Metadata

Release files for AI-Aquatica 1.1.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 AI-Aquatica 1.1.0
File Size Uploaded
ai_aquatica-1.1.0.tar.gz 26.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for AI-Aquatica 1.1.0
File Interpreter ABI Platform
ai_aquatica-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 62.1 kB

Release files / ai_aquatica-1.1.0.tar.gz

Download URL ai_aquatica-1.1.0.tar.gz
Size 26.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6ef32138b1389e21cf58d51efea46e218d29555083968a2da26b33512d2b0ed2
BLAKE2b-256 checksum
How to use checksums
13caba12bccef7761879c4523cff94af65309ce9c47749a745a275e530312978
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.9.13

Release files / ai_aquatica-1.1.0-py3-none-any.whl

Download URL ai_aquatica-1.1.0-py3-none-any.whl
Size 35.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5cdaa895902d058c6caaa8151111c081b1ae581bed530dcd6b0078de4a8a7aed
BLAKE2b-256 checksum
How to use checksums
3d264e556e540bbea370459293c0f16d9622dc9c13d6ad9add97799bcd431eb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.9.13

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

0.1.0

2 release files

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