<%= @digest.year %> Year in Review

Your journey, by the numbers

Hi, this is Evgenii from Dawarich! Pretty wild journey last year, huh? Let's take a look back at all the places you explored in <%= @digest.year %>.

Distance Traveled

<%= distance_with_unit(@digest.distance, @distance_unit) %>

<%= distance_comparison_text(@digest.distance) %>

<% if @digest.yoy_distance_change %>

<%= yoy_change_text(@digest.yoy_distance_change) %> compared to <%= @digest.previous_year %>

<% end %>
Countries Visited

<%= @digest.countries_count %>

<% if @digest.first_time_countries.any? %>

New First time in: <%= @digest.first_time_countries.join(', ') %>

<% end %>
Cities Explored

<%= @digest.cities_count %>

<% if @digest.first_time_cities.any? %>

New <% cities_to_show = @digest.first_time_cities.take(5) %> First time in: <%= cities_to_show.join(', ') %> <% if @digest.first_time_cities.count > 5 %> and <%= @digest.first_time_cities.count - 5 %> more <% end %>

<% end %>
<% if @digest.monthly_distances.present? %>

Your Year, Month by Month

<% max_distance = @digest.monthly_distances.values.map(&:to_i).max %> <% max_distance = 1 if max_distance.zero? %> <% chart_height = 120 %> <% bar_colors = ['#3b82f6', '#6366f1', '#8b5cf6', '#a855f7', '#d946ef', '#ec4899', '#f43f5e', '#ef4444', '#f97316', '#eab308', '#84cc16', '#22c55e'] %> <% (1..12).each do |month| %> <% distance = @digest.monthly_distances[month.to_s].to_i %> <% bar_height = (distance.to_f / max_distance * chart_height).round %> <% bar_height = 3 if bar_height < 3 && distance > 0 %> <% end %> <% (1..12).each do |month| %> <% end %>
<%= Date::ABBR_MONTHNAMES[month][0..0] %>
<% end %> <% if @digest.top_countries_by_time.any? %>
Where You Spent the Most Time
<% if @digest.untracked_days > 0 %>

💡 Track more in <%= @digest.year + 1 %> to see a fuller picture of your travels!

<% end %>
<% end %>

You can open your digest for sharing on its page on Dawarich: <%= users_digest_url(year: @digest.year) %>