[t('statistics.handled'),'teal'],'entries' => [t('statistics.entries'),'green'],'exits' => [t('statistics.exits'),'red'],'adoptions' => [t('statistics.adoptions'),'blue'],'deaths' => [t('statistics.deaths'),'dark'],'births' => [t('statistics.births'),'purple'],'vaccinations' => [t('statistics.vaccinations'),'cyan'],'treatments' => [t('statistics.treatments'),'orange'],'medical_notes' => [t('statistics.medical_notes'),'pink']]; $comparisonLabels = ['handled' => t('statistics.handled'),'entries' => t('statistics.entries'),'exits' => t('statistics.exits'),'adoptions' => t('statistics.adoptions'),'deaths' => t('statistics.deaths'),'births' => t('statistics.births'),'vaccinations' => t('statistics.vaccinations'),'treatments' => t('statistics.treatments_started'),'medical_notes' => t('statistics.medical_notes'),'avg' => t('statistics.avg_adoption_days')]; $intakeTypeLabels = []; foreach (['unknown','found','owner_surrender','transfer','born_in_care','return','seizure','other'] as $key) { $intakeTypeLabels[$key] = t('statistics.intake.' . $key); } $intakeReasonLabels = []; foreach (['unknown','stray_found','unwanted_litter','owner_health','owner_death','owner_care_home','allergy','housing','financial','behavior','abandonment','danger','transfer','birth','other'] as $key) { $intakeReasonLabels[$key] = t('statistics.reason.' . $key); } $distributionLabels = ['Femelles' => t('statistics.value.females'),'Mâles' => t('statistics.value.males'),'Inconnu' => t('statistics.value.unknown'),'Non renseigné' => t('statistics.value.not_provided'),'Non renseignée' => t('statistics.value.not_provided_f'),'Moins d’un an' => t('statistics.value.under_year'),'1 à 2 ans' => t('statistics.value.one_two_years'),'3 à 7 ans' => t('statistics.value.three_seven_years'),'8 ans et plus' => t('statistics.value.eight_plus'),'Moins d’un mois' => t('statistics.value.under_month'),'1 à 3 mois' => t('statistics.value.one_three_months'),'3 à 6 mois' => t('statistics.value.three_six_months'),'6 à 12 mois' => t('statistics.value.six_twelve_months'),'Plus d’un an' => t('statistics.value.over_year'),'Chats' => t('statistics.value.cats'),'Chiens' => t('statistics.value.dogs'),'Inconnue' => t('statistics.value.unknown_f'),'Refuge' => t('status.refuge'),'Famille d’accueil' => t('status.fa'),'Accueil permanent' => t('statistics.value.permanent_foster'),'Chats libres suivis' => t('statistics.free_cats'),'Quarantaine' => t('status.quarantaine'),'Infirmerie' => t('status.soin'),'Réservé' => t('status.reserve'),'Site non renseigné' => t('statistics.value.unprovided_site')]; $groups = [ [t('statistics.intake_modes'),$distributions['intakeTypes'],$intakeTypeLabels,'green'], [t('statistics.intake_reasons'),$distributions['intakeReasons'],$intakeReasonLabels,'orange'], [t('statistics.colors'),$distributions['colors'],[],'blue'], [t('statistics.breeds'),$distributions['breeds'],[],'purple'], [t('statistics.species'),$distributions['species'],[],'cyan'], [t('statistics.sex'),$distributions['sex'],[],'pink'], [t('statistics.age_at_entry'),$distributions['ages'],[],'orange'], [t('statistics.origins'),$distributions['origins'],[],'green','municipality'], [t('statistics.adoption_delay'),$distributions['stays'],[],'azure'], [t('statistics.death_causes'),$distributions['deathCauses'],array_combine(array_keys(DeathController::CAUSES), array_map(static fn ($key) => DeathController::causeLabel($key), array_keys(DeathController::CAUSES))),'dark'], [t('statistics.current_distribution'),$distributions['currentStatus'],[],'teal'], [t('statistics.free_cat_sites'),$distributions['freeCatSites'] ?? [],[],'green'], [$allYears ? t('statistics.releases_year') : t('statistics.releases_site'),$distributions['freeCatReleases'] ?? [],[],'lime'], ]; ?>

$municipality]) : t('statistics.figures') ?>

· (int)$stats['handled']])) ?>
$municipalityCoverage['documented']])) ?> $municipalityCoverage['inferred']])) ?> $municipalityCoverage['born_in_care']])) ?> $municipalityCoverage['unknown']])) ?>
(int)$stats['deaths'],'count' => (int)$undatedDeaths])) ?>
(int)$undatedHandled,'exits' => (int)$undatedExits,'births' => (int)$undatedBirths,'vaccinations' => (int)$stats['vaccinations'],'vaccinated' => (int)($scopeCounts['vaccinated_animals'] ?? 0),'notes' => (int)$stats['medical_notes'],'medical' => (int)($scopeCounts['medical_animals'] ?? 0)])) ?>
[$label,$color]): ?>
(int)$year]) ?>

(int)($costs['animals'] ?? 0)])) ?>

(int)$r['contact_id'],'year' => $allYears ? 'all' : $year,'municipality' => $municipality]) : null; ?>
(int)$r['animals']])) ?> · € /

(int)$r['animals']])) ?> · € /

$allYears ? 'all' : $year,'municipality' => $row['municipality']]); ?>

(int)$undatedHandled])) ?>
$annual): ?>

$year - 1])) ?>

$label): $c = $comparison[$key]; ?>
0 ? '+' : '' ?> 0 ? '+' : '') . number_format($c['percent'], 1, ',', ' ') . ' %' : '' ?>

0 ? round($total / $health['total'] * 100) : 0; ?>
· %

(int)$year])) ?>

$sum])) ?>
$total): $display = $labels[$label] ?? $distributionLabels[$label] ?? $label; $width = $maximum > 0 ? max(4, round($total / $maximum * 100)) : 0; $pct = $sum > 0 ? round($total / $sum * 100) : 0; $cityUrl = '/statistics?' . http_build_query(['year' => $allYears ? 'all' : $year,'municipality' => $label]); ?>
%