Skip to content

Commit

Permalink
counterfactual excess covid deaths notebook (pymc-devs#391)
Browse files Browse the repository at this point in the history
* add excess deaths files

* add myst file

* add tags

* fix typo

* edit text about temperature and deaths

* Covid-19 -> COVID-19. And grammatical fix

* grammatical fix

* simpler data import + ZeroSumNormal + update figure title + remove sample kwargs

* bring in retrodiction as a more specific description of what we are doing
  • Loading branch information
Benjamin T. Vincent authored Jul 13, 2022
1 parent b4a36d4 commit 8901181
Show file tree
Hide file tree
Showing 4 changed files with 2,154 additions and 0 deletions.
1,445 changes: 1,445 additions & 0 deletions examples/case_studies/excess_deaths.ipynb

Large diffs are not rendered by default.

198 changes: 198 additions & 0 deletions examples/data/deaths_and_temps_england_wales.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
date,temp,deaths,year,month,t,pre
2006-01-01,3.8,49124,2006,1,0,True
2006-02-01,3.4,42664,2006,2,1,True
2006-03-01,3.9,49207,2006,3,2,True
2006-04-01,7.4,40645,2006,4,3,True
2006-05-01,10.7,42425,2006,5,4,True
2006-06-01,14.5,40797,2006,6,5,True
2006-07-01,17.8,38870,2006,7,6,True
2006-08-01,14.9,39140,2006,8,7,True
2006-09-01,15.2,36594,2006,9,8,True
2006-10-01,11.6,40390,2006,10,9,True
2006-11-01,7.2,42326,2006,11,10,True
2006-12-01,5.5,40417,2006,12,11,True
2007-01-01,5.9,50305,2007,1,12,True
2007-02-01,5.1,44669,2007,2,13,True
2007-03-01,6.3,44358,2007,3,14,True
2007-04-01,10.2,41416,2007,4,15,True
2007-05-01,10.6,41579,2007,5,16,True
2007-06-01,13.7,38028,2007,6,17,True
2007-07-01,14.2,39729,2007,7,18,True
2007-08-01,14.3,39048,2007,8,19,True
2007-09-01,12.6,35215,2007,9,20,True
2007-10-01,10.2,42935,2007,10,21,True
2007-11-01,6.8,42832,2007,11,22,True
2007-12-01,4.4,43938,2007,12,23,True
2008-01-01,5.3,52057,2008,1,24,True
2008-02-01,4.9,42338,2008,2,25,True
2008-03-01,5.1,41999,2008,3,26,True
2008-04-01,7.0,46016,2008,4,27,True
2008-05-01,12.1,39240,2008,5,28,True
2008-06-01,12.9,37845,2008,6,29,True
2008-07-01,15.3,40084,2008,7,30,True
2008-08-01,15.1,34980,2008,8,31,True
2008-09-01,12.5,39238,2008,9,32,True
2008-10-01,8.7,42195,2008,10,33,True
2008-11-01,6.1,39504,2008,11,34,True
2008-12-01,3.1,53594,2008,12,35,True
2009-01-01,2.8,55045,2009,1,36,True
2009-02-01,3.7,41433,2009,2,37,True
2009-03-01,6.1,42395,2009,3,38,True
2009-04-01,8.9,40270,2009,4,39,True
2009-05-01,10.8,36568,2009,5,40,True
2009-06-01,13.7,38851,2009,6,41,True
2009-07-01,15.1,37975,2009,7,42,True
2009-08-01,15.3,33606,2009,8,43,True
2009-09-01,13.2,39127,2009,9,44,True
2009-10-01,10.4,40187,2009,10,45,True
2009-11-01,7.3,40122,2009,11,46,True
2009-12-01,2.1,45769,2009,12,47,True
2010-01-01,0.9,48363,2010,1,48,True
2010-02-01,1.8,41048,2010,2,49,True
2010-03-01,5.1,45138,2010,3,50,True
2010-04-01,7.9,40584,2010,4,51,True
2010-05-01,9.7,36517,2010,5,52,True
2010-06-01,14.1,40168,2010,6,53,True
2010-07-01,15.6,36888,2010,7,54,True
2010-08-01,14.2,36083,2010,8,55,True
2010-09-01,12.8,39423,2010,9,56,True
2010-10-01,9.4,38613,2010,10,57,True
2010-11-01,4.3,42123,2010,11,58,True
2010-12-01,-0.9,48294,2010,12,59,True
2011-01-01,3.1,49992,2011,1,60,True
2011-02-01,5.3,39350,2011,2,61,True
2011-03-01,5.8,44209,2011,3,62,True
2011-04-01,10.7,36943,2011,4,63,True
2011-05-01,11.0,40100,2011,5,64,True
2011-06-01,12.6,40000,2011,6,65,True
2011-07-01,14.2,35646,2011,7,66,True
2011-08-01,14.1,38383,2011,8,67,True
2011-09-01,13.8,38358,2011,9,68,True
2011-10-01,11.2,37200,2011,10,69,True
2011-11-01,8.7,40624,2011,11,70,True
2011-12-01,4.8,43562,2011,12,71,True
2012-01-01,4.6,46897,2012,1,72,True
2012-02-01,4.2,44537,2012,2,73,True
2012-03-01,7.7,44142,2012,3,74,True
2012-04-01,6.3,41685,2012,4,75,True
2012-05-01,10.5,44008,2012,5,76,True
2012-06-01,12.3,36680,2012,6,77,True
2012-07-01,14.1,39293,2012,7,78,True
2012-08-01,15.3,39035,2012,8,79,True
2012-09-01,11.9,35216,2012,9,80,True
2012-10-01,8.2,43169,2012,10,81,True
2012-11-01,5.7,42124,2012,11,82,True
2012-12-01,3.8,42545,2012,12,83,True
2013-01-01,3.3,52898,2013,1,84,True
2013-02-01,2.7,43778,2013,2,85,True
2013-03-01,2.2,44915,2013,3,86,True
2013-04-01,6.3,49735,2013,4,87,True
2013-05-01,9.5,42273,2013,5,88,True
2013-06-01,12.8,35866,2013,6,89,True
2013-07-01,17.0,39806,2013,7,90,True
2013-08-01,15.6,35691,2013,8,91,True
2013-09-01,12.7,36775,2013,9,92,True
2013-10-01,11.2,42322,2013,10,93,True
2013-11-01,5.5,39941,2013,11,94,True
2013-12-01,5.7,42790,2013,12,95,True
2014-01-01,4.7,49026,2014,1,96,True
2014-02-01,5.2,41199,2014,2,97,True
2014-03-01,6.7,41217,2014,3,98,True
2014-04-01,9.2,41487,2014,4,99,True
2014-05-01,11.2,39422,2014,5,100,True
2014-06-01,14.2,38505,2014,6,101,True
2014-07-01,16.3,41244,2014,7,102,True
2014-08-01,13.9,35959,2014,8,103,True
2014-09-01,13.9,40979,2014,9,104,True
2014-10-01,11.0,43159,2014,10,105,True
2014-11-01,7.6,39457,2014,11,106,True
2014-12-01,4.4,49770,2014,12,107,True
2015-01-01,3.7,60891,2015,1,108,True
2015-02-01,3.5,46721,2015,2,109,True
2015-03-01,5.5,47895,2015,3,110,True
2015-04-01,7.9,45178,2015,4,111,True
2015-05-01,9.5,39343,2015,5,112,True
2015-06-01,12.7,42082,2015,6,113,True
2015-07-01,14.4,40512,2015,7,114,True
2015-08-01,14.7,36199,2015,8,115,True
2015-09-01,11.9,41573,2015,9,116,True
2015-10-01,10.0,42232,2015,10,117,True
2015-11-01,8.1,41520,2015,11,118,True
2015-12-01,7.9,45509,2015,12,119,True
2016-01-01,4.5,47457,2016,1,120,True
2016-02-01,3.8,46021,2016,2,121,True
2016-03-01,5.3,48665,2016,3,122,True
2016-04-01,6.5,46856,2016,4,123,True
2016-05-01,11.3,41384,2016,5,124,True
2016-06-01,13.9,42012,2016,6,125,True
2016-07-01,15.3,38983,2016,7,126,True
2016-08-01,15.5,40786,2016,8,127,True
2016-09-01,14.6,40367,2016,9,128,True
2016-10-01,9.8,40448,2016,10,129,True
2016-11-01,4.9,46514,2016,11,130,True
2016-12-01,5.9,45555,2016,12,131,True
2017-01-01,3.8,57368,2017,1,132,True
2017-02-01,5.2,47766,2017,2,133,True
2017-03-01,7.3,48664,2017,3,134,True
2017-04-01,8.0,39101,2017,4,135,True
2017-05-01,12.1,44279,2017,5,136,True
2017-06-01,14.4,42175,2017,6,137,True
2017-07-01,15.1,38425,2017,7,138,True
2017-08-01,14.5,41074,2017,8,139,True
2017-09-01,12.5,40095,2017,9,140,True
2017-10-01,11.2,43597,2017,10,141,True
2017-11-01,5.7,45580,2017,11,142,True
2017-12-01,4.1,45129,2017,12,143,True
2018-01-01,4.0,64154,2018,1,144,True
2018-02-01,2.3,49177,2018,2,145,True
2018-03-01,3.8,51229,2018,3,146,True
2018-04-01,8.4,46469,2018,4,147,True
2018-05-01,12.0,42784,2018,5,148,True
2018-06-01,14.8,39767,2018,6,149,True
2018-07-01,17.2,40723,2018,7,150,True
2018-08-01,15.2,40192,2018,8,151,True
2018-09-01,12.4,37137,2018,9,152,True
2018-10-01,9.5,44440,2018,10,153,True
2018-11-01,7.3,43978,2018,11,154,True
2018-12-01,5.8,41539,2018,12,155,True
2019-01-01,3.4,53910,2019,1,156,True
2019-02-01,6.0,45795,2019,2,157,True
2019-03-01,6.8,43944,2019,3,158,True
2019-04-01,8.4,44121,2019,4,159,True
2019-05-01,10.0,44389,2019,5,160,True
2019-06-01,13.2,38603,2019,6,161,True
2019-07-01,16.4,42308,2019,7,162,True
2019-08-01,15.8,38843,2019,8,163,True
2019-09-01,13.1,40011,2019,9,164,True
2019-10-01,8.9,46238,2019,10,165,True
2019-11-01,5.3,45219,2019,11,166,True
2019-12-01,5.1,47460,2019,12,167,True
2020-01-01,5.6,56704,2020,1,168,False
2020-02-01,5.1,43650,2020,2,169,False
2020-03-01,5.6,49723,2020,3,170,False
2020-04-01,9.1,88141,2020,4,171,False
2020-05-01,11.3,52363,2020,5,172,False
2020-06-01,14.0,42614,2020,6,173,False
2020-07-01,14.3,40778,2020,7,174,False
2020-08-01,15.9,37184,2020,8,175,False
2020-09-01,12.8,42494,2020,9,176,False
2020-10-01,9.4,46282,2020,10,177,False
2020-11-01,7.7,51317,2020,11,178,False
2020-12-01,4.3,56672,2020,12,179,False
2021-01-01,2.2,73315,2021,1,180,False
2021-02-01,4.1,58767,2021,2,181,False
2021-03-01,6.4,48624,2021,3,182,False
2021-04-01,5.7,41513,2021,4,183,False
2021-05-01,9.1,37864,2021,5,184,False
2021-06-01,14.2,41223,2021,6,185,False
2021-07-01,16.6,43264,2021,7,186,False
2021-08-01,15.0,43151,2021,8,187,False
2021-09-01,14.7,47520,2021,9,188,False
2021-10-01,10.9,46511,2021,10,189,False
2021-11-01,7.0,51602,2021,11,190,False
2021-12-01,5.3,52859,2021,12,191,False
2022-01-01,4.7,53158,2022,1,192,False
2022-02-01,5.6,45869,2022,2,193,False
2022-03-01,6.7,49489,2022,3,194,False
2022-04-01,8.1,45919,2022,4,195,False
2022-05-01,11.8,48611,2022,5,196,False
8 changes: 8 additions & 0 deletions examples/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ @article{goodman1999
title = {Toward Evidence-Based Medical Statistics. 1: The P Value Fallacy},
journal = {Annals of Internal Medicine}
}
@article{google_causal_impact2015,
title = {Inferring causal impact using Bayesian structural time-series models},
author = {Kay H. Brodersen and Fabian Gallusser and Jim Koehler and Nicolas Remy and Steven L. Scott},
year = {2015},
journal = {Annals of Applied Statistics},
pages = {247--274},
volume = {9}
}
@misc{harper2015movielens,
title = {The MovieLens Datasets: History and Context},
author = {Harper, F. Maxwell and Konstan, Joseph A.},
Expand Down
Loading

0 comments on commit 8901181

Please sign in to comment.