-
Notifications
You must be signed in to change notification settings - Fork 0
/
annotations.py
54 lines (41 loc) · 2.95 KB
/
annotations.py
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
enableAnnotations = False
def annotate(ax, yOffsets):
if enableAnnotations:
ax.axvline(x='2020-09-18', linestyle='dashed', alpha=0.5, color='#6BADEF')
ax.text(x='2020-09-19', y=yOffsets[0], s='2nd lockdown', alpha=0.7, color='#000000')
ax.axvline(x='2020-12-27', linestyle='dashed', alpha=0.5, color='#6BADEF')
ax.text(x='2020-12-28', y=yOffsets[0], s='3rd lockdown', alpha=0.7, color='#000000')
# ax.axvline(x='2021-01-08', linestyle='dashed', alpha=0.5, color='#6BADEF')
# ax.text(x='2021-01-09', y=yOffsets[0], s='tighten', alpha=0.7, color='#000000')
# ax.axvline(x='2020-09-01', linestyle='dashed', alpha=0.5, color='#6BADEF')
# ax.text(x='2020-09-02', y=yOffsets[1], s='Schools open', alpha=0.7, color='#000000')
ax.axvline(x='2021-02-07', linestyle='dashed', alpha=0.5, color='#6BADEF')
ax.text(x='2021-02-08', y=yOffsets[0], s='end 3rd lockdown', alpha=0.7, color='#000000')
def annotateEndLockdown2(ax, yOffsets):
if enableAnnotations:
ax.axvline(x='2020-10-18', linestyle='dashed', alpha=0.5, color='#6BADEF')
ax.text(x='2020-10-19', y=yOffsets[0], s='End lockdown', alpha=0.7, color='#000000')
def annotateVaccines(ax, yOffsets):
if enableAnnotations:
# Sources:
# https://he.wikipedia.org/wiki/%D7%9C%D7%AA%D7%AA_%D7%9B%D7%AA%D7%A3#cite_note-15
ax.axvline(x='2021-01-10', linestyle='dashed', alpha=0.5, color='#685BB1')
ax.text(x='2021-01-10', y=yOffsets[0]+2, s='Start 2nd dose', alpha=0.7, color='#000000')
# https: // www.maariv.co.il / corona / corona - israel / Article - 814641
ax.axvline(x='2021-01-13', linestyle='dashed', alpha=0.5, color='#685BB1')
ax.text(x='2021-01-13', y=yOffsets[0], s='50+', alpha=0.7, color='#000000')
# https://www.mako.co.il/news-lifestyle/2021_q1/Article-746b21484c50771027.htm
ax.axvline(x='2021-01-17', linestyle='dashed', alpha=0.5, color='#685BB1')
ax.text(x='2021-01-17', y=yOffsets[0]-2, s='45+', alpha=0.7, color='#000000')
# https://www.mako.co.il/news-lifestyle/2021_q1/Article-3511a989fb91771027.htm
ax.axvline(x='2021-01-19', linestyle='dashed', alpha=0.5, color='#685BB1')
ax.text(x='2021-01-19', y=yOffsets[0]-4, s='40+', alpha=0.7, color='#000000')
# https://www.ynet.co.il/news/article/HJQkIN00Jd
ax.axvline(x='2021-01-23', linestyle='dashed', alpha=0.5, color='#685BB1')
ax.text(x='2021-01-23', y=yOffsets[0] + 2, s='16-18', alpha=0.7, color='#000000')
# https: // news.walla.co.il / item / 3414384
ax.axvline(x='2021-01-27', linestyle='dashed', alpha=0.5, color='#685BB1')
ax.text(x='2021-01-27', y=yOffsets[0], s='35+', alpha=0.7, color='#000000')
# https://www.haaretz.co.il/health/corona/1.9506936
ax.axvline(x='2021-02-04', linestyle='dashed', alpha=0.5, color='#685BB1')
ax.text(x='2021-02-04', y=yOffsets[0], s='All ages', alpha=0.7, color='#000000')