Ajout commentaire pour le téléchargement des données

parent f3f17265
......@@ -24,7 +24,7 @@
"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/). 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 1984 et se termine avec une semaine récente."
"Les données de l'incidence du syndrome grippal sont disponibles du site Web du [Réseau Sentinelles](http://www.sentiweb.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. Le jeu de données complet est téléchargé dans le cas ou le jeu de donnée n'existe pas. Sinon nous utilisons le jeu de données local."
]
},
{
......@@ -68,13 +68,14 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Missing data, downloading from http://www.sentiweb.fr/datasets/incidence-PAY-3.csv\n"
"Using local data file\n"
]
}
],
"source": [
"try :\n",
" with open(data_file): pass\n",
" with open(data_file):\n",
" print(\"Using local data file\")\n",
"except IOError :\n",
" print(\"Missing data, downloading from {}\".format(data_url))\n",
" urllib.request.urlretrieve(data_url, data_file)\n",
......@@ -1255,7 +1256,7 @@
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f043986a358>"
"<matplotlib.axes._subplots.AxesSubplot at 0x7f011fbdb400>"
]
},
"execution_count": 9,
......@@ -1294,7 +1295,7 @@
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f04376c2470>"
"<matplotlib.axes._subplots.AxesSubplot at 0x7f011daa90f0>"
]
},
"execution_count": 10,
......@@ -1398,7 +1399,7 @@
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f0437655978>"
"<matplotlib.axes._subplots.AxesSubplot at 0x7f011d9c8358>"
]
},
"execution_count": 13,
......@@ -1499,7 +1500,7 @@
{
"data": {
"text/plain": [
"<matplotlib.axes._subplots.AxesSubplot at 0x7f04376294a8>"
"<matplotlib.axes._subplots.AxesSubplot at 0x7f011d9855c0>"
]
},
"execution_count": 15,
......
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