parent
1e14a99419
commit
d5bf004912
2 changed files with 9 additions and 0 deletions
|
|
@ -544,6 +544,9 @@ def calculate_yearly_stats(trips: list[Trip]) -> dict[int, StrDict]:
|
|||
yearly_stats[year]["distances_by_transport_type"].get(transport_type, 0)
|
||||
+ distance
|
||||
)
|
||||
for country in trip.countries:
|
||||
yearly_stats[year].setdefault("countries", set())
|
||||
yearly_stats[year]["countries"].add(country)
|
||||
return dict(yearly_stats)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue