Skip to content

Instantly share code, notes, and snippets.

@sbussard
Created January 6, 2021 16:30
Show Gist options
  • Save sbussard/a4b0bbaf1d885fd761437da6e206a4da to your computer and use it in GitHub Desktop.
Save sbussard/a4b0bbaf1d885fd761437da6e206a4da to your computer and use it in GitHub Desktop.
Covid 19 Estimate of Infection Fatality Rate
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.6-final"
},
"orig_nbformat": 2,
"kernelspec": {
"name": "python3",
"display_name": "Python 3",
"language": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2,
"cells": [
{
"source": [
"import plotly.express as px\n",
"import plotly.graph_objects as go\n",
"from pyspark.sql import SparkSession, SQLContext\n",
"from pyspark import SparkFiles\n",
"spark = SparkSession.builder.appName(\"covid-analysis\").getOrCreate()\n",
"sc = spark.sparkContext\n",
"sqlContext = SQLContext(sc)"
],
"cell_type": "code",
"metadata": {},
"execution_count": 2,
"outputs": []
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"def load(filepath):\n",
" spark.read.format(\"csv\")\\\n",
" .option(\"header\", \"true\")\\\n",
" .option(\"inferSchema\", \"true\")\\\n",
" .load(filepath)\\\n",
" .createOrReplaceTempView(filepath.split('/')[-1][:-4].replace('-','_'))"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"# Data Collected from https://github.com/owid/covid-19-data/tree/master/public/data on 2021/01/05\n",
"load('/Users/sbussard/Desktop/owid-covid-data.csv')"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"tags": []
},
"outputs": [
{
"output_type": "display_data",
"data": {
"application/vnd.plotly.v1+json": {
"config": {
"plotlyServerURL": "https://plot.ly"
},
"data": [
{
"mode": "lines",
"name": "Ephemeral Case Fatality Rate (Percent)",
"type": "scatter",
"x": [
"2020-01-22",
"2020-01-23",
"2020-01-24",
"2020-01-25",
"2020-01-26",
"2020-01-27",
"2020-01-28",
"2020-01-29",
"2020-01-30",
"2020-01-31",
"2020-02-01",
"2020-02-02",
"2020-02-03",
"2020-02-04",
"2020-02-05",
"2020-02-06",
"2020-02-07",
"2020-02-08",
"2020-02-09",
"2020-02-10",
"2020-02-11",
"2020-02-12",
"2020-02-13",
"2020-02-14",
"2020-02-15",
"2020-02-16",
"2020-02-17",
"2020-02-18",
"2020-02-19",
"2020-02-20",
"2020-02-21",
"2020-02-22",
"2020-02-23",
"2020-02-24",
"2020-02-25",
"2020-02-26",
"2020-02-27",
"2020-02-28",
"2020-02-29",
"2020-03-01",
"2020-03-02",
"2020-03-03",
"2020-03-04",
"2020-03-05",
"2020-03-06",
"2020-03-07",
"2020-03-08",
"2020-03-09",
"2020-03-10",
"2020-03-11",
"2020-03-12",
"2020-03-13",
"2020-03-14",
"2020-03-15",
"2020-03-16",
"2020-03-17",
"2020-03-18",
"2020-03-19",
"2020-03-20",
"2020-03-21",
"2020-03-22",
"2020-03-23",
"2020-03-24",
"2020-03-25",
"2020-03-26",
"2020-03-27",
"2020-03-28",
"2020-03-29",
"2020-03-30",
"2020-03-31",
"2020-04-01",
"2020-04-02",
"2020-04-03",
"2020-04-04",
"2020-04-05",
"2020-04-06",
"2020-04-07",
"2020-04-08",
"2020-04-09",
"2020-04-10",
"2020-04-11",
"2020-04-12",
"2020-04-13",
"2020-04-14",
"2020-04-15",
"2020-04-16",
"2020-04-17",
"2020-04-18",
"2020-04-19",
"2020-04-20",
"2020-04-21",
"2020-04-22",
"2020-04-23",
"2020-04-24",
"2020-04-25",
"2020-04-26",
"2020-04-27",
"2020-04-28",
"2020-04-29",
"2020-04-30",
"2020-05-01",
"2020-05-02",
"2020-05-03",
"2020-05-04",
"2020-05-05",
"2020-05-06",
"2020-05-07",
"2020-05-08",
"2020-05-09",
"2020-05-10",
"2020-05-11",
"2020-05-12",
"2020-05-13",
"2020-05-14",
"2020-05-15",
"2020-05-16",
"2020-05-17",
"2020-05-18",
"2020-05-19",
"2020-05-20",
"2020-05-21",
"2020-05-22",
"2020-05-23",
"2020-05-24",
"2020-05-25",
"2020-05-26",
"2020-05-27",
"2020-05-28",
"2020-05-29",
"2020-05-30",
"2020-05-31",
"2020-06-01",
"2020-06-02",
"2020-06-03",
"2020-06-04",
"2020-06-05",
"2020-06-06",
"2020-06-07",
"2020-06-08",
"2020-06-09",
"2020-06-10",
"2020-06-11",
"2020-06-12",
"2020-06-13",
"2020-06-14",
"2020-06-15",
"2020-06-16",
"2020-06-17",
"2020-06-18",
"2020-06-19",
"2020-06-20",
"2020-06-21",
"2020-06-22",
"2020-06-23",
"2020-06-24",
"2020-06-25",
"2020-06-26",
"2020-06-27",
"2020-06-28",
"2020-06-29",
"2020-06-30",
"2020-07-01",
"2020-07-02",
"2020-07-03",
"2020-07-04",
"2020-07-05",
"2020-07-06",
"2020-07-07",
"2020-07-08",
"2020-07-09",
"2020-07-10",
"2020-07-11",
"2020-07-12",
"2020-07-13",
"2020-07-14",
"2020-07-15",
"2020-07-16",
"2020-07-17",
"2020-07-18",
"2020-07-19",
"2020-07-20",
"2020-07-21",
"2020-07-22",
"2020-07-23",
"2020-07-24",
"2020-07-25",
"2020-07-26",
"2020-07-27",
"2020-07-28",
"2020-07-29",
"2020-07-30",
"2020-07-31",
"2020-08-01",
"2020-08-02",
"2020-08-03",
"2020-08-04",
"2020-08-05",
"2020-08-06",
"2020-08-07",
"2020-08-08",
"2020-08-09",
"2020-08-10",
"2020-08-11",
"2020-08-12",
"2020-08-13",
"2020-08-14",
"2020-08-15",
"2020-08-16",
"2020-08-17",
"2020-08-18",
"2020-08-19",
"2020-08-20",
"2020-08-21",
"2020-08-22",
"2020-08-23",
"2020-08-24",
"2020-08-25",
"2020-08-26",
"2020-08-27",
"2020-08-28",
"2020-08-29",
"2020-08-30",
"2020-08-31",
"2020-09-01",
"2020-09-02",
"2020-09-03",
"2020-09-04",
"2020-09-05",
"2020-09-06",
"2020-09-07",
"2020-09-08",
"2020-09-09",
"2020-09-10",
"2020-09-11",
"2020-09-12",
"2020-09-13",
"2020-09-14",
"2020-09-15",
"2020-09-16",
"2020-09-17",
"2020-09-18",
"2020-09-19",
"2020-09-20",
"2020-09-21",
"2020-09-22",
"2020-09-23",
"2020-09-24",
"2020-09-25",
"2020-09-26",
"2020-09-27",
"2020-09-28",
"2020-09-29",
"2020-09-30",
"2020-10-01",
"2020-10-02",
"2020-10-03",
"2020-10-04",
"2020-10-05",
"2020-10-06",
"2020-10-07",
"2020-10-08",
"2020-10-09",
"2020-10-10",
"2020-10-11",
"2020-10-12",
"2020-10-13",
"2020-10-14",
"2020-10-15",
"2020-10-16",
"2020-10-17",
"2020-10-18",
"2020-10-19",
"2020-10-20",
"2020-10-21",
"2020-10-22",
"2020-10-23",
"2020-10-24",
"2020-10-25",
"2020-10-26",
"2020-10-27",
"2020-10-28",
"2020-10-29",
"2020-10-30",
"2020-10-31",
"2020-11-01",
"2020-11-02",
"2020-11-03",
"2020-11-04",
"2020-11-05",
"2020-11-06",
"2020-11-07",
"2020-11-08",
"2020-11-09",
"2020-11-10",
"2020-11-11",
"2020-11-12",
"2020-11-13",
"2020-11-14",
"2020-11-15",
"2020-11-16",
"2020-11-17",
"2020-11-18",
"2020-11-19",
"2020-11-20",
"2020-11-21",
"2020-11-22",
"2020-11-23",
"2020-11-24",
"2020-11-25",
"2020-11-26",
"2020-11-27",
"2020-11-28",
"2020-11-29",
"2020-11-30",
"2020-12-01",
"2020-12-02",
"2020-12-03",
"2020-12-04",
"2020-12-05",
"2020-12-06",
"2020-12-07",
"2020-12-08",
"2020-12-09",
"2020-12-10",
"2020-12-11",
"2020-12-12",
"2020-12-13",
"2020-12-14",
"2020-12-15",
"2020-12-16",
"2020-12-17",
"2020-12-18",
"2020-12-19",
"2020-12-20",
"2020-12-21",
"2020-12-22",
"2020-12-23",
"2020-12-24",
"2020-12-25",
"2020-12-26",
"2020-12-27",
"2020-12-28",
"2020-12-29",
"2020-12-30",
"2020-12-31",
"2021-01-01",
"2021-01-02",
"2021-01-03",
"2021-01-04",
"2021-01-05"
],
"y": [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
12.5,
0,
21.73913043478261,
5.2631578947368425,
12.121212121212121,
1.2987012987012987,
3.7735849056603774,
1.8072289156626506,
3.4482758620689653,
1.3333333333333333,
3.1914893617021276,
1.36986301369863,
2.277904328018223,
1.263823064770932,
0.922266139657444,
5.128205128205129,
1.8404907975460123,
1.9639934533551555,
2.220549491908167,
1.6021361815754338,
1.617716349929323,
1.651376146788991,
1.245753114382786,
1.6650342801175317,
2.271013946475688,
2.699792960662526,
2.309417040358744,
2.7890792291220556,
3.238639261488244,
3.1357593092854494,
3.156416991214564,
4.145766833865329,
3.8901955929685568,
4.641350210970464,
4.3682377813704765,
4.768808414818471,
5.2904737987610915,
5.59609930208101,
8.376946331632155,
6.860986547085202,
6.141644636148602,
6.446828927854837,
7.324349346775024,
6.66104862052541,
7.262673495138425,
8.507161729940202,
10.224900547481193,
7.1906298871992815,
6.369660142294421,
7.050503607400529,
7.393545923238495,
7.3908363049182535,
9.830416602137216,
8.47357028140493,
7.293152639087019,
6.695778748180495,
5.597321164768064,
5.049025132424208,
6.208331563972992,
9.09276748845006,
9.555420681283666,
8.261659185142035,
5.412786018167184,
6.158101615955744,
4.553607827150428,
5.515487555759369,
9.373589859293597,
9.616801768607221,
7.000291375291376,
6.533133657806065,
6.172591281968796,
4.795241604379409,
5.094175897095605,
7.1425414364640885,
8.574242797340556,
6.5739476887888735,
6.745887393395578,
5.270578478125648,
4.130305165591631,
5.293456262648977,
7.139791100300473,
6.677531603752808,
4.703037866084311,
5.285987667446311,
5.340622371740959,
3.059757004711133,
2.9591782425887487,
3.4177869700103414,
8.16927523586192,
5.288461538461538,
4.772848524643986,
3.9937846463967746,
3.6423494983277593,
4.49237848720161,
4.894940167718835,
5.048040262315083,
4.705991553348494,
3.485464207564864,
3.303912776702695,
2.533498479900912,
2.8834075596665523,
5.045292341476805,
4.280952380952381,
3.6996735582154514,
3.2875170806205287,
3.0725587342176763,
1.6531094200997114,
1.974323564012071,
3.496056277979109,
2.789100241545894,
2.4789840815596493,
2.1110292468847103,
1.9008290514768464,
1.1511686695445884,
1.2477489066117828,
2.3311897106109325,
2.201963125855591,
1.3484424870722715,
1.388491583232479,
1.2237465096515723,
0.7125773602584018,
0.9562129001813079,
1.376206626663188,
1.3394937102034477,
1.3097141625195379,
1.2761583367273714,
0.6226377995761694,
0.5959142999501744,
0.8342334474754671,
1.9834275077014316,
1.42780623347059,
1.5937016909174941,
1.196291936433196,
1.162943064928258,
0.7840936149947274,
0.7236435969545236,
1.3598094195285797,
1.4097550936406669,
1.2553937608364076,
1.2733009911174746,
1.381957773512476,
0.770586007607067,
0.8755715536530791,
1.7320690950056328,
1.6874112438392783,
1.5923427688990546,
1.5634362913330064,
1.3597507635169355,
0.9245076586433261,
1.9964381121994657,
2.0624523990860624,
1.983789288653897,
1.7997816658307024,
1.8312090339645675,
1.9371441665344684,
0.9024020774724085,
1.2446927374301675,
2.3692539035862286,
2.5695223041152793,
2.0636256522470964,
2.1125434406724533,
1.9994825738256274,
1.1407908047956263,
1.117180761490122,
2.2150615650540963,
2.6754672361152783,
2.0414857694163047,
2.067407384482065,
2.210585053869597,
1.408967491010494,
1.2248445180739251,
2.9102001736768277,
2.7903263084907444,
2.455270875485939,
2.2455765836035964,
2.2570446100943897,
1.3340696390164506,
1.2279018774838975,
3.036659674358206,
2.7061431424620856,
2.428656822156789,
2.0475491135091417,
1.867283950617284,
1.2719563900666262,
1.6923120680337893,
2.5157685205170637,
2.5455343427693657,
2.414037009149611,
1.9150674558099678,
1.8015302573614653,
1.307459837760458,
1.1968141743685847,
1.6691901473466524,
3.4083544452954695,
2.5254063633594552,
2.532604122843921,
1.7447961150833353,
1.1459484614042232,
1.2196199734865223,
3.271942080528388,
2.5595145480006223,
1.918725877290271,
1.8810184429574017,
1.6937508883308854,
0.6486402000625195,
0.8120649651972158,
2.5661852425311573,
2.8112762260432067,
1.987269392598986,
1.9373195531193774,
1.6976246763480807,
0.7730373144309215,
1.0233016890642337,
2.0746303684581084,
2.27866473149492,
1.8801875784328834,
1.6984865696800908,
1.418161550688438,
0.97736057426836,
1.1695756769207146,
1.5827467156884725,
1.810186737128547,
1.6548544103834002,
1.718618666952805,
1.1650734821936408,
0.919188875016145,
0.8463305525329464,
1.5134800363854535,
1.6757421986951464,
1.2582124705590678,
1.3147538116199748,
1.3324626733966327,
0.9005727237771437,
0.6825023097785593,
1.4906670572344547,
1.86133307813771,
1.139078441983554,
1.1707844994035395,
1.148647014726864,
0.6270451504747167,
0.7213193259704888,
1.26532330194139,
1.2869848874843905,
1.0694831938355254,
1.0461269963674737,
1.0009864143837153,
0.40476898433678316,
0.638410214563433,
1.2408816999682841,
1.0553579712385959,
0.8944627750238471,
0.9436788496105453,
0.7871014909817768,
0.44313012651817285,
0.5614283130846499,
0.9877890323831128,
0.9803181228418242,
0.7361471060101197,
0.6492492358492671,
0.7591520325299915,
0.47229910812354464,
0.45820379099388225,
1.0502775199496663,
1.090991477718329,
1.0420947263052527,
0.9638309229087767,
0.8027192807635244,
0.6248298393683638,
0.5437137548895655,
1.219638124304416,
1.248083125501389,
1.087963367530629,
0.6983931081431852,
0.7769230769230769,
0.6087333718912666,
0.7325797863891378,
1.405918111245715,
1.3818344786375858,
1.2929544669007296,
1.1271448993868922,
1.0444867113708831,
0.6185430609612226,
0.747133093941851,
1.1506376450282865,
1.3806217303732276,
1.282930001230207,
1.398908314620147,
1.0736699992702328,
0.7244147052534409,
0.7664734988172343,
1.512340986265268,
1.4917512073380221,
1.4116952155936209,
1.1299186106126635,
1.2975774143135668,
0.8007556501297447,
0.8864868255304024,
1.746700220841251,
1.4815239540237997,
1.457816845101303,
1.2207294432355817,
0.733902037538008,
0.8034450447576706,
1.0307299103660952,
1.8461995102525415,
1.6350841087265529,
1.50408024107516,
1.2770382177502708,
0.8060748056243718,
0.6622988516669122,
1.0544279880538794,
null
]
},
{
"mode": "lines",
"name": "Case Fatality Rate (Percent)",
"type": "scatter",
"x": [
"2020-01-22",
"2020-01-23",
"2020-01-24",
"2020-01-25",
"2020-01-26",
"2020-01-27",
"2020-01-28",
"2020-01-29",
"2020-01-30",
"2020-01-31",
"2020-02-01",
"2020-02-02",
"2020-02-03",
"2020-02-04",
"2020-02-05",
"2020-02-06",
"2020-02-07",
"2020-02-08",
"2020-02-09",
"2020-02-10",
"2020-02-11",
"2020-02-12",
"2020-02-13",
"2020-02-14",
"2020-02-15",
"2020-02-16",
"2020-02-17",
"2020-02-18",
"2020-02-19",
"2020-02-20",
"2020-02-21",
"2020-02-22",
"2020-02-23",
"2020-02-24",
"2020-02-25",
"2020-02-26",
"2020-02-27",
"2020-02-28",
"2020-02-29",
"2020-03-01",
"2020-03-02",
"2020-03-03",
"2020-03-04",
"2020-03-05",
"2020-03-06",
"2020-03-07",
"2020-03-08",
"2020-03-09",
"2020-03-10",
"2020-03-11",
"2020-03-12",
"2020-03-13",
"2020-03-14",
"2020-03-15",
"2020-03-16",
"2020-03-17",
"2020-03-18",
"2020-03-19",
"2020-03-20",
"2020-03-21",
"2020-03-22",
"2020-03-23",
"2020-03-24",
"2020-03-25",
"2020-03-26",
"2020-03-27",
"2020-03-28",
"2020-03-29",
"2020-03-30",
"2020-03-31",
"2020-04-01",
"2020-04-02",
"2020-04-03",
"2020-04-04",
"2020-04-05",
"2020-04-06",
"2020-04-07",
"2020-04-08",
"2020-04-09",
"2020-04-10",
"2020-04-11",
"2020-04-12",
"2020-04-13",
"2020-04-14",
"2020-04-15",
"2020-04-16",
"2020-04-17",
"2020-04-18",
"2020-04-19",
"2020-04-20",
"2020-04-21",
"2020-04-22",
"2020-04-23",
"2020-04-24",
"2020-04-25",
"2020-04-26",
"2020-04-27",
"2020-04-28",
"2020-04-29",
"2020-04-30",
"2020-05-01",
"2020-05-02",
"2020-05-03",
"2020-05-04",
"2020-05-05",
"2020-05-06",
"2020-05-07",
"2020-05-08",
"2020-05-09",
"2020-05-10",
"2020-05-11",
"2020-05-12",
"2020-05-13",
"2020-05-14",
"2020-05-15",
"2020-05-16",
"2020-05-17",
"2020-05-18",
"2020-05-19",
"2020-05-20",
"2020-05-21",
"2020-05-22",
"2020-05-23",
"2020-05-24",
"2020-05-25",
"2020-05-26",
"2020-05-27",
"2020-05-28",
"2020-05-29",
"2020-05-30",
"2020-05-31",
"2020-06-01",
"2020-06-02",
"2020-06-03",
"2020-06-04",
"2020-06-05",
"2020-06-06",
"2020-06-07",
"2020-06-08",
"2020-06-09",
"2020-06-10",
"2020-06-11",
"2020-06-12",
"2020-06-13",
"2020-06-14",
"2020-06-15",
"2020-06-16",
"2020-06-17",
"2020-06-18",
"2020-06-19",
"2020-06-20",
"2020-06-21",
"2020-06-22",
"2020-06-23",
"2020-06-24",
"2020-06-25",
"2020-06-26",
"2020-06-27",
"2020-06-28",
"2020-06-29",
"2020-06-30",
"2020-07-01",
"2020-07-02",
"2020-07-03",
"2020-07-04",
"2020-07-05",
"2020-07-06",
"2020-07-07",
"2020-07-08",
"2020-07-09",
"2020-07-10",
"2020-07-11",
"2020-07-12",
"2020-07-13",
"2020-07-14",
"2020-07-15",
"2020-07-16",
"2020-07-17",
"2020-07-18",
"2020-07-19",
"2020-07-20",
"2020-07-21",
"2020-07-22",
"2020-07-23",
"2020-07-24",
"2020-07-25",
"2020-07-26",
"2020-07-27",
"2020-07-28",
"2020-07-29",
"2020-07-30",
"2020-07-31",
"2020-08-01",
"2020-08-02",
"2020-08-03",
"2020-08-04",
"2020-08-05",
"2020-08-06",
"2020-08-07",
"2020-08-08",
"2020-08-09",
"2020-08-10",
"2020-08-11",
"2020-08-12",
"2020-08-13",
"2020-08-14",
"2020-08-15",
"2020-08-16",
"2020-08-17",
"2020-08-18",
"2020-08-19",
"2020-08-20",
"2020-08-21",
"2020-08-22",
"2020-08-23",
"2020-08-24",
"2020-08-25",
"2020-08-26",
"2020-08-27",
"2020-08-28",
"2020-08-29",
"2020-08-30",
"2020-08-31",
"2020-09-01",
"2020-09-02",
"2020-09-03",
"2020-09-04",
"2020-09-05",
"2020-09-06",
"2020-09-07",
"2020-09-08",
"2020-09-09",
"2020-09-10",
"2020-09-11",
"2020-09-12",
"2020-09-13",
"2020-09-14",
"2020-09-15",
"2020-09-16",
"2020-09-17",
"2020-09-18",
"2020-09-19",
"2020-09-20",
"2020-09-21",
"2020-09-22",
"2020-09-23",
"2020-09-24",
"2020-09-25",
"2020-09-26",
"2020-09-27",
"2020-09-28",
"2020-09-29",
"2020-09-30",
"2020-10-01",
"2020-10-02",
"2020-10-03",
"2020-10-04",
"2020-10-05",
"2020-10-06",
"2020-10-07",
"2020-10-08",
"2020-10-09",
"2020-10-10",
"2020-10-11",
"2020-10-12",
"2020-10-13",
"2020-10-14",
"2020-10-15",
"2020-10-16",
"2020-10-17",
"2020-10-18",
"2020-10-19",
"2020-10-20",
"2020-10-21",
"2020-10-22",
"2020-10-23",
"2020-10-24",
"2020-10-25",
"2020-10-26",
"2020-10-27",
"2020-10-28",
"2020-10-29",
"2020-10-30",
"2020-10-31",
"2020-11-01",
"2020-11-02",
"2020-11-03",
"2020-11-04",
"2020-11-05",
"2020-11-06",
"2020-11-07",
"2020-11-08",
"2020-11-09",
"2020-11-10",
"2020-11-11",
"2020-11-12",
"2020-11-13",
"2020-11-14",
"2020-11-15",
"2020-11-16",
"2020-11-17",
"2020-11-18",
"2020-11-19",
"2020-11-20",
"2020-11-21",
"2020-11-22",
"2020-11-23",
"2020-11-24",
"2020-11-25",
"2020-11-26",
"2020-11-27",
"2020-11-28",
"2020-11-29",
"2020-11-30",
"2020-12-01",
"2020-12-02",
"2020-12-03",
"2020-12-04",
"2020-12-05",
"2020-12-06",
"2020-12-07",
"2020-12-08",
"2020-12-09",
"2020-12-10",
"2020-12-11",
"2020-12-12",
"2020-12-13",
"2020-12-14",
"2020-12-15",
"2020-12-16",
"2020-12-17",
"2020-12-18",
"2020-12-19",
"2020-12-20",
"2020-12-21",
"2020-12-22",
"2020-12-23",
"2020-12-24",
"2020-12-25",
"2020-12-26",
"2020-12-27",
"2020-12-28",
"2020-12-29",
"2020-12-30",
"2020-12-31",
"2021-01-01",
"2021-01-02",
"2021-01-03",
"2021-01-04",
"2021-01-05"
],
"y": [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
4,
3.125,
10.909090909090908,
9.45945945945946,
10.280373831775702,
6.521739130434782,
5.9071729957805905,
4.218362282878412,
4.046242774566474,
3.7037037037037037,
3.580562659846547,
2.877070619006103,
2.711223203026482,
2.298332582244254,
1.9476158495634655,
2.179327521793275,
2.0730925411412695,
2.0423832923832923,
2.094012433198822,
1.9322257190953671,
1.8322516225661507,
1.7905859750240154,
1.6525606082341127,
1.6556003992535695,
1.7707855656284173,
1.933898477600221,
2.0112454250516665,
2.14924069026431,
2.3202562049639712,
2.4273363982222715,
2.524402963927626,
2.746426471429984,
2.911055775561386,
3.128298814666506,
3.2663516624262248,
3.4179468665189354,
3.5771950257568292,
3.7427982893649947,
4.087720868788878,
4.2824909848806945,
4.42154075418448,
4.556816967884162,
4.705175196408942,
4.798612314483705,
4.9095957088675934,
5.07463067425174,
5.275057095997916,
5.359411425967415,
5.405669927238358,
5.467633643250226,
5.5331786663547335,
5.602280505705644,
5.7346575364052805,
5.826560964208854,
5.882180562396378,
5.910749862973177,
5.90069990284098,
5.877486156165012,
5.885276011666169,
5.9618432661602005,
6.05198205861588,
6.111681499332044,
6.089874962890679,
6.0915158544324575,
6.059188229194785,
6.048237445652266,
6.114937724169539,
6.18393298621894,
6.201620737357373,
6.208464106109307,
6.207787658129224,
6.187727850007886,
6.171944527939365,
6.187857474639364,
6.222461218969105,
6.229136089617173,
6.23794026220504,
6.222138226235063,
6.196319018404908,
6.183085082188214,
6.196128257013405,
6.203131457790679,
6.178881367343774,
6.1658382890009955,
6.155010958358239,
6.117213899015345,
6.0816859056995,
6.051191232274756,
6.073933456141974,
6.063828926362176,
6.045898694105033,
6.018419325614469,
5.993122199738842,
5.978745422264738,
5.966215465460558,
5.9564823062858,
5.942128887293137,
5.9090875647336185,
5.880399275462127,
5.849783725686199,
5.823267037929097,
5.816100928658552,
5.799969576817535,
5.776098456010064,
5.7458390203354,
5.713538103691245,
5.676525629348417,
5.642220944687761,
5.618625850863073,
5.583915685688067,
5.544243198759709,
5.495946536643399,
5.445276884396883,
5.396775613368791,
5.3408660517190425,
5.294538801500876,
5.249889509430281,
5.184688692913802,
5.114670158160277,
5.050701016096106,
4.981586126840651,
4.918910181298721,
4.856996520376581,
4.78947278197932,
4.718760074142034,
4.6551528903171615,
4.590077355070739,
4.520650071226256,
4.465905301852606,
4.415519367445145,
4.3570076583312956,
4.301314272627495,
4.2349825115418795,
4.177136366145811,
4.116704588518873,
4.0578043182077295,
4.0045976260188985,
3.9540922892396364,
3.8961329846312185,
3.8443488141044995,
3.802810440939188,
3.7539226416962643,
3.70755581628418,
3.6751197623942873,
3.6391062791269637,
3.6042704054534553,
3.567777470939223,
3.533288441978323,
3.499437936793857,
3.4797315520241128,
3.458333151265365,
3.434419171225243,
3.4097280096977043,
3.3858908667614624,
3.368074221798318,
3.3436207588514426,
3.3236539573483896,
3.3121901745954037,
3.3037997341228524,
3.288686666797944,
3.274761273809024,
3.2609251367615704,
3.2413589254520225,
3.221009166514521,
3.2118196178379708,
3.205959773035949,
3.194438849856162,
3.180704451726525,
3.172254600644968,
3.158881500712206,
3.1457597637050254,
3.143826436497195,
3.1407783761886465,
3.135358614538844,
3.1276348264996816,
3.120964768890606,
3.110159978952774,
3.0981677262349767,
3.0977406057999617,
3.0946707700227436,
3.0895347737413106,
3.0812432623314683,
3.0719880867242106,
3.0615593776820016,
3.053561802111307,
3.04986213932837,
3.0464725455798356,
3.041962684216418,
3.0328363469751607,
3.0243248367656657,
3.0157183048100253,
3.0089333816525126,
3.003194261466247,
3.005358377488206,
3.002646527088374,
2.9991761059864714,
2.991243402304413,
2.9815040642918285,
2.9723707481138826,
2.9741608711875,
2.9717477733736906,
2.9646318156267566,
2.956728200937284,
2.948844210999515,
2.93586054015458,
2.9198311645176975,
2.917809600572259,
2.9172168880249516,
2.9110395765218566,
2.9044141041444265,
2.896831874826534,
2.885659257520629,
2.877195479267134,
2.872433646204902,
2.869035222925589,
2.862855726137962,
2.854177591330187,
2.8447403539364644,
2.8356095941663786,
2.8268675560996357,
2.8194595194936793,
2.8126730324945743,
2.803753073321184,
2.795828017524667,
2.7843013620569605,
2.773132371623612,
2.762914939887571,
2.7546915191081616,
2.746600189690995,
2.7345545821157673,
2.722443592120602,
2.7127196583497026,
2.7017312594560043,
2.6852388179253017,
2.6763707496413764,
2.670243729897754,
2.6564596839948202,
2.642242767690398,
2.6278453376864244,
2.613482490267871,
2.5989640842107584,
2.5874221557036186,
2.5759077691186216,
2.5607110220797202,
2.544221294271006,
2.5291607029636123,
2.505205410230455,
2.4885301223571528,
2.4718879853573528,
2.4565540137549533,
2.4359285524551666,
2.416640214565181,
2.3955663238887346,
2.3740895907827766,
2.3524152756316776,
2.33398361749329,
2.3151307276997932,
2.291038263497787,
2.2637850956409133,
2.2407102414013007,
2.218963297566705,
2.194026738413675,
2.1779567023909054,
2.161823224156587,
2.1437922336885733,
2.1244233332593456,
2.1047969212947018,
2.0871356682858013,
2.0663005604574045,
2.0546377163997787,
2.0431250847124915,
2.0346859868619256,
2.0139467779230666,
1.9994505773932805,
1.9851489281755583,
1.9706616746519992,
1.963124127887691,
1.9547816317932876,
1.9445424987277178,
1.9315176543476231,
1.9184418995318535,
1.9025531140978644,
1.887952884177484,
1.8773635659933463,
1.870237945727698,
1.8617230163165355,
1.8549062285435267,
1.8443021301496447,
1.8311644061281138,
1.8186998530598246,
1.815087874259807,
1.810388397657612,
1.8049004316524535,
1.795253617569706,
1.789719316145724,
1.7792807564984596,
1.7698151869698546,
1.7695684339671611,
1.766031909485314,
1.7627482120205344,
1.7598544650673051,
1.7476137216023104,
1.7401917597100038,
1.7340676745032608,
1.7352293984048117,
1.7340659220419545,
1.7314477846575889,
1.727822069719082,
1.7143975595245788,
1.7036669155279611,
1.6980382511718708,
null
]
},
{
"mode": "lines",
"name": "Adjusted Case Fatality Rate (Percent)",
"type": "scatter",
"x": [
"2020-01-22",
"2020-01-23",
"2020-01-24",
"2020-01-25",
"2020-01-26",
"2020-01-27",
"2020-01-28",
"2020-01-29",
"2020-01-30",
"2020-01-31",
"2020-02-01",
"2020-02-02",
"2020-02-03",
"2020-02-04",
"2020-02-05",
"2020-02-06",
"2020-02-07",
"2020-02-08",
"2020-02-09",
"2020-02-10",
"2020-02-11",
"2020-02-12",
"2020-02-13",
"2020-02-14",
"2020-02-15",
"2020-02-16",
"2020-02-17",
"2020-02-18",
"2020-02-19",
"2020-02-20",
"2020-02-21",
"2020-02-22",
"2020-02-23",
"2020-02-24",
"2020-02-25",
"2020-02-26",
"2020-02-27",
"2020-02-28",
"2020-02-29",
"2020-03-01",
"2020-03-02",
"2020-03-03",
"2020-03-04",
"2020-03-05",
"2020-03-06",
"2020-03-07",
"2020-03-08",
"2020-03-09",
"2020-03-10",
"2020-03-11",
"2020-03-12",
"2020-03-13",
"2020-03-14",
"2020-03-15",
"2020-03-16",
"2020-03-17",
"2020-03-18",
"2020-03-19",
"2020-03-20",
"2020-03-21",
"2020-03-22",
"2020-03-23",
"2020-03-24",
"2020-03-25",
"2020-03-26",
"2020-03-27",
"2020-03-28",
"2020-03-29",
"2020-03-30",
"2020-03-31",
"2020-04-01",
"2020-04-02",
"2020-04-03",
"2020-04-04",
"2020-04-05",
"2020-04-06",
"2020-04-07",
"2020-04-08",
"2020-04-09",
"2020-04-10",
"2020-04-11",
"2020-04-12",
"2020-04-13",
"2020-04-14",
"2020-04-15",
"2020-04-16",
"2020-04-17",
"2020-04-18",
"2020-04-19",
"2020-04-20",
"2020-04-21",
"2020-04-22",
"2020-04-23",
"2020-04-24",
"2020-04-25",
"2020-04-26",
"2020-04-27",
"2020-04-28",
"2020-04-29",
"2020-04-30",
"2020-05-01",
"2020-05-02",
"2020-05-03",
"2020-05-04",
"2020-05-05",
"2020-05-06",
"2020-05-07",
"2020-05-08",
"2020-05-09",
"2020-05-10",
"2020-05-11",
"2020-05-12",
"2020-05-13",
"2020-05-14",
"2020-05-15",
"2020-05-16",
"2020-05-17",
"2020-05-18",
"2020-05-19",
"2020-05-20",
"2020-05-21",
"2020-05-22",
"2020-05-23",
"2020-05-24",
"2020-05-25",
"2020-05-26",
"2020-05-27",
"2020-05-28",
"2020-05-29",
"2020-05-30",
"2020-05-31",
"2020-06-01",
"2020-06-02",
"2020-06-03",
"2020-06-04",
"2020-06-05",
"2020-06-06",
"2020-06-07",
"2020-06-08",
"2020-06-09",
"2020-06-10",
"2020-06-11",
"2020-06-12",
"2020-06-13",
"2020-06-14",
"2020-06-15",
"2020-06-16",
"2020-06-17",
"2020-06-18",
"2020-06-19",
"2020-06-20",
"2020-06-21",
"2020-06-22",
"2020-06-23",
"2020-06-24",
"2020-06-25",
"2020-06-26",
"2020-06-27",
"2020-06-28",
"2020-06-29",
"2020-06-30",
"2020-07-01",
"2020-07-02",
"2020-07-03",
"2020-07-04",
"2020-07-05",
"2020-07-06",
"2020-07-07",
"2020-07-08",
"2020-07-09",
"2020-07-10",
"2020-07-11",
"2020-07-12",
"2020-07-13",
"2020-07-14",
"2020-07-15",
"2020-07-16",
"2020-07-17",
"2020-07-18",
"2020-07-19",
"2020-07-20",
"2020-07-21",
"2020-07-22",
"2020-07-23",
"2020-07-24",
"2020-07-25",
"2020-07-26",
"2020-07-27",
"2020-07-28",
"2020-07-29",
"2020-07-30",
"2020-07-31",
"2020-08-01",
"2020-08-02",
"2020-08-03",
"2020-08-04",
"2020-08-05",
"2020-08-06",
"2020-08-07",
"2020-08-08",
"2020-08-09",
"2020-08-10",
"2020-08-11",
"2020-08-12",
"2020-08-13",
"2020-08-14",
"2020-08-15",
"2020-08-16",
"2020-08-17",
"2020-08-18",
"2020-08-19",
"2020-08-20",
"2020-08-21",
"2020-08-22",
"2020-08-23",
"2020-08-24",
"2020-08-25",
"2020-08-26",
"2020-08-27",
"2020-08-28",
"2020-08-29",
"2020-08-30",
"2020-08-31",
"2020-09-01",
"2020-09-02",
"2020-09-03",
"2020-09-04",
"2020-09-05",
"2020-09-06",
"2020-09-07",
"2020-09-08",
"2020-09-09",
"2020-09-10",
"2020-09-11",
"2020-09-12",
"2020-09-13",
"2020-09-14",
"2020-09-15",
"2020-09-16",
"2020-09-17",
"2020-09-18",
"2020-09-19",
"2020-09-20",
"2020-09-21",
"2020-09-22",
"2020-09-23",
"2020-09-24",
"2020-09-25",
"2020-09-26",
"2020-09-27",
"2020-09-28",
"2020-09-29",
"2020-09-30",
"2020-10-01",
"2020-10-02",
"2020-10-03",
"2020-10-04",
"2020-10-05",
"2020-10-06",
"2020-10-07",
"2020-10-08",
"2020-10-09",
"2020-10-10",
"2020-10-11",
"2020-10-12",
"2020-10-13",
"2020-10-14",
"2020-10-15",
"2020-10-16",
"2020-10-17",
"2020-10-18",
"2020-10-19",
"2020-10-20",
"2020-10-21",
"2020-10-22",
"2020-10-23",
"2020-10-24",
"2020-10-25",
"2020-10-26",
"2020-10-27",
"2020-10-28",
"2020-10-29",
"2020-10-30",
"2020-10-31",
"2020-11-01",
"2020-11-02",
"2020-11-03",
"2020-11-04",
"2020-11-05",
"2020-11-06",
"2020-11-07",
"2020-11-08",
"2020-11-09",
"2020-11-10",
"2020-11-11",
"2020-11-12",
"2020-11-13",
"2020-11-14",
"2020-11-15",
"2020-11-16",
"2020-11-17",
"2020-11-18",
"2020-11-19",
"2020-11-20",
"2020-11-21",
"2020-11-22",
"2020-11-23",
"2020-11-24",
"2020-11-25",
"2020-11-26",
"2020-11-27",
"2020-11-28",
"2020-11-29",
"2020-11-30",
"2020-12-01",
"2020-12-02",
"2020-12-03",
"2020-12-04",
"2020-12-05",
"2020-12-06",
"2020-12-07",
"2020-12-08",
"2020-12-09",
"2020-12-10",
"2020-12-11",
"2020-12-12",
"2020-12-13",
"2020-12-14",
"2020-12-15",
"2020-12-16",
"2020-12-17",
"2020-12-18",
"2020-12-19",
"2020-12-20",
"2020-12-21",
"2020-12-22",
"2020-12-23",
"2020-12-24",
"2020-12-25",
"2020-12-26",
"2020-12-27",
"2020-12-28",
"2020-12-29",
"2020-12-30",
"2020-12-31",
"2021-01-01",
"2021-01-02",
"2021-01-03",
"2021-01-04",
"2021-01-05"
],
"y": [
19200,
26400,
18350,
23300,
11520,
15260,
20080,
22166.666666666668,
29033.333333333332,
28287.5,
36225,
43625,
38063.63636363636,
47981.818181818184,
59409.09090909091,
66925,
78633.33333333333,
91516.66666666667,
104683.33333333333,
119316.66666666667,
129961.53846153847,
146438.46153846153,
151742.85714285713,
167578.57142857142,
182835.7142857143,
195821.42857142858,
209800,
227278.57142857142,
245821.42857142858,
261257.14285714287,
241637.5,
253975,
266075,
279806.25,
295675,
310843.75,
306994.1176470588,
319711.76470588235,
224224,
179375,
107021.81818181818,
82548.64864864865,
59443.92523364486,
35878.260869565216,
28649.367088607596,
17268.238213399505,
13623.892100192677,
12126.430976430976,
9503.324808184143,
6683.958151700087,
4955.044136191677,
3620.1892744479496,
2749.0597716588313,
2577.1481942714818,
1790.4680487283608,
1311.3022113022114,
950.2999236557968,
650.7721583839567,
452.2416375436845,
352.9490874159462,
265.7208434944771,
203.51950700863603,
168.06765670746765,
140.76309016619894,
113.16199646704305,
94.26647545420873,
80.38350680544436,
70.25782624722665,
61.2392304399467,
53.19731289384266,
46.207609281523816,
40.86459619587023,
36.71737888779272,
33.308642282698,
30.674404631388306,
28.36245386199902,
26.50280297403166,
24.86485756898844,
23.21621092855686,
21.838770139165398,
20.796738343216585,
19.881990719590554,
19.070900967310035,
18.342607344889565,
17.76658849496482,
17.108766336050454,
16.439740943943892,
15.923897687060185,
15.422897211445356,
14.897493621116201,
14.530474005059707,
14.12948355828494,
13.671738956470579,
13.26332640224115,
12.901517807048291,
12.58017546446476,
12.322765325843843,
12.110683417006957,
11.878840470495101,
11.608362086762991,
11.302759139655715,
11.075037748648707,
10.867000012853966,
10.680452952368798,
10.518308361837509,
10.36672864177714,
10.199644728815713,
10.039948651800627,
9.872237880645658,
9.75439105321739,
9.640348085412358,
9.569541294774684,
9.491693910867545,
9.38149999474571,
9.277648390726553,
9.174190742693874,
9.09179707100374,
8.986350856491171,
8.923592507243587,
8.855226945787399,
8.772784755065064,
8.70153742173586,
8.640335954143486,
8.563166882652876,
8.499163837044923,
8.467394193086703,
8.447446606933106,
8.401953224797724,
8.350694157472317,
8.28869652651131,
8.228657649452508,
8.211600198813949,
8.190413009235355,
8.180220611653326,
8.15131637124535,
8.10790215251435,
8.075738636215979,
8.02334186688585,
7.980049620749864,
7.975065184103372,
7.961216446932562,
7.931381962758435,
7.895244811084022,
7.852083726593288,
7.805862565154496,
7.75931566702228,
7.722663401802363,
7.698116317378715,
7.648113030326715,
7.6007282264351606,
7.539364665123224,
7.479510447058368,
7.398265400485868,
7.340152186843185,
7.290022712067253,
7.212848901444232,
7.1242135920675125,
7.0461279049993655,
6.951900017088074,
6.860982142373752,
6.787279426907011,
6.702936491906182,
6.606775226746918,
6.519177762138128,
6.443834986660913,
6.347104666566895,
6.2731541601637355,
6.180904589821024,
6.094080577367766,
6.005240130910123,
5.907160130276203,
5.8198935136337155,
5.728688762216809,
5.637608825139467,
5.539619945923327,
5.464902552552037,
5.373068053187805,
5.300027993830379,
5.229913279981004,
5.156052183843906,
5.08380768152846,
5.033424542947859,
4.967125551008053,
4.904033408662508,
4.838795303129705,
4.780353983276732,
4.72421755383373,
4.672083852981745,
4.624794713574121,
4.574315919413087,
4.5257439289072705,
4.477723639828841,
4.439001127200208,
4.401179548483606,
4.3663693411788715,
4.332488825125473,
4.303102439948187,
4.26818111704048,
4.236435968113223,
4.204246651008131,
4.172478632954018,
4.141497050472491,
4.117426544078816,
4.090142396264672,
4.068174602826125,
4.0367208460254815,
4.013431006355277,
3.99091403919712,
3.9702862386369184,
3.9519914561809464,
3.9359238382214423,
3.9194004751594558,
3.901449738112055,
3.8849081140911177,
3.869237957202919,
3.852584088209542,
3.841715814718924,
3.8316782094346107,
3.816863747630743,
3.802615210426968,
3.7895915148163803,
3.774136345285425,
3.7600994767833513,
3.7501039399510856,
3.7414508362141228,
3.7304882239467676,
3.7169154772439232,
3.7055343807833614,
3.6936884067654763,
3.6883622642037017,
3.6973196805232313,
3.694753435016731,
3.691776208480308,
3.6831090855863584,
3.6754345813848763,
3.6635578119262617,
3.654996815175251,
3.6540436692783387,
3.654329319751627,
3.6475173318343637,
3.6382339627627833,
3.6344063124770796,
3.6233757220401865,
3.606695747650377,
3.6105418105233835,
3.617551522651036,
3.6218721553402955,
3.6242184171337457,
3.6219593379753183,
3.615823120481329,
3.6122214936662087,
3.6203928933915437,
3.631334920234737,
3.62577119112552,
3.6182212462856143,
3.61088504736531,
3.604596017869893,
3.601165468829671,
3.6142696593066312,
3.6267610862781123,
3.6362256070035475,
3.643549298835694,
3.6470658265929927,
3.6396895079708123,
3.6385842804973123,
3.6467364865613665,
3.658125851959605,
3.665138329135233,
3.674693342457796,
3.6780496597942345,
3.6727920978023723,
3.66085611431021,
3.6697288715234277,
3.686289556274299,
3.6928622810671845,
3.6907230350145004,
3.6848552970603468,
3.6758646210585195,
3.6671345450403363,
3.6741119136549267,
3.6794781911342045,
3.674737643190271,
3.6482402068005566,
3.630828585343271,
3.602962641210712,
3.589194598649952,
3.5807897117339906,
3.5812592920317874,
3.5692698212386715,
3.544034724178885,
3.522321872220101,
3.497443666914201,
3.4743283928006097,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
]
},
{
"mode": "lines",
"name": "Adjusted Ephemeral Case Fatality Rate (Percent)",
"type": "scatter",
"x": [
"2020-01-22",
"2020-01-23",
"2020-01-24",
"2020-01-25",
"2020-01-26",
"2020-01-27",
"2020-01-28",
"2020-01-29",
"2020-01-30",
"2020-01-31",
"2020-02-01",
"2020-02-02",
"2020-02-03",
"2020-02-04",
"2020-02-05",
"2020-02-06",
"2020-02-07",
"2020-02-08",
"2020-02-09",
"2020-02-10",
"2020-02-11",
"2020-02-12",
"2020-02-13",
"2020-02-14",
"2020-02-15",
"2020-02-16",
"2020-02-17",
"2020-02-18",
"2020-02-19",
"2020-02-20",
"2020-02-21",
"2020-02-22",
"2020-02-23",
"2020-02-24",
"2020-02-25",
"2020-02-26",
"2020-02-27",
"2020-02-28",
"2020-02-29",
"2020-03-01",
"2020-03-02",
"2020-03-03",
"2020-03-04",
"2020-03-05",
"2020-03-06",
"2020-03-07",
"2020-03-08",
"2020-03-09",
"2020-03-10",
"2020-03-11",
"2020-03-12",
"2020-03-13",
"2020-03-14",
"2020-03-15",
"2020-03-16",
"2020-03-17",
"2020-03-18",
"2020-03-19",
"2020-03-20",
"2020-03-21",
"2020-03-22",
"2020-03-23",
"2020-03-24",
"2020-03-25",
"2020-03-26",
"2020-03-27",
"2020-03-28",
"2020-03-29",
"2020-03-30",
"2020-03-31",
"2020-04-01",
"2020-04-02",
"2020-04-03",
"2020-04-04",
"2020-04-05",
"2020-04-06",
"2020-04-07",
"2020-04-08",
"2020-04-09",
"2020-04-10",
"2020-04-11",
"2020-04-12",
"2020-04-13",
"2020-04-14",
"2020-04-15",
"2020-04-16",
"2020-04-17",
"2020-04-18",
"2020-04-19",
"2020-04-20",
"2020-04-21",
"2020-04-22",
"2020-04-23",
"2020-04-24",
"2020-04-25",
"2020-04-26",
"2020-04-27",
"2020-04-28",
"2020-04-29",
"2020-04-30",
"2020-05-01",
"2020-05-02",
"2020-05-03",
"2020-05-04",
"2020-05-05",
"2020-05-06",
"2020-05-07",
"2020-05-08",
"2020-05-09",
"2020-05-10",
"2020-05-11",
"2020-05-12",
"2020-05-13",
"2020-05-14",
"2020-05-15",
"2020-05-16",
"2020-05-17",
"2020-05-18",
"2020-05-19",
"2020-05-20",
"2020-05-21",
"2020-05-22",
"2020-05-23",
"2020-05-24",
"2020-05-25",
"2020-05-26",
"2020-05-27",
"2020-05-28",
"2020-05-29",
"2020-05-30",
"2020-05-31",
"2020-06-01",
"2020-06-02",
"2020-06-03",
"2020-06-04",
"2020-06-05",
"2020-06-06",
"2020-06-07",
"2020-06-08",
"2020-06-09",
"2020-06-10",
"2020-06-11",
"2020-06-12",
"2020-06-13",
"2020-06-14",
"2020-06-15",
"2020-06-16",
"2020-06-17",
"2020-06-18",
"2020-06-19",
"2020-06-20",
"2020-06-21",
"2020-06-22",
"2020-06-23",
"2020-06-24",
"2020-06-25",
"2020-06-26",
"2020-06-27",
"2020-06-28",
"2020-06-29",
"2020-06-30",
"2020-07-01",
"2020-07-02",
"2020-07-03",
"2020-07-04",
"2020-07-05",
"2020-07-06",
"2020-07-07",
"2020-07-08",
"2020-07-09",
"2020-07-10",
"2020-07-11",
"2020-07-12",
"2020-07-13",
"2020-07-14",
"2020-07-15",
"2020-07-16",
"2020-07-17",
"2020-07-18",
"2020-07-19",
"2020-07-20",
"2020-07-21",
"2020-07-22",
"2020-07-23",
"2020-07-24",
"2020-07-25",
"2020-07-26",
"2020-07-27",
"2020-07-28",
"2020-07-29",
"2020-07-30",
"2020-07-31",
"2020-08-01",
"2020-08-02",
"2020-08-03",
"2020-08-04",
"2020-08-05",
"2020-08-06",
"2020-08-07",
"2020-08-08",
"2020-08-09",
"2020-08-10",
"2020-08-11",
"2020-08-12",
"2020-08-13",
"2020-08-14",
"2020-08-15",
"2020-08-16",
"2020-08-17",
"2020-08-18",
"2020-08-19",
"2020-08-20",
"2020-08-21",
"2020-08-22",
"2020-08-23",
"2020-08-24",
"2020-08-25",
"2020-08-26",
"2020-08-27",
"2020-08-28",
"2020-08-29",
"2020-08-30",
"2020-08-31",
"2020-09-01",
"2020-09-02",
"2020-09-03",
"2020-09-04",
"2020-09-05",
"2020-09-06",
"2020-09-07",
"2020-09-08",
"2020-09-09",
"2020-09-10",
"2020-09-11",
"2020-09-12",
"2020-09-13",
"2020-09-14",
"2020-09-15",
"2020-09-16",
"2020-09-17",
"2020-09-18",
"2020-09-19",
"2020-09-20",
"2020-09-21",
"2020-09-22",
"2020-09-23",
"2020-09-24",
"2020-09-25",
"2020-09-26",
"2020-09-27",
"2020-09-28",
"2020-09-29",
"2020-09-30",
"2020-10-01",
"2020-10-02",
"2020-10-03",
"2020-10-04",
"2020-10-05",
"2020-10-06",
"2020-10-07",
"2020-10-08",
"2020-10-09",
"2020-10-10",
"2020-10-11",
"2020-10-12",
"2020-10-13",
"2020-10-14",
"2020-10-15",
"2020-10-16",
"2020-10-17",
"2020-10-18",
"2020-10-19",
"2020-10-20",
"2020-10-21",
"2020-10-22",
"2020-10-23",
"2020-10-24",
"2020-10-25",
"2020-10-26",
"2020-10-27",
"2020-10-28",
"2020-10-29",
"2020-10-30",
"2020-10-31",
"2020-11-01",
"2020-11-02",
"2020-11-03",
"2020-11-04",
"2020-11-05",
"2020-11-06",
"2020-11-07",
"2020-11-08",
"2020-11-09",
"2020-11-10",
"2020-11-11",
"2020-11-12",
"2020-11-13",
"2020-11-14",
"2020-11-15",
"2020-11-16",
"2020-11-17",
"2020-11-18",
"2020-11-19",
"2020-11-20",
"2020-11-21",
"2020-11-22",
"2020-11-23",
"2020-11-24",
"2020-11-25",
"2020-11-26",
"2020-11-27",
"2020-11-28",
"2020-11-29",
"2020-11-30",
"2020-12-01",
"2020-12-02",
"2020-12-03",
"2020-12-04",
"2020-12-05",
"2020-12-06",
"2020-12-07",
"2020-12-08",
"2020-12-09",
"2020-12-10",
"2020-12-11",
"2020-12-12",
"2020-12-13",
"2020-12-14",
"2020-12-15",
"2020-12-16",
"2020-12-17",
"2020-12-18",
"2020-12-19",
"2020-12-20",
"2020-12-21",
"2020-12-22",
"2020-12-23",
"2020-12-24",
"2020-12-25",
"2020-12-26",
"2020-12-27",
"2020-12-28",
"2020-12-29",
"2020-12-30",
"2020-12-31",
"2021-01-01",
"2021-01-02",
"2021-01-03",
"2021-01-04",
"2021-01-05"
],
"y": [
null,
null,
10300,
null,
3666.6666666666665,
null,
null,
32600,
null,
26050,
null,
null,
23233.333333333332,
null,
null,
149600,
null,
null,
null,
null,
257700,
null,
220700,
null,
null,
null,
null,
null,
null,
null,
104300,
null,
null,
null,
null,
null,
245400,
null,
21312.5,
19200,
6356.521739130435,
11705.263157894737,
7633.333333333333,
3131.1688311688313,
3552.830188679245,
1019.277108433735,
962.9310344827586,
1764,
1215.4255319148936,
643.5616438356165,
437.8132118451025,
275.6714060031596,
202.23978919631094,
389.3162393162393,
68.02999318336741,
88.16148390616476,
65.52502822732404,
39.65287049399199,
26.213287262446993,
21.201000834028356,
8.629671574178936,
10.479921645445641,
14.10667169242367,
12.554865424430641,
6.760089686098655,
6.654175588865097,
5.829550670678839,
3.268181577414058,
2.517887872475319,
2.5117799057607537,
4.636048526863085,
3.651650533631174,
3.615843800522323,
2.9334649433973903,
2.333835593504102,
2.488925714649925,
3.3774339303709002,
3.1806534272901987,
2.821761513844441,
2.5938526854517434,
2.400301752220279,
1.6487744110211409,
1.8741186075855414,
3.194965929634265,
3.5409035409035408,
2.8283366053305827,
2.497786191944792,
2.746624758911351,
1.202978804659156,
1.2985265424207764,
3.1748490010840946,
2.5801270860973395,
2.059557774607703,
2.040942735916256,
1.9795804471291158,
1.1119876779743791,
1.6476283493991253,
3.438407130299685,
2.867764206054169,
1.8675256142274612,
1.8138438542025985,
1.8343281409229872,
1.1781492050550346,
1.6050360611998167,
2.5967100135373506,
2.824858757062147,
2.6551573426573425,
2.463496817671284,
1.1460511500723822,
1.5738498789346247,
1.8528916339135317,
5.321546961325967,
4.200935730115735,
3.68908400044269,
3.286043409724748,
2.94422558573502,
2.4987804217030734,
1.8979087024960648,
4.383078170458339,
4.224111350922786,
3.755410833365831,
3.8953859238783757,
4.037005887300253,
2.320852963054798,
2.8740220341689287,
5.723888314374354,
6.609587173474396,
4.9110352264557875,
4.711289859235852,
3.720813035444314,
2.6494565217391304,
6.448087431693989,
6.378969188730802,
7.228915662650603,
5.6620411194133755,
4.923413566739606,
5.1871430594232315,
2.347708591374845,
3.1803128925431086,
7.438923963766126,
6.6571428571428575,
5.336235038084875,
4.95940840768427,
4.323158062969474,
2.781422198897927,
2.782466370006649,
4.425495629929652,
5.721618357487923,
3.7846539080665353,
4.279719383669154,
3.2468555937332533,
2.24011200560028,
1.450347311551325,
3.622907195919725,
3.8679987184341598,
2.6721429101615657,
2.407305534162174,
2.3746509651572176,
1.1317405133515792,
1.1126841020291582,
2.643708148534655,
2.393617021276596,
1.9708593090314583,
1.8657512460968562,
1.8504358464597033,
0.8789237668161435,
1.367407441454278,
1.7280859265604664,
1.7475143115396203,
1.6861363889907086,
1.4140670982931136,
1.2726855795059948,
0.699050923563629,
0.4818574662185335,
0.6688072444253732,
1.7008202746008878,
1.18890873300395,
1.6736401673640167,
1.1436340371081255,
0.6487412115324452,
0.6712715244673606,
2.01527099762173,
1.374154205997828,
1.2601797759356652,
1.2556517949556028,
1.097315796743351,
0.4540481400437637,
0.7479964381121995,
1.53998476770754,
1.5122556883972043,
1.3586876346148171,
1.3457933059136424,
1.329032485502265,
0.6254057563297988,
0.7418994413407821,
1.5456977496459232,
1.7313948572793942,
1.4374684396566235,
1.586975502028658,
1.2695420778356803,
0.7619621601842484,
0.9385139852959297,
1.5065832995454642,
1.6201048303125496,
1.869753979739508,
1.4871096530593297,
1.3628364167060136,
1.0444949976761821,
0.9505445262214497,
1.7412215270201064,
2.088542432710693,
1.845999954532021,
1.8514717352929102,
1.742401513927673,
1.293379061791548,
1.2553104015348773,
2.2874837678553592,
2.5612887650066942,
1.9106024043038368,
2.0262648191899197,
2.0943562610229276,
1.1219751377231693,
1.3709149862055234,
2.3071204163369066,
2.4626337990393288,
2.2041207474844273,
2.054562483808613,
2.0704845814977975,
1.342452680133609,
2.265854593466502,
5.7793862402599805,
3.216873858481117,
3.167834297898264,
2.517879680269247,
2.4695575782717976,
1.4251643301727648,
2.0120783620562674,
3.4954909183284646,
3.7031274311498366,
2.6462889845171023,
2.374734780479843,
3.0250627753825743,
1.6802125664270084,
1.4133797370456302,
4.279513668553443,
4.870458258772271,
4.267990074441688,
3.9666931670781205,
3.2646628391309243,
2.4555302928982212,
2.8233263469362595,
4.989439098803098,
5.532172230285438,
2.7410228748816627,
2.612774377954487,
2.501909460603183,
2.324682495858642,
2.9508112811588267,
5.801910056943012,
5.471969711908189,
4.8552642814447955,
4.639018545343992,
4.1410564556079485,
2.415292547466311,
3.43126586869786,
4.877199094234454,
5.165466898191075,
4.524606421222264,
4.785295746727692,
4.154459779040627,
2.81100115354259,
2.211426698059786,
4.856059496493026,
5.87268928337879,
4.416403785488959,
3.4693099504384293,
3.0820013058302904,
2.4324193626384254,
2.5380862590164917,
4.473351922975746,
4.28018043273274,
3.2095567069660333,
1.2409440509771292,
1.864099000134511,
1.1596343650786038,
2.061632986127778,
2.9590865842055187,
3.6241688572753983,
2.6732239753553615,
1.616946800794677,
1.865088315587254,
1.260659992584353,
1.5642724448024725,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
]
}
],
"layout": {
"annotations": [
{
"font": {
"color": "rgb(37,37,37)",
"family": "Arial",
"size": 30
},
"showarrow": false,
"text": "Covid Case Fatality Rate",
"x": 0,
"xanchor": "left",
"xref": "paper",
"y": 1.05,
"yanchor": "bottom",
"yref": "paper"
},
{
"font": {
"color": "rgb(150,150,150)",
"family": "Arial",
"size": 12
},
"showarrow": false,
"text": "Source: Our World in Data",
"x": 0.5,
"xanchor": "center",
"xref": "paper",
"y": -0.1,
"yanchor": "top",
"yref": "paper"
}
],
"template": {
"data": {
"bar": [
{
"error_x": {
"color": "#2a3f5f"
},
"error_y": {
"color": "#2a3f5f"
},
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "bar"
}
],
"barpolar": [
{
"marker": {
"line": {
"color": "#E5ECF6",
"width": 0.5
}
},
"type": "barpolar"
}
],
"carpet": [
{
"aaxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"baxis": {
"endlinecolor": "#2a3f5f",
"gridcolor": "white",
"linecolor": "white",
"minorgridcolor": "white",
"startlinecolor": "#2a3f5f"
},
"type": "carpet"
}
],
"choropleth": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "choropleth"
}
],
"contour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "contour"
}
],
"contourcarpet": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "contourcarpet"
}
],
"heatmap": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmap"
}
],
"heatmapgl": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "heatmapgl"
}
],
"histogram": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "histogram"
}
],
"histogram2d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2d"
}
],
"histogram2dcontour": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "histogram2dcontour"
}
],
"mesh3d": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"type": "mesh3d"
}
],
"parcoords": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "parcoords"
}
],
"pie": [
{
"automargin": true,
"type": "pie"
}
],
"scatter": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter"
}
],
"scatter3d": [
{
"line": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatter3d"
}
],
"scattercarpet": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattercarpet"
}
],
"scattergeo": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergeo"
}
],
"scattergl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattergl"
}
],
"scattermapbox": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scattermapbox"
}
],
"scatterpolar": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolar"
}
],
"scatterpolargl": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterpolargl"
}
],
"scatterternary": [
{
"marker": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"type": "scatterternary"
}
],
"surface": [
{
"colorbar": {
"outlinewidth": 0,
"ticks": ""
},
"colorscale": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"type": "surface"
}
],
"table": [
{
"cells": {
"fill": {
"color": "#EBF0F8"
},
"line": {
"color": "white"
}
},
"header": {
"fill": {
"color": "#C8D4E3"
},
"line": {
"color": "white"
}
},
"type": "table"
}
]
},
"layout": {
"annotationdefaults": {
"arrowcolor": "#2a3f5f",
"arrowhead": 0,
"arrowwidth": 1
},
"autotypenumbers": "strict",
"coloraxis": {
"colorbar": {
"outlinewidth": 0,
"ticks": ""
}
},
"colorscale": {
"diverging": [
[
0,
"#8e0152"
],
[
0.1,
"#c51b7d"
],
[
0.2,
"#de77ae"
],
[
0.3,
"#f1b6da"
],
[
0.4,
"#fde0ef"
],
[
0.5,
"#f7f7f7"
],
[
0.6,
"#e6f5d0"
],
[
0.7,
"#b8e186"
],
[
0.8,
"#7fbc41"
],
[
0.9,
"#4d9221"
],
[
1,
"#276419"
]
],
"sequential": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
],
"sequentialminus": [
[
0,
"#0d0887"
],
[
0.1111111111111111,
"#46039f"
],
[
0.2222222222222222,
"#7201a8"
],
[
0.3333333333333333,
"#9c179e"
],
[
0.4444444444444444,
"#bd3786"
],
[
0.5555555555555556,
"#d8576b"
],
[
0.6666666666666666,
"#ed7953"
],
[
0.7777777777777778,
"#fb9f3a"
],
[
0.8888888888888888,
"#fdca26"
],
[
1,
"#f0f921"
]
]
},
"colorway": [
"#636efa",
"#EF553B",
"#00cc96",
"#ab63fa",
"#FFA15A",
"#19d3f3",
"#FF6692",
"#B6E880",
"#FF97FF",
"#FECB52"
],
"font": {
"color": "#2a3f5f"
},
"geo": {
"bgcolor": "white",
"lakecolor": "white",
"landcolor": "#E5ECF6",
"showlakes": true,
"showland": true,
"subunitcolor": "white"
},
"hoverlabel": {
"align": "left"
},
"hovermode": "closest",
"mapbox": {
"style": "light"
},
"paper_bgcolor": "white",
"plot_bgcolor": "#E5ECF6",
"polar": {
"angularaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"radialaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"scene": {
"xaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"yaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
},
"zaxis": {
"backgroundcolor": "#E5ECF6",
"gridcolor": "white",
"gridwidth": 2,
"linecolor": "white",
"showbackground": true,
"ticks": "",
"zerolinecolor": "white"
}
},
"shapedefaults": {
"line": {
"color": "#2a3f5f"
}
},
"ternary": {
"aaxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"baxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
},
"bgcolor": "#E5ECF6",
"caxis": {
"gridcolor": "white",
"linecolor": "white",
"ticks": ""
}
},
"title": {
"x": 0.05
},
"xaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
},
"yaxis": {
"automargin": true,
"gridcolor": "white",
"linecolor": "white",
"ticks": "",
"title": {
"standoff": 15
},
"zerolinecolor": "white",
"zerolinewidth": 2
}
}
},
"yaxis": {
"range": [
-5,
20
]
}
}
}
},
"metadata": {}
}
],
"source": [
"query = spark.sql(\"\"\"\n",
"SELECT\n",
" date,\n",
" 100 * total_deaths / total_cases AS mortality_rate,\n",
" 100 * new_deaths / new_cases AS ephemeral_mortality_rate,\n",
" 100 * LEAD(total_deaths, 56) OVER (ORDER BY date ASC) / total_cases AS adjusted_mortality_rate,\n",
" 100 * LEAD(new_deaths, 56) OVER (ORDER BY date ASC) / new_cases AS adjusted_ephemeral_mortality_rate\n",
"FROM owid_covid_data WHERE iso_code = 'USA'\n",
"ORDER BY date ASC\n",
"\"\"\").toPandas()\n",
"\n",
"fig = go.Figure()\n",
"fig.add_trace(go.Scatter(x=query.get('date'), y=query.get('ephemeral_mortality_rate'), mode='lines', name='Ephemeral Case Fatality Rate (Percent)'))\n",
"fig.add_trace(go.Scatter(x=query.get('date'), y=query.get('mortality_rate'), mode='lines', name='Case Fatality Rate (Percent)'))\n",
"fig.add_trace(go.Scatter(x=query.get('date'), y=query.get('adjusted_mortality_rate'), mode='lines', name='Adjusted Case Fatality Rate (Percent)'))\n",
"fig.add_trace(go.Scatter(x=query.get('date'), y=query.get('adjusted_ephemeral_mortality_rate'), mode='lines', name='Adjusted Ephemeral Case Fatality Rate (Percent)'))\n",
"fig.update_layout(annotations=[\n",
" {\n",
" \"xref\": \"paper\",\n",
" \"yref\": \"paper\",\n",
" \"x\": 0.0,\n",
" \"y\": 1.05,\n",
" \"xanchor\": \"left\",\n",
" \"yanchor\": \"bottom\",\n",
" \"text\": \"Covid Case Fatality Rate\",\n",
" \"font\": { \"family\": \"Arial\", \"size\": 30, \"color\": \"rgb(37,37,37)\" },\n",
" \"showarrow\": False,\n",
" },\n",
" {\n",
" \"xref\": \"paper\",\n",
" \"yref\": \"paper\",\n",
" \"x\": 0.5,\n",
" \"y\": -0.1,\n",
" \"xanchor\": \"center\",\n",
" \"yanchor\": \"top\",\n",
" \"text\": \"Source: Our World in Data\",\n",
" \"font\": { \"family\": \"Arial\", \"size\": 12, \"color\": \"rgb(150,150,150)\" },\n",
" \"showarrow\": False,\n",
" },\n",
"])\n",
"fig.update_layout(yaxis=dict(range=[-5,20]))\n",
"fig.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
]
}
@sbussard
Copy link
Author

Just uploaded the more-complete version I made in February
https://github.com/sbussard/data-playground

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment