Début du code jusqu'à l'écriture des données localement

parent bdf23e1c
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
" %matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"import pandas as pd\n",
"import isoweek"
]
},
{
"cell_type": "code",
"execution_count": 2,
"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ée [sur le site d'origine](http://www.sentiweb.fr/france/fr/?page=json&file=csv-schema-v1&type=csv)\n",
"\n",
"\n",
"|Name\t|Type\t|Description\n",
"|--- | --- | --:\n",
"|week PK\t|integer\t\t|ISO8601 Yearweek number as numeric (year*100 + week nubmer)\n",
"|geo_insee PK\t|string\t\t|Identifier of the geographic area, from INSEE https://www.insee.fr\n",
"|geo_name\t|string\t\t|Geographic label of the area, corresponding to INSEE code. This label is not an id and is only provided for human reading\n",
"|indicator PK\t|integer\t|\tUnique identifier of the indicator, see metadata document https://www.sentiweb.fr/meta.json\n",
"|inc\t|integer\t\t|Estimated incidence value for the time step, in the geographic level\n",
"|inc_low\t|integer\t\t|Lower bound of the estimated incidence 95% Confidence Interval\n",
"|inc_up\t|integer\t\t|Upper bound of the estimated incidence 95% Confidence Interval\n",
"|inc100\t|integer\t\t|Estimated rate incidence per 100,000 inhabitants\n",
"|inc100_low\t|integer\t|\tLower bound of the estimated incidence 95% Confidence Interval\n",
"|inc100_up\t|integer\t|\tUpper bound of the estimated rate incidence 95% Confidence Interval\n",
"\n",
"Missing value : -"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Le code ci-dessous est exécuté **une seule fois** afin de créer *localement* le fichier de données."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"raw_data = pd.read_csv(data_url, skiprows=1)\n",
"raw_data\n",
"raw_data.to_csv('incidence-PAY-7.csv', header = True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
{
"cells": [],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.3"
}
},
"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