Add overall airline, airport, and station stats to trip summary

Aggregate yearly stats into overall totals so the trip stats page
shows flight segments by airline, airports used, and stations used
in the summary section at the top.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Edward Betts 2026-02-03 09:25:10 +00:00
parent bc5e595bb0
commit 523dc78b35
4 changed files with 59 additions and 0 deletions

View file

@ -33,3 +33,7 @@ This is a personal agenda web application built with Flask that tracks various e
## Notes
- Trip stats new-country badges come from `agenda.stats.calculate_yearly_stats` via `year_stats.new_countries` (first-visit year, excluding `PREVIOUSLY_VISITED`).
- Trip stats are calculated in `agenda/stats.py`:
- `travel_legs()` extracts airlines, airports, and stations from individual trip travel legs
- `calculate_yearly_stats()` aggregates stats per year including flight/train counts, airlines, airports, stations
- `calculate_overall_stats()` aggregates yearly stats into overall totals for the summary section