-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
80 lines (69 loc) · 3.62 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
77
78
79
80
<!DOCTYPE html>
<html class="ocks-org do-not-copy">
<head>
<meta charset="utf-8">
<title>Zoomable Treemaps</title>
<link rel="stylesheet" type="text/css" href="flare.css" />
</head>
<body>
<header>
<aside>June 8, 2012</aside>
<a href="../" rel="author">Mike Bostock</a>
<br/>
<aside>August 26, 2014</aside>
<a href="../../../../index.html" rel="author"
>Modified by Eric Bréchemier for MEDEA</a>
</header>
<h1>Zoomable Treemaps</h1>
<p id="chart"></p>
<div id="legend"></div>
<fieldset class="radio">
<ol class="radio">
<li>
<input type="radio" name="ar" value="AR1" id="radio-ar1" />
AR 1
</li>
<li>
<input type="radio" name="ar" value="AR2" id="radio-ar2" />
AR 2
</li>
<li>
<input type="radio" name="ar" value="AR3" id="radio-ar3" />
AR 3
</li>
<li>
<input type="radio" name="ar" value="AR4" id="radio-ar4" />
AR 4
</li>
<li>
<input type="radio" name="ar" value="AR5" id="radio-ar5" />
AR 5
</li>
<li>
<input type="radio" name="ar" value="ALL" id="radio-all-ar" />
ALL
</li>
</ol>
</fieldset>
<aside class="hint">Click any cell to zoom in, or the black row at the top to zoom out.</aside>
<p>Treemaps are a form of <a href="http://mbostock.github.com/d3/ex/treemap.html">space</a><a href="http://mbostock.github.com/d3/ex/pack.html">-filling</a> <a href="http://mbostock.github.com/d3/ex/sunburst.html">layout</a> where the area of each rectangle is proportional to its value.</p>
<p>
This example shows the participations of IPCC Authors grouped by:
</p>
<ol>
<li>WMO Region (color)</li>
<li>Country (text)</li>
<li>Institution Type (color)</li>
<li>Institution (text)</li>
<li>Role (color)</li>
<li>Author (text)</li>
</ol>
<p>Treemaps visualize hierarchical data, but since often only the leaf nodes (files rather than folders) are drawn, it can be difficult to see the hierarchy. <a href="http://en.wikipedia.org/wiki/File:Tree_Map.png">Padding</a> is sometimes used to show the hierarchy via containment, though this introduces area distortion. <a href="http://www.win.tue.nl/~vanwijk/ctm.pdf">Cushion gradients</a> also indicate hierarchy, but are somewhat unintuitive (or perhaps just ugly).</p>
<p>The treemap above uses interaction to reveal the hierarchy incrementally: clicking on a node zooms in. Only two levels of the hierarchy are visible at a time. This allows the layout’s aspect ratio (ideally φ) to be optimized for the current view, rather than computing a global layout. It also allows the exploration of arbitrarily-large datasets: data can be lazily-loaded and positioned on zoom!</p>
<p>This visualization is implemented in <a href="http://d3js.org">D3.js</a>, based on an <a href="http://mbostock.github.com/d3/talk/20111018/treemap.html">earlier version</a> from [Mike Bostock's] talk at SVG Open. Also see Nicolas Garcia Belmonte’s zoomable treemap of <a href="http://thejit.org/static/v20/Jit/Examples/Treemap/example1.html">music albums</a>, and The New York Times’ free-form zooming for <a href="http://www.nytimes.com/packages/html/newsgraphics/2011/0119-budget/">Obama’s 2012 budget proposal</a>. Note the subtle differences in behavior!</p>
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="utils.js"></script>
<script src="flare.js"></script>
</body>
</html>