correct august in september

parent 11e5c216
...@@ -1319,11 +1319,11 @@ ...@@ -1319,11 +1319,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 14, "execution_count": 20,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"first_august_week = [pd.Period(pd.Timestamp(y, 9, 1), 'W')\n", "first_sept_week = [pd.Period(pd.Timestamp(y, 9, 1), 'W')\n",
" for y in range(1991,\n", " for y in range(1991,\n",
" sorted_data.index[-1].year)]" " sorted_data.index[-1].year)]"
] ]
...@@ -1339,14 +1339,14 @@ ...@@ -1339,14 +1339,14 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 15, "execution_count": 21,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"year = []\n", "year = []\n",
"yearly_incidence = []\n", "yearly_incidence = []\n",
"for week1, week2 in zip(first_august_week[:-1],\n", "for week1, week2 in zip(first_sept_week[:-1],\n",
" first_august_week[1:]):\n", " first_sept_week[1:]):\n",
" one_year = sorted_data['inc'][week1:week2-1]\n", " one_year = sorted_data['inc'][week1:week2-1]\n",
" assert abs(len(one_year)-52) < 2\n", " assert abs(len(one_year)-52) < 2\n",
" yearly_incidence.append(one_year.sum())\n", " yearly_incidence.append(one_year.sum())\n",
...@@ -1363,16 +1363,16 @@ ...@@ -1363,16 +1363,16 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 16, "execution_count": 22,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7fea5d548400>" "<matplotlib.axes._subplots.AxesSubplot at 0x7fea5d44dc50>"
] ]
}, },
"execution_count": 16, "execution_count": 22,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
}, },
...@@ -1402,53 +1402,47 @@ ...@@ -1402,53 +1402,47 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 16, "execution_count": 23,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"2021 743449\n", "2020 221186\n",
"2014 1600941\n", "2021 376290\n",
"1991 1659249\n", "2002 516689\n",
"1995 1840410\n", "2018 542312\n",
"2020 2010315\n", "2017 551041\n",
"2022 2060304\n", "1996 564901\n",
"2012 2175217\n", "2019 584066\n",
"2003 2234584\n", "2015 604382\n",
"2019 2254386\n", "2000 617597\n",
"2006 2307352\n", "2001 619041\n",
"2017 2321583\n", "2012 624573\n",
"2001 2529279\n", "2005 628464\n",
"1992 2574578\n", "2006 632833\n",
"1993 2703886\n", "2022 641397\n",
"2018 2705325\n", "2011 642368\n",
"1988 2765617\n", "1993 643387\n",
"2007 2780164\n", "1995 652478\n",
"1987 2855570\n", "1994 661409\n",
"2016 2856393\n", "1998 677775\n",
"2011 2857040\n", "1997 683434\n",
"2008 2973918\n", "2014 685769\n",
"1998 3034904\n", "2013 698332\n",
"2002 3125418\n", "2007 717352\n",
"2009 3444020\n", "2008 749478\n",
"1994 3514763\n", "1999 756456\n",
"1996 3539413\n", "2003 758363\n",
"2004 3567744\n", "2004 777388\n",
"1997 3620066\n", "2016 782114\n",
"2015 3654892\n", "2010 829911\n",
"2000 3826372\n", "1992 832939\n",
"2005 3835025\n", "2009 842373\n",
"1999 3908112\n",
"2010 4111392\n",
"2013 4182691\n",
"1986 5115251\n",
"1990 5235827\n",
"1989 5466192\n",
"dtype: int64" "dtype: int64"
] ]
}, },
"execution_count": 16, "execution_count": 23,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
...@@ -1466,16 +1460,16 @@ ...@@ -1466,16 +1460,16 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 18, "execution_count": 24,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
"data": { "data": {
"text/plain": [ "text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7fea5d47bb00>" "<matplotlib.axes._subplots.AxesSubplot at 0x7fea5d381f60>"
] ]
}, },
"execution_count": 18, "execution_count": 24,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment