-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
46 lines (40 loc) · 1.8 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
<html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-EYZZ44XXW8"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-EYZZ44XXW8');
</script>
<title>Sleep Patterns 2021</title>
<meta charset="utf-8" />
<script src="https://d3js.org/d3.v5.min.js"></script>
<script type="text/javascript" src="helper.js"></script>
<script type="text/javascript" src="mainVis.js"></script>
<script src="//unpkg.com/d3-radial-axis"></script>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Proza+Libre&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Rubik&display=swap" rel="stylesheet">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2280%22>💤</text></svg>">
</head>
<body style="text-align: center; background-color: #fbfbfb; ">
<svg height="700" width="1000" class="mainVis"></svg>
<footer style="font-family: 'Rubik'; font-size: 15px;">
<p>Note: I don't condone this type of sleep schedule. <br/>
I am only able to sustain this (atrocious) habit because <br/> I am a student with fully remote (and recorded) lectures.
</p>
<p >Built by <a target="_blank" href="https://les-huang.netlify.app/">Lesley</a> 🧙♂️</p>
</footer>
<script>
let PI = Math.PI;
const getDataAndDrawVis = async() => {
let data = await d3.csv("sleep.csv");
console.log(data);
drawRadialChart(".mainVis", data);
}
getDataAndDrawVis();
</script>
</body>
</html>