-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhospitales.html
36 lines (32 loc) · 1.31 KB
/
hospitales.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
---
layout: default
title: Hospitales.
---
<div class="content">
<h2>Evolución de la ocupación hospitalaria en Aragón</h2>
<canvas id="chartHospitalsAragon"></canvas>
{% for province in site.data.hospitals.provinces %}
<h2>Evolución de la ocupación hospitalaria en {{province.name}}</h2>
<canvas id="chartHospitals{{province.name}}"></canvas>
{% endfor %}
<ul>
{% for province in site.data.hospitals.provinces %}
{% for municipality in province.municipalities %}
{% for hospital in municipality.hospitals %}
{% assign daily = hospital.daily_occupations | last %}
<li>{{hospital.name}}</li>
{% include dailyOccupation.html daily_occupations=hospital.daily_occupations type="hospital" name=hospital.name %}
{% endfor %}
{% endfor %}
{% endfor %}
</ul>
</div>
<script type="text/javascript">
var aragonHospitals = JSON.parse('{{site.data.hospitals | jsonify}}');
for (var index = 0; aragonHospitals.provinces.length > index; index++) {
var province = aragonHospitals.provinces[index];
var chartPlace = toChartPlace(province)
draw("chartHospitals" + province.name, getHospitalChartConfigFor(chartPlace));
}
draw("chartHospitalsAragon", getHospitalChartConfigFor(toChartPlace(aragonHospitals)));
</script>