-
Notifications
You must be signed in to change notification settings - Fork 0
/
dep_wheel_blank_template.html
executable file
·82 lines (69 loc) · 3.44 KB
/
dep_wheel_blank_template.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
81
82
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us" prefix="og: http://ogp.me/ns#">
<!-- Use the Source, Luke -->
<head>
<title>An Interactive Visualization of the Housing Characteristic Dependencies in ResStock</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<link rel="stylesheet" href="../../../docs/visualizations/dependencyWheels/css/bootstrap.min.css">
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'>
<style>
.dependencyWheel {
font: 11px sans-serif;
}
</style>
<script type="text/javascript"
src="http://www.maths.nottingham.ac.uk/personal/drw/LaTeXMathML.js">
</script>
</head>
<body>
<div class="container">
<h1>An Interactive Visualization of the Housing Characteristic Dependencies in ResStock</h1>
<p class="lead">ResStock is built upon the conditional probabilites of the housing characteristics. Each housing characteristic has a set of dependencies and dependants. In this dependency wheel, each chord in the disc represents a dependency. The thin part of the cord represents a dependency to the thicker part of the cord. Try hovering on packages to mask other dependencies. The Dependency Wheel is a graph produced from the <a href="https://github.com/fzaninotto/DependencyWheel">fzaninotto/DependencyWheel</a> repository. Built with <a href="https://github.com/mbostock/d3">d3.js.</a> The thin part of the cord represents a dependency to the thicker part of the cord. Try hovering on packages to mask other dependencies.</p>
<div id="chart_backward"></div>
<script src="../../../docs/visualizations/dependencyWheels/js/d3.v4.min.js"></script>
<script src="../../../docs/visualizations/dependencyWheels/js/d3.dependencyWheel.js"></script>
<script src="../../../docs/visualizations/dependencyWheels/js/composerBuilder.js"></script>
<script>
var gitHubApiUrl = 'https://api.github.com/repos/';
var getData = function(target, callback) {
var responses = {
composerjson: null,
composerlock: null
};
var checkFinished = function() {
if (responses.composerjson && responses.composerlock) {
callback(responses.composerjson, responses.composerlock);
}
}
d3.xhr(gitHubApiUrl + target + '/contents/composer.json', 'application/vnd.github.VERSION.raw', function(err, composerjson) {
responses.composerjson = JSON.parse(composerjson.responseText);
checkFinished();
});
d3.xhr(gitHubApiUrl + target + '/contents/composer.lock', 'application/vnd.github.VERSION.raw', function(err, composerlock) {
responses.composerlock = JSON.parse(composerlock.responseText);
checkFinished();
});
};
var chart = d3.chart.dependencyWheel().padding(.05).width(1100).margin(250);
d3.json('composer_backward.json', function(composerjson) {
d3.json('composer_backward.lock', function(composerlock) {
var data = buildMatrixFromComposerJsonAndLock(composerjson, composerlock);
d3.select('#chart_backward')
.datum(data)
.call(chart);
});
});
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-26354577-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>