-
Notifications
You must be signed in to change notification settings - Fork 0
/
supermarkets.html
45 lines (45 loc) · 1.63 KB
/
supermarkets.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="base.css" rel="stylesheet" />
<link href='https://api.tiles.mapbox.com/mapbox.js/v1.6.3/mapbox.css' rel='stylesheet' />
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div id='map'>
</div>
<div id='selections' class="selections">
<a href='#' class="show">Choose what supermarkets to display</a>
<div class='content'>
<a href='#' class="hide">Hide</a>
<div id="toggles">
</div>
</div>
</div>
<div id='loading'>
</div>
<div id='selected'>
<h1>Explore supermarkets in the UK</h1>
</div>
<div id='about'>
<a href='#' class="show">About</a>
<p class='content'>
Explore UK supermarkets using a voronoi diagram. Created by <a href="http://chriszetter.com">Chris Zetter</a>, powered by data from <a href="http://www.superlocate.net/">SuperLocate</a>, maps copyright
<a href='https://www.mapbox.com/about/maps/' target='_blank'>Mapbox and OpenStreetMap</a>.
<a href='#' class="hide">Hide</a>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.4.8/d3.min.js"></script>
<script src="https://api.tiles.mapbox.com/mapbox.js/v2.2.1/mapbox.js"></script>
<script src="voronoi_map.js"></script>
<script>
L.mapbox.accessToken = 'pk.eyJ1IjoiemV0dGVyIiwiYSI6ImVvQ3FGVlEifQ.jGp_PWb6xineYqezpSd7wA';
map = L.mapbox.map('map', 'zetter.i73ka9hn')
.fitBounds([[59.355596 , -9.052734], [49.894634 , 3.515625]]);
url = 'supermarkets.csv';
initialSelection = d3.set(['Tesco', 'Sainsburys']);
voronoiMap(map, url, initialSelection);
</script>
</body>
</html>