~humaid/areweherdimmuneyet

areweherdimmuneyet/template.html -rw-r--r-- 2.6 KiB
458b90b3 — Humaid AlQassimi Show first dose and last entry in template 16 days ago
                                                                                
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 lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" href="data:,">
    <meta name="description" content="UAE Herd-Immunity Estimation">
    <title>Are we herd-immune yet?</title>
    <style>
body {
  font-family: inter,san fransisco,-apple-system,blinkmacsystemfont,source sans pro,roboto,sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
  background-color: #fafafa;
}
h1, h2, p {
  margin: 2rem;
}
.question {
  color: #666;
  font-size: 3rem;
}
small {
  color: #666;
  font-size: 14pt;
}
.answer {
  font-size: 7rem;
}
.date {
  font-size: 5rem;
}
p {
  font-size: 2rem;
}
img {
  width: 100%;
}
    </style>
</head>
<body>
  <p>UAE COVID-19 Herd Immunity</p>
  <h1 class="question">Are we herd-immune yet?</h1>
  <h2 class="answer">No</h2>
  <p><b>We're almost there!</b> At the current rate, we estimate that we will
  reach adequate levels of herd immunity by</p>
  <p class="date">@estimate</p>
  <p id="est"><noscript><small>Enable JavaScript to show estimate
      countdown! Code is released under BSD-2.</small></noscript></p>
  <img src="chart.svg?v=@ver" />
  <h3>Explanation</h3>
  <p><small>The goal of @goal% of the people fully vaccinated is based on the
    estimated R0 rate of the delta variant. Estimates show the R0 of the delta
    variant is between 4-9<sup>[1]</sup>, we assume an R0 of 6.5.</small></p>

  <p><small>This estimate is predicted using polynomial regression, expect it
    to change frequently. Remember, this is <b>just an estimation</b> on an
    <b>arbitrary goal</b>.</small></p>

  <p><small>This is a hobbyist website, which is
    unaffiliated with any authority or official body.</small></p>

  <p><small>[1]: <a href="https://unchartedterritories.tomaspueyo.com/p/delta-variant-everything-you-need">
      Delta Variant: Everything You Need to Know</a></small></p>

  <p><small>Page generated: @today &middot; Latest entry: @lastEntry &middot;
    Data source: <a href="https://github.com/owid/covid-19-data">
    Our World in Data</a></small></p>
  <p><small>@vaccinated% of the people received at least the first dose. The
    goal is @goal%.</small></p>
  <p><small><a href="https://git.sr.ht/~humaid/areweherdimmuneyet"
               target="src">Website Source Code</a> (released under BSD
             2-Clause)</small></p>
  <script>
const date1 = @goalMs;
const ONE = 60 * 60 * 24; // seconds * minutes * hours
const today = new Date().getTime() / 1000;
const diff = Math.abs(date1 - today);
est = Math.floor(diff/ONE);
document.getElementById("est").innerHTML = "(in "+est+" days)";
  </script>