-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathindicator.html
186 lines (167 loc) · 8.34 KB
/
indicator.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
{% include head.html %}
{% include header.html %}
{% include components/fields-template.html %}
{% include components/units-template.html %}
{% capture indicator_id %}{{page.indicator | slugify}}{% endcapture %}
{% assign meta = site.data.meta[indicator_id] %}
{% assign headline = site.data.headline[indicator_id] %}
{% assign goal = site.goals | where: "sdg_goal", meta.sdg_goal | first %}
{% capture goal_uri %}{{ site.baseurl }}/{{ goal.short | slugify }}{% endcapture %}
{% if meta.reporting_status != "complete" or meta.data_non_statistical == true %}
{% assign show_data = false %}
{% else %}
{% assign show_data = true %}
{% endif %}
{% capture goal_href %}{{ goal_uri }}{% endcapture %}
{% capture goal_number %}{{ goal.goal }}{% endcapture %}
{% capture goal_title %}{{ goal.title }}{% endcapture %}
{% capture indicator_title %}{{ meta.title }}{% endcapture %}
{% capture dataset_name %}indicator_{{meta.indicator | slugify }}{% endcapture %}
{% assign sdg_indicator_data = site.data[dataset_name] %}
{% assign indicator_metadata = sdg_indicators | where: "indicator_id", meta.indicator | first %}
{% assign json_data = sdg_indicator_data | jsonify %}
<div class="heading indicator goal-{{meta.sdg_goal}}">
<div class="container">
<div class="row">
<div class="col-xs-4 col-md-3 col-lg-2">
<a href="{{ goal_uri }}" title="View this goal's indicator list">
<img src="{{ site.baseurl }}/assets/img/goals/{{ meta.sdg_goal }}.png" alt="{{ goal.short }} - Goal {{ goal.goal }}" />
</a>
</div>
<div class="col-xs-8 col-md-9 col-lg-10">
<h1>
<a href="{{ goal_uri }}">
<span class="hidden-sm hidden-md hidden-lg">Goal {{meta.sdg_goal}}: </span>{{ meta.title }}
</a>
</h1>
<h2>Indicator {{ meta.indicator }}: {{ meta.title }}</h2>
</div>
</div>
</div>
</div>
<div id="main-content" class="container goal-{{meta.sdg_goal}}">
{% include components/breadcrumb.html %}
<div class="row" id="page-content-row">
<div class="col-xs-12">
<div id="page-content">
{{ meta.page_content | markdownify }}
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<h2>{{ meta.graph_title }}</h2>
</div>
</div>
<div class="row" id="indicatorData" data-indicatorid='{{dataset_name}}' data-id="{{meta.indicator | slugify }}" data-country="{{ meta.national_geographical_coverage }}"
data-charttitle="{{ meta.graph_title }}" data-measurementunit="{{ meta.computation_units }}" data-datasource="{{ meta.source_organisation_1 }}" data-geographicalarea="{{ meta.national_geographical_coverage }}" data-footnote="{{ meta.data_footnote }}" data-showdata="{{ show_data }}" data-graphtype="{{ meta.graph_type }}" data-geocoderegex="{{ meta.data_geocode_regex }}" data-showmap="{{ meta.data_show_map }}">
{% if show_data %}
<div class="col-md-3">
<div id="toolbar">
<span id="series-help">
<h4>Sub-categories</h4>
<p>Choose categories from the dropdowns below to see different breakdowns of the data. Some will not be available until a higher level is chosen.</p>
</span>
<p>Click on the legend to remove individual lines from the chart.</p>
<div id="fields">
<p class="async-loading" data-img="{{ site.baseurl }}/assets/img/loading-small.gif"></p>
</div>
</div>
<div id="units"></div>
</div>
<div class="col-md-9">
{% else %}
<div class="col-md-12">
{% endif %}
{% if show_data %}
{% include components/headline.html %}
{% endif %}
<section>
{% if show_data %}
<p class="async-loading" data-img="{{ site.baseurl }}/assets/img/loading-small.gif"></p>
<div class="async-loaded" style="display:none">
<ul class="nav nav-tabs data-view" role="tablist">
<li role="presentation" class="nav-item active">
<a class="nav-link" data-toggle="tab" href="#chartview" aria-controls="chartview" role="tab">Chart</a>
</li>
<li role="presentation" class="nav-item">
<a class="nav-link" data-toggle="tab" href="#tableview" aria-controls="tableview" role="tab">Table</a>
</li>
<li role="presentation" class="nav-item map" style="display:none">
<a class="nav-link" data-toggle="tab" href="#mapview" aria-controls="mapview" role="tab">Map</a>
</li>
</ul>
<!-- Tab panes -->
<div class="tab-content data-view">
<div role="tabpanel" class="tab-pane active" id="chartview">
{% include components/charts/chart.html graph_type=meta.graph_type data=json_data %}
</div>
<div role="tabpanel" class="tab-pane" id="tableview">
<div id="selectionsTable"></div>
</div>
<div role="tabpanel" class="tab-pane" id="mapview" class="map">
<div id="map">
<img src="{{ site.baseurl }}/assets/img/loading.gif" alt="Loading map" />
</div>
</div>
</div>
</div>
{% endif %}
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="nav-item active">
<a class="nav-link" data-toggle="tab" href="#metadata" aria-controls="metadata" role="tab">National Metadata</a>
</li>
<li role="presentation" class="nav-item">
<a class="nav-link" data-toggle="tab" href="#globalmetadata" aria-controls="globalmetadata" role="tab">Global Metadata</a>
</li>
<li role="presentation" class="nav-item">
<a class="nav-link" data-toggle="tab" href="#sources" aria-controls="sources" role="tab">Sources</a>
</li>
{% if site.environment == 'staging' %}
<li role="presentation" class="nav-item">
<a class="nav-link" data-toggle="tab" href="#edit" aria-controls="edit" role="tab">Edit</a>
</li>
{% endif %}
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="metadata">
<!-- National Metadata -->
<div > <!-- formerly class="collapsible expanded" -->
<!-- <h3 tabindex='0'>National Metadata</h3> -->
<article>
<p>This table provides metadata for the actual indicator available from {{ site.country.name }} statistics closest to the corresponding global
SDG indicator. Please note that even when the global SDG indicator is fully available from {{ site.country.adjective }} statistics, this table
should be consulted for information on national methodology and other {{ site.country.adjective }}-specific metadata information.</p>
{% include components/metadata.html scope='national' %}
</article>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="globalmetadata">
<!-- Global Metadata -->
<div> <!-- formerly <div class="collapsible expanded"> -->
<!-- <h3 tabindex='0'>Global Metadata</h3> -->
<article>
<p>This table provides information on metadata for SDG indicators as defined by the UN Statistical Commission. <a href="https://unstats.un.org/sdgs/metadata/">Complete global metadata</a> is provided by the UN Statistics Division.</p>
{% include components/metadata.html scope='global' %}
</article>
</div>
</div>
<div role="tabpanel" class="tab-pane" id="sources">
{% include components/sources.html %}
</div>
{% if site.environment == 'staging' %}
<div role="tabpanel" class="tab-pane" id="edit">
<div class="edit-container">
<a class="btn btn-primary" href="http://prose.io/#{{ site.org_name }}/{{ site.repo_name }}/edit/{{ site.branch }}/data/indicator_{{ meta.indicator | slugify }}.csv">Edit Data</a>
<a class="btn btn-primary" href="http://prose.io/#{{ site.org_name }}/{{ site.repo_name }}/edit/{{ site.branch }}/meta/{{ meta.indicator | slugify }}.md">Edit Metadata</a>
</div>
</div>
{% endif %}
</div>
</section>
</div>
</div>
</div>
{% include footer.html %}