"The data on the incidence of influenza-like illness are available from the Web site of the [Réseau Sentinelles](http://www.sentiweb.fr/). We download them as a file in CSV format, in which each line corresponds to a week in the observation period. Only the complete dataset, starting in 1984 and ending with a recent week, is available for download."
"| `week` | ISO8601 Yearweek number as numeric (year times 100 + week nubmer) |\n",
"| `indicator` | Unique identifier of the indicator, see metadata document https://www.sentiweb.fr/meta.json |\n",
"| `inc` | Estimated incidence value for the time step, in the geographic level |\n",
"| `inc_low` | Lower bound of the estimated incidence 95% Confidence Interval |\n",
"| `inc_up` | Upper bound of the estimated incidence 95% Confidence Interval |\n",
"| `inc100` | Estimated rate incidence per 100,000 inhabitants |\n",
"| `inc100_low` | Lower bound of the estimated incidence 95% Confidence Interval |\n",
"| `inc100_up` | Upper bound of the estimated rate incidence 95% Confidence Interval |\n",
"| `geo_insee` | Identifier of the geographic area, from INSEE https://www.insee.fr |\n",
"| `geo_name` | Geographic label of the area, corresponding to INSEE code. This label is not an id and is only provided for human reading |\n",
"\n",
"The first line of the CSV file is a comment, which we ignore with `skip=1`."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"#### Download the data to a local file"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To ensure reproducibility, the data link and a save name for a copy of the dataset are defined above. This next block checks if the local file is already available, to avoid repeated downloads."
"Starting from this list of weeks that contain August 1st, we obtain intervals of approximately one year as the periods between two adjacent weeks in this list. We compute the sums of weekly incidences for all these periods.\n",
"\n",
"We also check that our periods contain between 51 and 52 weeks, as a safeguard against potential mistakes in our code."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"year = []\n",
"yearly_incidence = []\n",
"for week1, week2 in zip(first_august_week[:-1],\n",
"## The incidence of chickenpox in France (2016-2024)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The data on the incidence of chickenpox-like illness are available from the Web site of the [Réseau Sentinelles](http://www.sentiweb.fr/). We download them as a file in CSV format, in which each line corresponds to a week in the observation period. The dataset used is starting in 2016 and ends with 2024."
"\u001b[0;32m/opt/conda/lib/python3.6/site-packages/pandas/core/indexes/base.py\u001b[0m in \u001b[0;36mget_slice_bound\u001b[0;34m(self, label, side, kind)\u001b[0m\n\u001b[1;32m 3586\u001b[0m \u001b[0;31m# we need to look up the label\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3587\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3588\u001b[0;31m \u001b[0mslc\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_loc_only_exact_matches\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlabel\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3589\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mKeyError\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0merr\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3590\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",