@extends('layouts.app') @section('title', 'Yield Mapping - Blackberry Farm Analytics') @section('content')
← Geographic Analysis πŸ“ Field Mapping 🌱 Soil Analysis πŸ“Š Zone Performance πŸ’‘ Recommendations

βš™οΈ Mapping Settings

πŸ“Š Yield Statistics Overview

{{ number_format($yieldData['statistics']['total_yield'], 1) }}
Total Yield (lbs)
{{ number_format($yieldData['statistics']['max_yield'], 1) }}
Top Plant (lbs)
{{ number_format($yieldData['statistics']['avg_yield_per_plant'], 1) }}
Average (lbs)
{{ number_format($yieldData['statistics']['min_yield'], 1) }}
Lowest Plant (lbs)
{{ $yieldData['statistics']['harvest_count'] }}
Total Harvests

πŸ“ˆ Performance Analysis

@php $yieldVariation = $yieldData['statistics']['max_yield'] - $yieldData['statistics']['min_yield']; $coefficientOfVariation = $yieldData['statistics']['avg_yield_per_plant'] > 0 ? ($yieldVariation / $yieldData['statistics']['avg_yield_per_plant']) * 100 : 0; @endphp

πŸ—ΊοΈ Interactive Yield Map

πŸ—ΊοΈ

Interactive Map Coming Soon

This area will display an interactive map with:

πŸš€ Implementation: Leaflet.js + Heat Maps

🎯 Performance Categories

@php $performanceGroups = [ 'high' => ['color' => 'var(--leaf-green)', 'label' => 'High Performers (>5 lbs)', 'icon' => 'πŸ†'], 'medium' => ['color' => 'var(--warning)', 'label' => 'Medium Performers (3-5 lbs)', 'icon' => 'πŸ“ˆ'], 'low' => ['color' => 'var(--sky-blue)', 'label' => 'Low Performers (1-3 lbs)', 'icon' => 'πŸ“Š'], 'poor' => ['color' => 'var(--berry-red)', 'label' => 'Poor Performers (<1 lb)', 'icon' => '⚠️'] ]; $categorized = []; foreach($yieldData['yield_points'] as $point) { $performance = $point['performance']; if (!isset($categorized[$performance])) { $categorized[$performance] = []; } $categorized[$performance][] = $point; } @endphp @foreach($performanceGroups as $key => $group) @php $plants = $categorized[$key] ?? []; @endphp

{{ $group['icon'] }} {{ $group['label'] }}

{{ count($plants) }}
Plants
@if(!empty($plants))
@foreach(array_slice($plants, 0, 5) as $plant)
Plant #{{ $plant['plant_id'] }} - {{ $plant['variety'] }} {{ number_format($plant['total_yield'], 1) }} lbs
@endforeach @if(count($plants) > 5)
... and {{ count($plants) - 5 }} more plants
@endif
@else
No plants in this category
@endif
@endforeach

πŸ† Top Performers

@php $topPerformers = collect($yieldData['yield_points'])->sortByDesc('total_yield')->take(10); @endphp @foreach($topPerformers as $plant)
Plant #{{ $plant['plant_id'] }} {{ number_format($plant['total_yield'], 1) }} lbs
Variety: {{ $plant['variety'] }}
Field: {{ $plant['field_name'] }}
Harvests: {{ $plant['harvest_count'] }} ({{ number_format($plant['avg_yield_per_harvest'], 1) }} lbs avg)
@if(isset($plant['latitude']) && isset($plant['longitude']))
Location: {{ number_format($plant['latitude'], 4) }}, {{ number_format($plant['longitude'], 4) }}
@endif
@endforeach

⚠️ Needs Attention

@php $bottomPerformers = collect($yieldData['yield_points'])->sortBy('total_yield')->take(10); @endphp @foreach($bottomPerformers as $plant)
Plant #{{ $plant['plant_id'] }} {{ number_format($plant['total_yield'], 1) }} lbs
Variety: {{ $plant['variety'] }}
Field: {{ $plant['field_name'] }}
Harvests: {{ $plant['harvest_count'] }} ({{ number_format($plant['avg_yield_per_harvest'], 1) }} lbs avg)
@if(isset($plant['latitude']) && isset($plant['longitude']))
Location: {{ number_format($plant['latitude'], 4) }}, {{ number_format($plant['longitude'], 4) }}
@endif
Recommended Actions:
  • Investigate soil conditions and drainage
  • Check for pest or disease issues
  • Review watering and fertilization history
  • Consider plant replacement if very old
@endforeach

πŸ’‘ Yield Optimization Recommendations

@if($coefficientOfVariation > 50)

🚨 High Yield Variation Detected

Your farm shows significant yield variation ({{ number_format($coefficientOfVariation, 1) }}%), indicating optimization opportunities.

  • Focus on bottom {{ count($categorized['poor'] ?? []) + count($categorized['low'] ?? []) }} performers
  • Implement precision agriculture techniques
  • Conduct soil testing in low-yield areas
  • Consider irrigation system improvements
Priority: High | Potential ROI: 25-40%
@endif

🌱 Replicate Success

Learn from your top {{ count($categorized['high'] ?? []) }} high-performing plants.

  • Study care practices in high-yield areas
  • Analyze soil conditions of top performers
  • Replicate successful varieties and spacing
  • Document best practices for consistency
Strategy: Best Practice Replication

πŸ“Š Data-Driven Decisions

Use this yield mapping data for strategic planning.

  • Plan expansion in high-performing areas
  • Adjust resource allocation by performance
  • Schedule targeted maintenance in low-yield zones
  • Use GPS coordinates for precision application
Approach: Precision Agriculture
@endsection @push('scripts') @endpush