Political representation

Constituency population vs allocated seats. Flag underserved or gerrymandered areas (Framework UC6). Feed into INEC or equivalent.

@if(session('success'))
{{ session('success') }}
@endif @if(auth()->user()?->isAdmin())

Add constituency

@csrf
@endif @if(empty($constituencies) || (is_array($constituencies) ? count($constituencies) === 0 : $constituencies->isEmpty()))

No electoral constituencies recorded yet. Add constituencies with population and seats to see fairness metrics.

@else @php $totalPop = $constituencies->sum('population'); $totalSeats = $constituencies->sum('allocated_seats'); $avgPerSeat = $totalSeats > 0 ? round($totalPop / $totalSeats) : 0; @endphp

Total population: {{ number_format($totalPop) }} | Total seats: {{ $totalSeats }} | Avg population per seat: {{ number_format($avgPerSeat) }}

@foreach($constituencies as $c) @endforeach
Constituency Code Population Seats Pop/seat Underserved Boundary
{{ $c->name }} {{ $c->code ?: '—' }} {{ number_format($c->population) }} {{ $c->allocated_seats }} {{ $c->allocated_seats > 0 ? number_format($c->populationPerSeat()) : '—' }} @if($c->underserved_flag) Yes @else — @endif @if($c->boundary) {{ $c->boundary->boundary_number }} @else — @endif
@endif