{% extends "base.html" %} {% load i18n static ui help %} {% block title %}{% translate "Compare with sector data" %}{% endblock %} {% block head %}{% endblock %} {% block steps %}{% include "components/steps.html" %}{% endblock %} {% block content %}

{% translate "Compare with sector data" %}

{% translate "Optional: how yearly data from a sector such as crop yields or hospital admissions relates to the station's temperatures and indices." %}

{% if not source %} {% if indices_job and not indices_job.is_finished %} {% translate "The indices are still being calculated. Come back when they have finished." as wait_message %} {% include "components/alert.html" with kind="info" title="" message=wait_message %}

{% translate "See the progress" %} {% icon "arrow-right" %}

{% else %} {% translate "Calculate the climate indices first: the comparison uses them." as first_message %} {% include "components/alert.html" with kind="info" title="" message=first_message %}

{% translate "Calculate the indices" %} {% icon "arrow-right" %}

{% endif %} {% else %} {% if from_batch %} {% blocktranslate asvar batch_note with name=source.station %}This compares the indices calculated for {{ name }} in the batch run.{% endblocktranslate %} {% include "components/alert.html" with kind="info" title="" message=batch_note %} {% endif %} {% if job and not job.is_finished %}

{% translate "Calculating correlations" %}

{% include "stations/_sector_progress.html" %}
{% elif job.status == "failed" %} {% elif job.status == "cancelled" %} {% translate "The calculation was cancelled." as cancelled_message %} {% include "components/alert.html" with kind="info" title="" message=cancelled_message %} {% elif missing_outputs %} {% translate "The result files of this comparison are no longer there. Calculate it again." as gone_message %} {% include "components/alert.html" with kind="warning" title="" message=gone_message %} {% endif %} {% if results %}{% include "stations/_sector_results.html" %}{% endif %} {% if form.inspection and not form.inspection.ok %}{% include "stations/_problems.html" with inspection=form.inspection file_name=form.file_name %} {% elif form.errors %}{% include "components/form_errors.html" %}{% endif %}
{% if results %}{% translate "Change the file or the settings" %}{% else %}{% translate "Sector data and plot settings" %}{% endif %}{% icon "chevron-down" %}
{% csrf_token %}

{% translate "Sector data" %}

{% translate "Climpact correlates yearly sector data with the indices calculated in the previous step. Only yearly data can be used." %}

{% blocktranslate asvar hint %}CSV, one line per year.{% endblocktranslate %} {% include "components/dropzone.html" with field=form.sector_file hint=hint %}

{{ form.sector_file.help_text }}

{% help_topic "sector.file" %}

{% url 'stations:sector_sample' as sample_url %}{% blocktranslate trimmed %}No file to hand? Use Climpact for R's sample, yearly wheat yields for New South Wales, 1922 to 1999, which goes with the Sydney sample station: the button below, or download {{ sample_name }}.{% endblocktranslate %}

{% translate "Plot attributes" %}

{% translate "Climpact fills in a title and a y-axis label from the station and the file name; you can change them." %}

{% include "components/field.html" with field=form.title help="sector.title" %} {% include "components/field.html" with field=form.y_label help="sector.y_label" %} {% include "components/field.html" with field=form.detrend help="sector.detrend" %}
{% turnstile %}
{% translate "Calculate correlations" as run_label %} {% include "components/button.html" with label=run_label type="submit" icon="play" size="lg" %} {% translate "Use the sample data" as sample_label %} {% include "components/button.html" with label=sample_label type="submit" name="sample" value="1" variant="secondary" %}

{% icon "arrow-left" "" "icon--flip" %} {% translate "Back to the results" %} {% translate "Guide: sector correlation" %}

{% endif %}
{% endblock %}