{% extends "base.html" %} {% import "partials/icons.html" as icons %} {% import "partials/histogram.html" as histogram %} {% block title %}Brewlog · Stats{% endblock %} {% block og_title %}Stats — Brewlog{% endblock %} {% block og_description %}Aggregated coffee data across origins, consumption, and brewing.{% endblock %} {% block head %}{% endblock %} {% block content %}

Stats

{% if !cache_age.is_empty() %} Updated {{ cache_age }} {% endif %}

Aggregated coffee data across origins, consumption, and brewing.

{% if has_data %}
{% include "partials/tab_bar.html" %}
{{ content|safe }}

Roast Stats

{{ icons::map("h-6 w-6 text-accent") }} {{ roast_summary.unique_origins }} Origins
{{ icons::location("h-6 w-6 text-accent") }} {% match roast_summary.top_origin %}{% when Some with (v) %}{{ v }}{% when None %}—{% endmatch %} Top Origin
{{ icons::fire("h-6 w-6 text-accent") }} {% match roast_summary.top_roaster %}{% when Some with (v) %}{{ v }}{% when None %}—{% endmatch %} Top Roaster
{% if !roast_summary.origin_counts.is_empty() || !roast_summary.flavour_counts.is_empty() %}
{% if !roast_summary.origin_counts.is_empty() %}

Top 5 Origins

{{ histogram::bar_chart(roast_summary.origin_counts, roast_summary.max_origin_count) }}
{% endif %} {% if !roast_summary.flavour_counts.is_empty() %}

Top 5 Flavours

{{ histogram::bar_chart(roast_summary.flavour_counts, roast_summary.max_flavour_count) }}
{% endif %}
{% endif %}

Consumption

{{ icons::coffee_bean("h-6 w-6 text-accent") }} {{ consumption_30d_weight }} Last 30 Days
{{ icons::coffee_bean("h-6 w-6 text-accent") }} {{ consumption_all_time_weight }} All Time
{{ icons::beaker("h-6 w-6 text-accent") }} {{ consumption.brews_last_30_days }} Brews (30d)
{{ icons::beaker("h-6 w-6 text-accent") }} {{ consumption.brews_all_time }} Brews (All Time)

Brewing

{% if !brewing_summary.brewer_counts.is_empty() || !brewing_summary.grinder_counts.is_empty() %}
{% if !brewing_summary.brewer_counts.is_empty() %}

Brewer Usage

{% endif %} {% if !brewing_summary.grinder_counts.is_empty() %}

Grinder Usage

{% endif %}
{% endif %}
{% if !grinder_weights.is_empty() %}

Coffee per Grinder

{{ histogram::bar_chart_weight(grinder_weights, max_grinder_weight) }}
{% endif %} {% if !brewing_summary.brew_time_distribution.is_empty() %}

Brew Time Distribution

{{ histogram::bar_chart(brewing_summary.brew_time_distribution, brewing_summary.max_brew_time_count) }}
{% endif %}
{% else %}
No stats yet
{% endif %} {% endblock %}