WP Manifestindependent plugin directory
manifest / ai / beeunity_project

BeeUnity - Predictive Analytics for Community Beekeeping

A deep learning-powered WordPress plugin for predictive analytics in community beekeeping in Makueni County. Features include hive colonization prediction, disease/pest detection, yield optimization, and market connectivity.

by Matthew B · github.com/mathew-colla/beeunity_project · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/mathew-colla/beeunity_project/archive/refs/heads/main.zip

A deep learning-powered WordPress plugin for predictive analytics in community beekeeping in Makueni County, Kenya.

Features

🤖 Deep Learning Models

  • Colonization Prediction: Predicts optimal times for hive colonization based on weather and vegetation data
  • Disease & Pest Detection: Early detection of diseases (American Foulbrood, Nosema) and pests (Varroa mites, Small Hive Beetle, Wax Moth)
  • Yield Optimization: Predicts honey yield and provides optimization recommendations

📊 Data Collection & Analysis

  • Weather Data: Real-time weather data from Open-Meteo API (temperature, precipitation, humidity, wind, solar radiation)
  • Vegetation Data: NDVI and flowering indices from Google Earth Engine (Sentinel-2/MODIS)
  • Automated Sync: Daily automated data synchronization
  • Data Processing: Cleaning, merging, interpolation, and feature engineering

📈 Advanced Visualizations

  • Interactive maps with hive locations (Leaflet.js)
  • Time series charts (Chart.js)
  • Heatmaps for risk visualization
  • Bounding box visualizations
  • Scatter plots and trend analysis
  • Spatial and map visuals
  • Risk and prediction dashboards
  • Comparative hive analysis

🌍 Multi-Language Support

  • English
  • Kiswahili (Swahili)
  • Kamba (Local Kenyan language)

🛒 Marketplace Integration

  • Connect farmers to honey buyers
  • Product listings (honey, beeswax, propolis)
  • Farmer-to-market connections

Installation

  1. Upload Plugin

    Upload the 'Matthew@B' folder to /wp-content/plugins/
  2. Activate Plugin

    Activate BeeUnity through the WordPress plugins menu
  3. Install Python Dependencies (for ML training)

    cd wp-content/plugins/Matthew@B/ml-scripts
    pip install -r requirements.txt
  4. Database Setup

    • The plugin automatically creates necessary database tables on activation
    • Tables include: weather_data, ndvi_data, hive_observations, predictions, marketplace, training_data
  5. Initial Data Sync

    • Go to BeeUnity Dashboard
    • Click "Sync Data Now" to fetch historical data from APIs

Configuration

API Keys

  • Google Earth Engine API: Pre-configured in the plugin
  • Open-Meteo: No API key required (free tier)

Hive Locations

The plugin is pre-configured with 9 hive locations in Makueni County:

  • Hive 1: -1.772350, 37.592544
  • Hive 2: -1.773990, 37.591450
  • Hive 3: -1.774491, 37.591403
  • Hive 4: -1.774371, 37.591403
  • Hive 5: -1.774246, 37.591352
  • Hive 6: -1.773918, 37.591284
  • Hive 7: -1.773954, 37.591218
  • Hive 8: -1.773833, 37.591188
  • Hive 9: -1.773732, 37.591146

Data Collection Period

  • Start Date: 2023-01-01
  • End Date: 2025-12-31

Usage

Dashboard

Access the main dashboard at: WordPress Admin > BeeUnity > Dashboard

Features:

  • Hive location map
  • Weather overview
  • Quick actions (Sync Data, Train Models)
  • Alerts and notifications

Colonization Predictions

  1. Go to BeeUnity > Predictions
  2. Select a hive
  3. Click "Run Colonization Prediction"
  4. View optimal colonization windows with confidence scores

Disease Detection

  1. Go to BeeUnity > Disease & Pests
  2. Select a hive
  3. Click "Detect Risks"
  4. Review risk levels and recommendations

Yield Optimization

  1. Go to BeeUnity > Yield Optimizer
  2. Select a hive
  3. Set harvest date
  4. View predicted yield and optimization recommendations

Marketplace

  1. Farmers can create listings at BeeUnity > Marketplace
  2. Use shortcode [beeunity_marketplace] on any page
  3. Buyers can browse and contact sellers

Shortcodes

Hive Status

[beeunity_hive_status hive_id="1"]

