forked from SciLifeLab/genomics-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
goals.html
103 lines (86 loc) · 3.95 KB
/
goals.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Genomics Production Goal</title>
<script type="text/javascript" src="d3/d3.v3.js"></script>
<script type="text/javascript" src="d3/box.js"></script>
<script type="text/javascript" src="d3/colorbrewer.js"></script>
<script type="text/javascript" src="dashboard.js"></script>
<!--<script type="text/javascript" src="dashboard_problems.js"></script>-->
<script type="text/javascript" src="stack.js"></script>
<script type="text/javascript" src="goals.js"></script>
<link rel="stylesheet" type="text/css" href="goals.css">
</head>
<body>
<!--Empty invisible tooltip div-->
<div class="tooltip" style="opacity: 0"></div>
<div id="header">
<div id="header_title">
<h1 id="title">Production performance goal</h1>
</div>
</div>
<br class="clear">
<div id="status_panels">
<!--Delivery time run chart-->
<div id="total_del_times" class="times_panel">
<h2>Total delivery times - <span id="total_legend">RNA-seq (total RNA), WG re-seq, and Exome capture projects</span></h2>
Projects started between 2014-01-01 - <span id="date"></span>
<h3>Queue date - All samples sequenced</h3>
<div id="total_rc">
<h3>Run chart</h3>
<!--<h3 id="total_rc_legend">All projects</h3>-->
</div>
<div id="total_bp" class="boxplot_panel">
<h3>Variability</h3>
<!--<h3 id="total_bp_legend">All projects</h3>-->
</div>
</div>
</div>
<script type="text/javascript">
// Reload window every hour
var oneHour = 1000*60*60;
window.setTimeout(function() {
window.location.reload();
},
//20000
oneHour
);
var today = new Date(); // today
var twelveWeeks = new Date( today.getTime() - 12 * 7 * 1000*60*60*24);
var twentysixWeeks = new Date( today.getTime() - 26 * 7 * 1000*60*60*24);
var yearStart = new Date("2014-01-01");
//console.log("yearStart:" + yearStart + ", today: " + today);
var winWidth = window.innerWidth;
var winHeight = window.innerHeight;
//console.log("w: " + winWidth + ", h: " + winHeight);
var panelHeights = (winHeight - 210);
var drawWidth = (winWidth - 500);
var rc_width = drawWidth;
var dateFormat = d3.time.format("%Y-%m-%d");
//var dateStr = today.toDateString();
var dateStr = dateFormat(today);
d3.select("#date")
.text(dateStr);
/*
* Database server source
*/
var dbSource = "" // local, dev or "" (=tools)
/*
* Get data for projects & draw
*/
var dataUrl = "getCouchDbData.php?db=projects&design=genomics-dashboard&view=dates_and_load_per_sample&reduce=false&" + dbSource;
d3.json(dataUrl, function(json){
var reduced = reduceToProject(json);
console.log(reduced);
var dataSet = generateStandardRunchartDataset (reduced, yearStart, today, "Queue date", "All samples sequenced");
console.log(dataSet);
var totalBpDataset = generateFilteredGenericBoxDataset(dataSet, 4, 6);
var maxY = d3.max(dataSet, function(d) {return d[4];});
drawGoalRunChart(dataSet, "total_rc", [6], rc_width, panelHeights, 30);
drawBoxPlot(totalBpDataset, "total_bp", panelHeights, maxY);
//drawProcessPanels(json, today, twelveWeeks, panelHeights, drawWidth);
});
</script>
</body>
</html>