-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathindex.html
76 lines (70 loc) · 2.81 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Land use statistics map</title>
<!-- CSS libraries -->
<link href="http://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css" rel="stylesheet" type="text/css">
<!-- Custom CSS styles -->
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="container">
<div class="row">
<h3 class="nine columns">Land use statistics map</h3>
<select id="select-key" class="three columns">
<option value="urban" selected="selected">Urban area in %</option>
<option value="agriculture">Agricultural area in %</option>
<option value="forest">Forest area in %</option>
<option value="unproductive">Unproductive area in %</option>
</select>
</div>
<div id="map"><!-- Map container --></div>
<div id="legend"><!-- Legend container --></div>
<div id="details" class="hidden row"><!-- Details container --></div>
<div id="initial">
<h5>Instructions</h5>
<ul>
<li>Change the key using the dropdown above the map.</li>
<li>Select a municipality to show the details.</li>
<li>Scroll in the map to zoom in and out.</li>
</ul>
</div>
<div class="footer">
<strong>Data sources</strong>: Data from the Swiss Federal Statistical Office, both the <a href="http://www.bfs.admin.ch/bfs/portal/de/index/dienstleistungen/geostat/datenbeschreibung/generalisierte_gemeindegrenzen.html" target="_blank">geographical data</a> and the <a href="http://www.bfs.admin.ch/bfs/portal/de/index/regionen/02/daten.html" target="_blank">statistical data</a>.
</div>
</div>
<!-- Mustache template, rendered later to show the details of a feature -->
<script id="template" type="x-tmpl-mustache">
<h3 class="six columns">{{ name }}</h3>
<table class="five columns">
<tr>
<th>Total area:</th>
<td>{{ area }} km²</td>
</tr>
<tr>
<th>Urban area:</th>
<td>{{ urban }} %</td>
</tr>
<tr>
<th>Agricultural area:</th>
<td>{{ agriculture }} %</td>
</tr>
<tr>
<th>Forest area:</th>
<td>{{ forest }} %</td>
</tr>
<tr>
<th>Unproductive area:</th>
<td>{{ unproductive }} %</td>
</tr>
</table>
<a href="#" id="close-details" class="one column" onclick="hideDetails(); return false;">❌</a>
</script>
<!-- JS libraries -->
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.2.1/mustache.min.js"></script>
<!-- Custom JS code -->
<script src="map.js"></script>
</body>
</html>