240320V2

parent 6b76bfef
......@@ -57,9 +57,30 @@
"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": 19,
"metadata": {},
"outputs": [],
"source": [
"data_file = \"syndrome-grippal.csv\"\n",
"\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": 6,
"execution_count": 20,
"metadata": {},
"outputs": [
{
......@@ -1024,13 +1045,13 @@
"[1846 rows x 10 columns]"
]
},
"execution_count": 6,
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"raw_data = pd.read_csv(data_url, skiprows=1)\n",
"raw_data = pd.read_csv(data_file, skiprows=1)\n",
"raw_data"
]
},
......@@ -1043,7 +1064,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 21,
"metadata": {},
"outputs": [
{
......@@ -1105,7 +1126,7 @@
"1609 FR France "
]
},
"execution_count": 7,
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
......@@ -1123,7 +1144,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 22,
"metadata": {},
"outputs": [
{
......@@ -2088,7 +2109,7 @@
"[1845 rows x 10 columns]"
]
},
"execution_count": 8,
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
......@@ -2118,7 +2139,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 23,
"metadata": {},
"outputs": [],
"source": [
......@@ -2148,7 +2169,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
......@@ -2173,7 +2194,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 25,
"metadata": {},
"outputs": [
{
......@@ -2201,16 +2222,16 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f15b44767b8>"
"<matplotlib.axes._subplots.AxesSubplot at 0x7f15b20c2128>"
]
},
"execution_count": 12,
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
},
......@@ -2240,16 +2261,16 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f15b222fa20>"
"<matplotlib.axes._subplots.AxesSubplot at 0x7f15b229d0f0>"
]
},
"execution_count": 13,
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
},
......@@ -2300,7 +2321,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
......@@ -2320,7 +2341,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 29,
"metadata": {},
"outputs": [],
"source": [
......@@ -2344,16 +2365,16 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 30,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f15b21b8b70>"
"<matplotlib.axes._subplots.AxesSubplot at 0x7f15b2122048>"
]
},
"execution_count": 16,
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
},
......@@ -2383,7 +2404,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 31,
"metadata": {},
"outputs": [
{
......@@ -2426,7 +2447,7 @@
"dtype: int64"
]
},
"execution_count": 17,
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
......@@ -2445,16 +2466,16 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 32,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f15b21a9198>"
"<matplotlib.axes._subplots.AxesSubplot at 0x7f15b21a0f98>"
]
},
"execution_count": 18,
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
},
......
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