36
36
37
37
38
38
{% block profile_detail %}
39
- < article id ="demographics "
40
- class ="clearfix {% if 'demographics' not in selected_sections %}hide{% endif %} ">
41
- < header class ="section-contents ">
42
- < h1 > Demographics</ h1 >
43
- </ header >
44
- < div class ="section-container ">
45
-
46
- < section class ="clearfix stat-row ">
47
- < h2 class ="header-for-columns ">
48
- < a class ="permalink "
49
- href ="#pop_count "
50
- id ="pop_count "> Population < i
51
- class ="fa fa-link "> </ i > </ a > </ h2 >
52
- < div class ="column-quarter ">
53
- {% include 'profile/_blocks/_stat_list.html' with stat=demographics.total_population stat_type='number' %}
54
- </ div >
55
- < div class ="column-quarter "
56
- id ="chart-pie-demographics-sex_ratio "
57
- data-stat-type ="percentage " data-chart-title ="Sex "> </ div >
58
- < div class ="column-quarter ">
59
- {% include 'profile/_blocks/_stat_list.html' with stat=demographics.urbanised stat_type='percentage' %}
60
- </ div >
61
- < div class ="column-quarter "
62
- id ="chart-grouped_column-demographics-urban_distribution "
63
- data-stat-type ="scaled-percentage "
64
- data-chart-title ="Urban vs rural by sex "> </ div >
65
- </ section >
66
-
67
- </ div >
68
- </ article >
69
-
70
- < article id ="households "
71
- class ="clearfix {% if 'households' not in selected_sections %}hide{% endif %} ">
72
- < header class ="section-contents ">
73
- < h1 > Households</ h1 >
74
- </ header >
75
- < div class ="section-container ">
39
+ {% if not demographics.is_missing %}
40
+ < article id ="demographics "
41
+ class ="clearfix ">
42
+ < header class ="section-contents ">
43
+ < h1 > Demographics</ h1 >
44
+ </ header >
45
+ < div class ="section-container ">
76
46
77
- < section class ="clearfix stat-row ">
78
- < h2 > < a class ="permalink " href ="#households "> Households < i
79
- class ="fa fa-link "> </ i > </ a > </ h2 >
80
- < div class ="column-third ">
81
- {% include 'profile/_blocks/_stat_list.html' with stat=households.total_households stat_type='number' %}
82
- </ div >
83
- </ section >
84
- {% if not households.percentage_by_permanency.is_missing %}
85
47
< section class ="clearfix stat-row ">
86
- < h2 > < a class ="permalink " href ="#households-water "
87
- id ="households-water "> Percentage by Permanency < i
88
- class ="fa fa-link "> </ i > </ a > </ h2 >
89
- < div class ="column-three-quarters "
90
- id ="chart-histogram-households-percentage_by_permanency "
91
- data-stat-type ="scaled-percentage "
92
- data-chart-title ="Households Percentage by permanency "> </ div >
48
+ < h2 class ="header-for-columns ">
49
+ < a class ="permalink "
50
+ href ="#pop_count "
51
+ id ="pop_count "> Population < i
52
+ class ="fa fa-link "> </ i > </ a > </ h2 >
53
+ < div class ="column-quarter ">
54
+ {% include 'profile/_blocks/_stat_list.html' with stat=demographics.total_population stat_type='number' %}
55
+ </ div >
56
+ {% if not demographics.sex_ratio.is_missing %}
57
+ < div class ="column-quarter "
58
+ id ="chart-pie-demographics-sex_ratio "
59
+ data-stat-type ="percentage " data-chart-title ="Sex "> </ div >
60
+ {% endif %} <!-- end if -->
61
+ {% if not demographics.urbanised %}
62
+ < div class ="column-quarter ">
63
+ {% include 'profile/_blocks/_stat_list.html' with stat=demographics.urbanised stat_type='percentage' %}
64
+ </ div >
65
+ {% endif %} <!-- end if -->
66
+
67
+ {% if not demographics.urban_distribution.is_missing %}
68
+ < div class ="column-quarter "
69
+ id ="chart-grouped_column-demographics-urban_distribution "
70
+ data-stat-type ="scaled-percentage "
71
+ data-chart-title ="Urban vs rural by sex "> </ div >
72
+ {% endif %} <!-- end if -->
93
73
</ section >
94
- {% endif %} <!-- end if -->
95
74
96
- {% if not households.light_source_distribution.is_missing %}
97
- < section class =" clearfix stat-row " >
98
- < h2 > < a class =" permalink " href =" #households-lighting "
99
- id =" households-lighting " > Main source of lighting < i
100
- class =" fa fa-link " > </ i > </ a > </ h2 >
101
- < div class =" column-three-quarters "
102
- id =" chart-histogram- households-light_source_distribution "
103
- data-stat-type =" scaled-percentage "
104
- data-chart-title =" Light source distribution " > </ div >
105
- </ section >
106
- {% endif %} <!-- end if -- >
75
+ </ div >
76
+ </ article >
77
+ {% endif %} <!-- end if -->
78
+
79
+ {% if not households.is_missing %}
80
+ < article id =" households "
81
+ class =" clearfix {% if ' households' not in selected_sections %}hide{% endif %} " >
82
+ < header class =" section-contents " >
83
+ < h1 > Households </ h1 >
84
+ </ header >
85
+ < div class =" section-container " >
107
86
108
- {% if not households.energy_source_distribution.is_missing %}
109
87
< section class ="clearfix stat-row ">
110
- < h2 > < a class ="permalink " href ="#households-lighting "
111
- id ="households-lighting "> Main source of energy < i
88
+ < h2 > < a class ="permalink " href ="#households "> Households < i
112
89
class ="fa fa-link "> </ i > </ a > </ h2 >
113
- < div class ="column-three-quarters "
114
- id ="chart-histogram-households-energy_source_distribution "
115
- data-stat-type ="scaled-percentage "
116
- data-chart-title ="Energy source distribution "> </ div >
90
+ < div class ="column-third ">
91
+ {% include 'profile/_blocks/_stat_list.html' with stat=households.total_households stat_type='number' %}
92
+ </ div >
117
93
</ section >
118
- {% endif %} <!-- end if -->
94
+ {% if not households.percentage_by_permanency.is_missing %}
95
+ < section class ="clearfix stat-row ">
96
+ < h2 > < a class ="permalink " href ="#households-water "
97
+ id ="households-water "> Percentage by Permanency < i
98
+ class ="fa fa-link "> </ i > </ a > </ h2 >
99
+ < div class ="column-three-quarters "
100
+ id ="chart-histogram-households-percentage_by_permanency "
101
+ data-stat-type ="scaled-percentage "
102
+ data-chart-title ="Households Percentage by permanency "> </ div >
103
+ </ section >
104
+ {% endif %} <!-- end if -->
105
+
106
+ {% if not households.light_source_distribution.is_missing %}
107
+ < section class ="clearfix stat-row ">
108
+ < h2 > < a class ="permalink " href ="#households-lighting "
109
+ id ="households-lighting "> Main source of lighting < i
110
+ class ="fa fa-link "> </ i > </ a > </ h2 >
111
+ < div class ="column-three-quarters "
112
+ id ="chart-histogram-households-light_source_distribution "
113
+ data-stat-type ="scaled-percentage "
114
+ data-chart-title ="Light source distribution "> </ div >
115
+ </ section >
116
+ {% endif %} <!-- end if -->
117
+
118
+ {% if not households.energy_source_distribution.is_missing %}
119
+ < section class ="clearfix stat-row ">
120
+ < h2 > < a class ="permalink " href ="#households-lighting "
121
+ id ="households-lighting "> Main source of energy < i
122
+ class ="fa fa-link "> </ i > </ a > </ h2 >
123
+ < div class ="column-three-quarters "
124
+ id ="chart-histogram-households-energy_source_distribution "
125
+ data-stat-type ="scaled-percentage "
126
+ data-chart-title ="Energy source distribution "> </ div >
127
+ </ section >
128
+ {% endif %} <!-- end if -->
129
+
130
+ </ div >
131
+ </ article >
132
+ {% endif %} <!-- end if -->
119
133
120
- </ div >
121
- </ article >
122
134
123
135
< article id ="disability "
124
136
class ="clearfix {% if 'households' not in selected_sections %}hide{% endif %} ">
@@ -132,17 +144,23 @@ <h2><a class="permalink" href="#households">Population <i
132
144
< div class ="column-quarter ">
133
145
{% include 'profile/_blocks/_stat_list.html' with stat=disability.total_ stat_type='number' %}
134
146
</ div >
135
- < div class ="column-quarter "
136
- id ="chart-pie-disability-disabled_or_not_distribution "
137
- data-stat-type ="percentage "
138
- data-chart-title ="With or Without Disability "> </ div >
147
+ {% if not disability.disabled_or_not_distribution.is_missing %}
148
+ < div class ="column-quarter "
149
+ id ="chart-pie-disability-disabled_or_not_distribution "
150
+ data-stat-type ="percentage "
151
+ data-chart-title ="With or Without Disability "> </ div >
152
+ {% endif %} <!-- end if -->
153
+
139
154
< div class ="column-quarter ">
140
155
{% include 'profile/_blocks/_stat_list.html' with stat=disability.total_disabled stat_type='percentage' %}
141
156
</ div >
142
- < div class ="column-quarter "
143
- id ="chart-pie-disability-disability "
144
- data-stat-type ="percentage "
145
- data-chart-title ="Type of disability "> </ div >
157
+ {% if not disability.disability.is_missing %}
158
+ < div class ="column-quarter "
159
+ id ="chart-pie-disability-disability "
160
+ data-stat-type ="percentage "
161
+ data-chart-title ="Type of disability "> </ div >
162
+ {% endif %} <!-- end if -->
163
+
146
164
</ section >
147
165
148
166
</ div >
@@ -170,13 +188,15 @@ <h2><a class="permalink" href="#households">Votes Cast
170
188
</ div >
171
189
172
190
</ section >
191
+ {% if not elections2016.candidate_distribution.is_missing %}
192
+ < section class ="clearfix stat-row ">
193
+ < div class ="column-three-quarters "
194
+ id ="chart-histogram-elections2016-candidate_distribution "
195
+ data-stat-type ="scaled-percentage "
196
+ data-chart-title ="Votes Distribution "> </ div >
197
+ </ section >
198
+ {% endif %} <!-- end if -->
173
199
174
- < section class ="clearfix stat-row ">
175
- < div class ="column-three-quarters "
176
- id ="chart-histogram-elections2016-candidate_distribution "
177
- data-stat-type ="scaled-percentage "
178
- data-chart-title ="Votes Distribution "> </ div >
179
- </ section >
180
200
</ div >
181
201
</ article >
182
202
0 commit comments