Predictions

[beeunity_predictions hive_id="1" type="colonization"]

Weather Widget

[beeunity_weather location="Makueni"]

Marketplace

[beeunity_marketplace view="grid"]

Deep Learning Models

Training Models

To train the deep learning models with collected data:

  1. Navigate to ML scripts directory

    cd wp-content/plugins/Matthew@B/ml-scripts
  2. Train Colonization Model

    python train_colonization_model.py ../../../uploads/beeunity/models/colonization_training_data.json
  3. Train Disease Detection Model

    python train_disease_model.py ../../../uploads/beeunity/models/disease_training_data.json
  4. Train Yield Prediction Model

    python train_yield_model.py ../../../uploads/beeunity/models/yield_training_data.json

Model Architecture

  • Colonization Model: Deep neural network with 128-64-32-16-1 neurons
  • Disease Detection: Multi-output model for disease and pest classification
  • Yield Prediction: Regression model with 256-128-64-32-16-1 neurons

All models use:

  • ReLU activation functions
  • Batch normalization
  • Dropout for regularization
  • Adam optimizer
  • Early stopping

Database Schema

Weather Data

  • hive_id, date_recorded, temperature_max, temperature_min, temperature_avg
  • precipitation, humidity, wind_speed, solar_radiation

NDVI Data

  • hive_id, date_recorded, ndvi_value, evi_value, flowering_index

Hive Observations

  • hive_id, observation_date, colonization_status, bee_population
  • honey_yield, disease_detected, pest_detected, notes, images, audio

Predictions

  • hive_id, prediction_date, prediction_type, prediction_value
  • confidence_score, model_version

Marketplace

  • farmer_id, product_type, quantity, price, description
  • harvest_date, status

API Endpoints

Weather Data

  • Source: Open-Meteo Archive API
  • Endpoint: https://archive-api.open-meteo.com/v1/archive
  • Data: Temperature, precipitation, humidity, wind speed, solar radiation

Vegetation Data

  • Source: Google Earth Engine (MODIS/Sentinel-2)
  • Data: NDVI, EVI, flowering index

Cron Jobs

The plugin schedules daily data synchronization:

  • Hook: beeunity_daily_data_sync
  • Frequency: Daily
  • Function: Syncs weather and NDVI data for all hives

File Structure

Matthew@B/
├── beeunity.php (Main plugin file)
├── includes/
│   ├── class-beeunity-activator.php
│   ├── class-beeunity-deactivator.php
│   ├── class-beeunity-db.php
│   ├── class-beeunity-ajax.php
│   ├── class-beeunity-i18n.php
│   ├── data-collection/
│   │   ├── class-openmeteo-api.php
│   │   ├── class-gee-api.php
│   │   └── class-data-processor.php
│   ├── ml/
│   │   ├── class-ml-engine.php
│   │   ├── class-colonization-predictor.php
│   │   ├── class-disease-detector.php
│   │   └── class-yield-optimizer.php
│   ├── marketplace/
│   │   └── class-marketplace.php
│   └── visualizations/
├── admin/
│   ├── class-beeunity-admin.php
│   ├── views/
│   ├── css/
│   └── js/
├── public/
│   ├── class-beeunity-public.php
│   ├── css/
│   └── js/
├── ml-scripts/
│   ├── train_colonization_model.py
│   ├── train_disease_model.py
│   ├── train_yield_model.py
│   └── requirements.txt
└── languages/

Requirements

WordPress

  • WordPress 5.8+
  • PHP 7.4+
  • MySQL 5.7+

Python (for ML training)

  • Python 3.8+
  • TensorFlow 2.13+
  • Scikit-learn 1.3+
  • NumPy, Pandas, Matplotlib

JavaScript Libraries (CDN)

  • Chart.js 4.4.0
  • Leaflet.js 1.9.4
  • TensorFlow.js 4.11.0

Support

For support and questions:

License

GPL v2 or later

Credits

  • Developer: Matthew B
  • Data Sources: Open-Meteo, Google Earth Engine
  • Location: Makueni County, Kenya

Version History

1.0.0 (2026-01-12)

  • Initial release
  • Colonization prediction
  • Disease and pest detection
  • Yield optimization
  • Marketplace integration
  • Multi-language support (English, Swahili, Kamba)
  • 9 hive locations in Makueni County
  • Historical data: 2023-2025