etape data1

parent 8728bf41
......@@ -9,7 +9,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
......@@ -28,7 +28,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
......@@ -66,7 +66,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
......@@ -79,7 +79,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 27,
"metadata": {},
"outputs": [
{
......@@ -1044,13 +1044,13 @@
"[1907 rows x 10 columns]"
]
},
"execution_count": 10,
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"raw_data = pd.read_csv(\"incidence-PAY-3.csv\", skiprows=1)\n",
"raw_data = pd.read_csv(\"syndrome-grippal.csv\", skiprows=1)\n",
"raw_data"
]
},
......@@ -1063,7 +1063,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 28,
"metadata": {},
"outputs": [
{
......@@ -1125,7 +1125,7 @@
"1670 FR France "
]
},
"execution_count": 11,
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
......@@ -1143,7 +1143,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 29,
"metadata": {},
"outputs": [
{
......@@ -2108,7 +2108,7 @@
"[1906 rows x 10 columns]"
]
},
"execution_count": 12,
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
......@@ -2138,7 +2138,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
......@@ -2168,7 +2168,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 31,
"metadata": {},
"outputs": [],
"source": [
......@@ -2193,7 +2193,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 32,
"metadata": {},
"outputs": [
{
......@@ -2221,16 +2221,16 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 33,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f554bb6c630>"
"<matplotlib.axes._subplots.AxesSubplot at 0x7f55498be630>"
]
},
"execution_count": 16,
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
},
......@@ -2260,16 +2260,16 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f55499c6080>"
"<matplotlib.axes._subplots.AxesSubplot at 0x7f55492db8d0>"
]
},
"execution_count": 17,
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
},
......@@ -2320,7 +2320,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 35,
"metadata": {},
"outputs": [],
"source": [
......@@ -2340,7 +2340,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 36,
"metadata": {},
"outputs": [],
"source": [
......@@ -2364,16 +2364,16 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 37,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f5549947fd0>"
"<matplotlib.axes._subplots.AxesSubplot at 0x7f55492009b0>"
]
},
"execution_count": 20,
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
},
......@@ -2403,7 +2403,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 38,
"metadata": {},
"outputs": [
{
......@@ -2447,7 +2447,7 @@
"dtype: int64"
]
},
"execution_count": 21,
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
......@@ -2466,16 +2466,16 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 39,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f554992d438>"
"<matplotlib.axes._subplots.AxesSubplot at 0x7f55491e08d0>"
]
},
"execution_count": 22,
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
},
......
{
"cells": [],
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Incidence du syndrome varicelle"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"import pandas as pd\n",
"import isoweek"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Les données de l'incidence du syndrome grippal sont disponibles du site Web du [Réseau Sentinelles](http://www.sentiweb.fr/france/fr/?). Nous les récupérons sous forme d'un fichier en format CSV dont chaque ligne correspond à une semaine de la période demandée. Nous téléchargeons toujours le jeu de données complet, qui commence en 1991 et se termine avec une semaine récente."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"data_url = \"http://www.sentiweb.fr/datasets/incidence-PAY-7.csv\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Voici l'explication des colonnes données [sur le site d'origine](https://ns.sentiweb.fr/incidence/csv-schema-v1.json):\n",
"La première ligne du fichier CSV est un commentaire, que nous ignorons en précisant skiprows=1."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Pour nous protéger contre une éventuelle disparition ou modification du serveur du Réseau Sentinelles, nous faisons une copie locale de ce jeux de données que nous préservons avec notre analyse. Il est inutile et même risquée de télécharger les données à chaque exécution, car dans le cas d'une panne nous pourrions remplacer nos données par un fichier défectueux. Pour cette raison, nous téléchargeons les données seulement si la copie locale n'existe pas."
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [],
"source": [
"data_file = \"syndrome-varicelle.csv\"\n",
"import os\n",
"import urllib.request\n",
"if not os.path.exists(data_file):\n",
" urllib.request.urlretrieve(data_url, data_file)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
......@@ -16,10 +87,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.3"
"version": "3.6.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
This diff is collapsed.
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