{# Dashboard spend-by-author tile. ``cost_by_author`` is a list of dicts: {author_email, cost_usd, job_count, cost_share_pct} built in routes/findings.py via a single SQL aggregate over ``bigquery_jobs.user_email``. #} {% if cost_by_author %}

Spend by author

{{ cost_by_author | length }} author{{ "s" if cost_by_author | length != 1 else "" }}

Which BigQuery principal submitted each job. Click a row to filter the opportunities table to that author.

{% for row in cost_by_author %} {% endfor %}
Author Spend Share Jobs
{{ row.author_email }} {{ row.cost_usd | format_usd }} {{ "{:.1f}".format(row.cost_share_pct) }}% {{ "{:,}".format(row.job_count) }}
{% endif %}