<commit_before><div class="card--stats-iucn card--stats-half">
  <h2 class="card__h2"><%= t('stats.iucn-categories.title') %></h2>

  <am-chart-pie
    class="am-chart--pie--iucn"
    :dataset="<%= @iucn_categories_chart %>"
    :doughnut="true"
  ></am-chart-pie>

  <ul class="list--underline">
    <% iucn_categories.each_with_index do |category, i| %>
      <li class="list__li">
        <i class="list__icon"></i>
        <span class="list__title"><%= "#{i+1}. #{category['iucn_category_name']}" %></span>
        <span class="list__value">
          <%= category['count'] %>, <%= category['percentage'].to_f.round(2) %>%
        </span>
        <%= link_to 'View list', '', title: '', class: 'list__right list__a' %>
      </li>
    <% end %>
  </ul>
</div>

<!-- search_url("#{location.class.name.downcase}" => location.name, iucn_category: row["iucn_category_name"], main: location.class.name.downcase.to_sym) --><commit_msg>added links for the doughnut chart<commit_after><div class="card--stats-iucn card--stats-half">
  <h2 class="card__h2"><%= t('stats.iucn-categories.title') %></h2>

  <am-chart-pie
    class="am-chart--pie--iucn"
    :dataset="<%= @iucn_categories_chart %>"
    :doughnut="true"
  ></am-chart-pie>

  <ul class="list--underline">
    <% iucn_categories.each_with_index do |category, i| %>
      <li class="list__li">
        <i class="list__icon"></i>
        <span class="list__title"><%= "#{i+1}. #{category['iucn_category_name']}" %></span>
        <span class="list__value">
          <%= category['count'] %>, <%= category['percentage'].to_f.round(2) %>%
        </span>
        <%= link_to 'View list', 
        search_areas_path(
          geo_type: 'site', 
          filters: { 
            iucn_category: ["#{category['iucn_category_name']}"],
            location: { type: 'country', options: ["#{@country.name}"] }
          }          
        ), 
          title: "View the #{category['iucn_category_name']} sites for #{@country.name}", class: 'list__right list__a' %>
      </li>
    <% end %>
  </ul>
</div>

<!-- search_url("#{location.class.name.downcase}" => location.name, iucn_category: row["iucn_category_name"], main: location.class.name.downcase.to_sym) -->
{'fraction_non_alphanumeric': 0.2163504968383017, 'fraction_numerical': 0.004516711833785004, 'mean_word_length': 3.1792452830188678, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 55, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2272066', 'n_tokens_mistral': 812, 'n_tokens_neox': 776, 'n_words': 122}