{% extends "base.html" %} {% load i18n static ui help %} {% block title %}{% blocktranslate with name=analysis.station_name %}Compare with sector data: {{ name }}{% endblocktranslate %}{% endblock %} {% block head %}{% endblock %} {% block content %}
{% include "stations/_workspace.html" %} {% comment %}The Inputs panel beside the section (#198).{% endcomment %}
{% include "stations/_inputs.html" %}

{% translate "Compare with sector data" %}

{% translate "Optional. Compare yearly data, such as crop yields, with the station's indices." %}

{% if stale %} {% translate "These results are out of date. The comparison uses them as they are. Compare again once they are up to date." as stale_message %}{% url 'stations:results' analysis.workspace_id analysis.slug as results_url %}{% translate "See the results" as results_label %} {% include "components/alert.html" with kind="warning" title="" message=stale_message action_href=results_url action_label=results_label %} {% endif %} {% if not source %} {% if indices_job and not indices_job.is_finished %} {% translate "The indices are still being calculated. Come back when they are ready." 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 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" %}

{% section_help "sector.data" %}

{% translate "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 }}

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

{% translate "Plot attributes" %}

{% section_help "sector.plot" %}
{% include "components/field.html" with field=form.title %} {% include "components/field.html" with field=form.y_label %} {% include "components/field.html" with field=form.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 %}
{% include "stations/_input_sheets.html" %} {% endblock %}