<%= number_with_delimiter(current_user.total_km) %> km
Total distance
<%= number_with_delimiter current_user.tracked_points.count %>
Geopoints tracked
<% if REVERSE_GEOCODING_ENABLED %> <%= render 'stats/reverse_geocoding_stats' %> <% end %>
<%= link_to 'Update stats', stats_path, data: { 'turbo-method' => :post }, class: 'btn btn-primary mt-5' %>
<% @stats.each do |year, stats| %>

<%= link_to year, "/stats/#{year}", class: 'underline hover:no-underline' %> <%= link_to '[Map]', map_url(year_timespan(year)), class: 'underline hover:no-underline' %>

<% cache [current_user, 'year_distance_stat_in_km', year], skip_digest: true do %> <%= number_with_delimiter year_distance_stat_in_km(year, current_user) %>km <% end %>

<% if REVERSE_GEOCODING_ENABLED %>
<%= countries_and_cities_stat_for_year(year, stats) %>
<% end %> <%= column_chart( Stat.year_distance(year, current_user), height: '200px', suffix: ' km', xtitle: 'Days', ytitle: 'Distance' ) %>
<% end %>