{% load i18n ui help %}{% comment %} The results of a sector job (step 5, #90): what was compared and the downloads, the correlation with each index as bars, and the four scatter plots with their regression. The charts are inline SVG drawn by stations/sector_plots.py, each with its table, CSV and the core's PNG. Context: analysis, job, results (sector_plots.SectorResults), bars, bars_svg, order, categories. {% endcomment %}

{% translate "Results" %}

{% if results.detrended %}{% blocktranslate trimmed with data=job.params.column|default:results.column file=job.params.file_name station=results.station %} {{ data }} from {{ file }}, detrended, against {{ station }}. {% endblocktranslate %}{% else %}{% blocktranslate trimmed with data=job.params.column|default:results.column file=job.params.file_name station=results.station %} {{ data }} from {{ file }}, not detrended, against {{ station }}. {% endblocktranslate %}{% endif %} {% if results.years %}{% blocktranslate trimmed count counter=job.params.common|default:0 with first=results.years.0 last=results.years.1 %} {{ counter }} year in common, {{ first }} to {{ last }}.{% plural %}{{ counter }} years in common, {{ first }} to {{ last }}. {% endblocktranslate %}{% endif %}

{% if results.zip %}{% url 'jobs:file' job.pk results.zip as zip_url %}{% translate "Download the correlation files (zip)" as zip_label %} {% include "components/button.html" with label=zip_label href=zip_url icon="download" %}{% endif %} {% translate "Every file of this comparison" %}

{% blocktranslate with date=job.expires_at|date:"j F Y" %}Kept until {{ date }}; this page's address works until then.{% endblocktranslate %}

{% translate "Correlation with each index" %}

{% if order == "strength" %}{% translate "Climpact's order" %}{% translate "Strongest first" %} {% else %}{% translate "Climpact's order" %}{% translate "Strongest first" %}{% endif %}

{% help_topic "sector.correlation" %}
{% blocktranslate trimmed with title=results.title count counter=bars|length %} {{ title }}: correlation of your data with {{ counter }} index{% plural %}{{ title }}: correlation of your data with {{ counter }} indices {% endblocktranslate %}
{{ bars_svg }}
{% if results.missing %}

{% blocktranslate trimmed with names=results.missing_names count counter=results.missing|length %} NA: no correlation for {{ counter }} index, {{ names }}: a missing value or no variation in the years in common.{% plural %}NA: no correlation for {{ counter }} indices, {{ names }}: a missing value or no variation in the years in common. {% endblocktranslate %}

{% endif %}
{% icon "table" %}{% translate "View as table" %}{% icon "chevron-down" %}
{% for bar in bars %}{% endfor %}
{% translate "Index" %}{% translate "Correlation" %}{% translate "Category" %}
{{ bar.name }}{{ bar.cor_text }}{{ bar.category_text }}

{% icon "download" %} {% translate "Table (CSV)" %} {% if results.correlation_png %}{% icon "image" %} {% translate "Image (PNG)" %}{% endif %}

{% translate "Missing index values are correlated as the number -99.9, as in Climpact for R, which can distort the correlation of an index with missing years. Correlation shows association, not cause." %}

{% translate "Your data against the station's temperatures" %}

{% help_topic "sector.regression" %}
{% for s in results.scatters %}
{{ s.label }} {% if s.equation %}{{ s.equation }} {% blocktranslate with r2=s.r_squared_text %}R² = {{ r2 }}{% endblocktranslate %}{% else %}{% translate "No regression: fewer than two years with both values." %}{% endif %}
{{ s.svg }}
{% icon "table" %}{% translate "View as table" %}{% icon "chevron-down" %}
{% for year, x, y in s.table %}{% endfor %}
{% translate "Year" %}{{ s.label }}{{ results.y_label|default:results.column }}
{{ year }}{{ x }}{{ y }}

{% icon "download" %} {% translate "Table (CSV)" %} {% if s.png %}{% icon "image" %} {% translate "Image (PNG)" %}{% endif %}

{% endfor %}