Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mooc-rr
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
c4489d0ac1b4dc0c3726033b10607283
mooc-rr
Commits
29384c31
Commit
29384c31
authored
Jun 07, 2022
by
c4489d0ac1b4dc0c3726033b10607283
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
url -> local
parent
cd91d8e6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
13 deletions
+28
-13
influenza-like-illness-analysis.ipynb
module3/exo1/influenza-like-illness-analysis.ipynb
+27
-12
syndrome-grippal.csv
module3/exo1/syndrome-grippal.csv
+1
-1
No files found.
module3/exo1/influenza-like-illness-analysis.ipynb
View file @
29384c31
...
@@ -28,10 +28,8 @@
...
@@ -28,10 +28,8 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": null,
"execution_count": 15,
"metadata": {
"metadata": {},
"collapsed": true
},
"outputs": [],
"outputs": [],
"source": [
"source": [
"data_url = \"http://www.sentiweb.fr/datasets/incidence-PAY-3.csv\""
"data_url = \"http://www.sentiweb.fr/datasets/incidence-PAY-3.csv\""
...
@@ -63,29 +61,36 @@
...
@@ -63,29 +61,36 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
"D
ata is stored in the local dir exo1, set the local path
"
"D
ownload data from url and save to the local dir (check if not exist)
"
]
]
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
2
,
"execution_count": 1
8
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
"local_path = 'incidence-PAY-3.csv'"
"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": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
"Now replace the data_url by the
local_path
"
"Now replace the data_url by the
data_file
"
]
]
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 13,
"execution_count": 20,
"metadata": {},
"metadata": {
"scrolled": true
},
"outputs": [
"outputs": [
{
{
"data": {
"data": {
...
@@ -1049,16 +1054,26 @@
...
@@ -1049,16 +1054,26 @@
"[1961 rows x 10 columns]"
"[1961 rows x 10 columns]"
]
]
},
},
"execution_count":
13
,
"execution_count":
20
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
],
],
"source": [
"source": [
"raw_data = pd.read_csv(local_path, skiprows=1)\n",
"\n",
"raw_data = pd.read_csv(data_file, skiprows=1)\n",
"raw_data"
"raw_data"
]
]
},
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"local_path = 'incidence-PAY-3.csv'"
]
},
{
{
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
...
...
module3/exo1/
incidence-PAY-3
.csv
→
module3/exo1/
syndrome-grippal
.csv
View file @
29384c31
# @source="rseau Sentinelles, INSERM, Sorbonne Universit, http://www.sentiweb.fr", @meta={"period":[198444,202221],"geo":["PAY","1"],"geo_ref":"insee","indicator":"3","type":"all","conf_int":true,"compact":false}, @date=2022-06-07T
09:37:54
+02:00
# @source="rseau Sentinelles, INSERM, Sorbonne Universit, http://www.sentiweb.fr", @meta={"period":[198444,202221],"geo":["PAY","1"],"geo_ref":"insee","indicator":"3","type":"all","conf_int":true,"compact":false}, @date=2022-06-07T
10:39:55
+02:00
week,indicator,inc,inc_low,inc_up,inc100,inc100_low,inc100_up,geo_insee,geo_name
week,indicator,inc,inc_low,inc_up,inc100,inc100_low,inc100_up,geo_insee,geo_name
202221,3,17538,12255,22821,26,18,34,FR,France
202221,3,17538,12255,22821,26,18,34,FR,France
202220,3,20413,16271,24555,31,25,37,FR,France
202220,3,20413,16271,24555,31,25,37,FR,France
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment