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
3e6bf7b47a05a05ae3d6af86121dcb5d
mooc-rr
Commits
7893ffdc
Commit
7893ffdc
authored
Apr 11, 2020
by
François Févotte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ex 03-3: style
parent
275baf11
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
636 additions
and
48 deletions
+636
-48
exercice.html
module3/exo3/exercice.html
+50
-25
exercice.jmd
module3/exo3/exercice.jmd
+26
-23
skeleton_css.css
module3/exo3/skeleton_css.css
+560
-0
No files found.
module3/exo3/exercice.html
View file @
7893ffdc
This source diff could not be displayed because it is too large. You can
view the blob
instead.
module3/exo3/exercice.jmd
View file @
7893ffdc
...
...
@@ -2,15 +2,17 @@
title
:
Analyse
de
la
concentration
de
CO2
dans
l
'atmosphère depuis 1958
author : François Févotte
date: avril 2020
options:
css: skeleton_css.css
---
# Gestion des dépendances
##
#
Environnement
## Environnement
```julia; echo=false; results="hidden"
@info "Instantiating project"
@info "
*
Instantiating project"
```
Nous utilisons Julia dans sa version 1.4.0, sur une architecture matérielle de
...
...
@@ -37,10 +39,10 @@ Pkg.instantiate()
```
##
#
Chargement
des
d
é
pendances
##
Chargement
des
d
é
pendances
```
julia
;
echo
=
false
;
results
=
"hidden"
@
info
"Loading dependencies"
@
info
"
*
Loading dependencies"
```
Tant
que
nous
y
sommes
,
profitons
en
pour
charger
d
è
s
maintenant
les
paquets
...
...
@@ -68,10 +70,10 @@ CO2](https://scrippsco2.ucsd.edu/data/atmospheric_co2/primary_mlo_co2_record.htm
fondons
l
'analyse sur le jeu de données contenant des observations hebdomadaires.
##
#
Téléchargement
## Téléchargement
```julia; echo=false; results="hidden"
@info "Retrieving data"
@info "
*
Retrieving data"
```
Le jeu de données est téléchargé une seule fois ; c'
est
une
copie
locale
qui
...
...
@@ -112,10 +114,10 @@ end
```
##
#
Lecture
## Lecture
```julia; echo=false; results="hidden"
@info "Parsing data"
@info "
*
Parsing data"
```
Les données d'
entr
é
e
sont
stock
é
es
au
format
CSV
,
et
contiennent
44
lignes
...
...
@@ -144,10 +146,10 @@ info(data_raw)
```
##
#
V
é
rification
des
donn
é
es
manquantes
##
V
é
rification
des
donn
é
es
manquantes
```
julia
;
echo
=
false
;
results
=
"hidden"
@
info
"Checking for missing values"
@
info
"
*
Checking for missing values"
```
Les
relev
é
s
é
tant
hebdomadaires
,
l
'écart entre deux dates successives du jeu de
...
...
@@ -168,10 +170,10 @@ Il y a 12 périodes durant lesquelles les données sont manquantes, dont une en
particulier
ayant
dur
é
19
semaines
en
1964.
Le
traitement
devra
en
tenir
compte
.
##
#
Aper
ç
u
global
des
donn
é
es
##
Aper
ç
u
global
des
donn
é
es
```
julia
;
echo
=
false
;
results
=
"hidden"
@
info
"Plotting raw data"
@
info
"
*
Plotting raw data"
```
Une
visualisation
de
l
'ensemble des données semble montrer une augmentation
...
...
@@ -225,7 +227,7 @@ annuel, nous allons commencer par interpoler les données à une maille
journali
è
re
.
Ceci
nous
permettra
de
d
é
couper
le
jeu
de
donn
é
es
en
ann
é
es
.
##
#
Travaux
sur
les
dates
##
Travaux
sur
les
dates
Il
est
plus
simple
d
'interpoler entre deux nombres qu'
entre
deux
dates
.
Dans
la
suite
,
nous
adopterons
une
convention
selon
laquelle
chaque
date
peut
ê
tre
...
...
@@ -263,10 +265,10 @@ présence d'années bissextiles, mais rien n'a été fait pour les traiter à pa
l
'impact, de l'
ordre
de
1
/
365
une
ann
é
e
sur
4
,
a
é
t
é
jug
é
n
é
gligeable
a
priori
.
##
#
Interpolation
à
la
maille
journali
è
re
##
Interpolation
à
la
maille
journali
è
re
```
julia
;
echo
=
false
;
results
=
"hidden"
@
info
"Interpolating daily data"
@
info
"
*
Interpolating daily data"
```
On
construit
un
interpolateur
lin
é
aire
bas
é
sur
les
mesures
de
CO2
en
fonction
...
...
@@ -358,10 +360,10 @@ plot(xlabel="Jour de l'année", ylabel="Nombre de valeurs")
histogram
!(data.day, bins=0:31:365, label=nothing)
```
##
#
Analyse
des
variations
annuelles
##
Analyse
des
variations
annuelles
```
julia
;
echo
=
false
;
results
=
"hidden"
@
info
"Fitting yearly oscillations"
@
info
"
*
Fitting yearly oscillations"
```
Pour
chaque
ann
é
e
,
on
commence
par
tenter
d
'extraire la composante oscillante de
...
...
@@ -469,10 +471,10 @@ moyen est suffisamment représentatif pour permettre d'extraire la composante
tendancielle
lisse
des
donn
é
es
.
##
#
Analyse
des
variations
tendancielles
##
Analyse
des
variations
tendancielles
```
julia
;
echo
=
false
;
output
=
"hidden"
@
info
"Fitting underlying trend"
@
info
"
*
Fitting underlying trend"
```
Nous
sommes
maintenant
pr
ê
ts
à
extraire
la
composante
tendancielle
des
...
...
@@ -543,10 +545,10 @@ plot!(data.date, α .+ β1 * data.date_num .+ γ*data.date_num.^2, linecolor="re
plot
!(data.date, α .+ β2 * data.date_num .+ γ*data.date_num.^2, linecolor="red", label=nothing)
```
##
#
Reconstruction
du
signal
complet
et
pr
é
diction
##
Reconstruction
du
signal
complet
et
pr
é
diction
```
julia
;
echo
=
false
;
output
=
"hidden"
@
info
"Reconstructing and predicting complete signal"
@
info
"
*
Reconstructing and predicting complete signal"
```
Nous
avons
maintenant
tous
les
é
l
é
ments
n
é
cessaires
afin
de
reconstruire
...
...
@@ -591,10 +593,10 @@ plot!(prediction.date, prediction.theta, label="tendance")
plot!(prediction.date, prediction.val, label="prédiction")
```
##
#
Pour aller plus loin
## Pour aller plus loin
```julia; echo=false
@info "Studying alternate model"
@info "
*
Studying alternate model"
```
En utilisant des modèles plus complexes, il est possible de mieux caractériser
...
...
@@ -637,4 +639,5 @@ closeall()
<!-- Local Variables: -->
<!-- mode: markdown -->
<!-- ispell-local-dictionary: "french" -->
<!-- End: -->
module3/exo3/skeleton_css.css
0 → 100644
View file @
7893ffdc
@font-face
{
font-style
:
normal
;
font-weight
:
300
;
}
@font-face
{
font-style
:
normal
;
font-weight
:
400
;
}
@font-face
{
font-style
:
normal
;
font-weight
:
600
;
}
html
{
font-family
:
sans-serif
;
/* 1 */
-ms-text-size-adjust
:
100%
;
/* 2 */
-webkit-text-size-adjust
:
100%
;
/* 2 */
}
body
{
margin
:
0
;
}
article
,
aside
,
details
,
figcaption
,
figure
,
footer
,
header
,
hgroup
,
main
,
menu
,
nav
,
section
,
summary
{
display
:
block
;
}
audio
,
canvas
,
progress
,
video
{
display
:
inline-block
;
/* 1 */
vertical-align
:
baseline
;
/* 2 */
}
audio
:not
([
controls
])
{
display
:
none
;
height
:
0
;
}
[
hidden
],
template
{
display
:
none
;
}
a
:active
,
a
:hover
{
outline
:
0
;
}
abbr
[
title
]
{
border-bottom
:
1px
dotted
;
}
b
,
strong
{
font-weight
:
bold
;
}
dfn
{
font-style
:
italic
;
}
h1
{
font-size
:
2em
;
margin
:
0.67em
0
;
}
mark
{
background
:
#ff0
;
color
:
#000
;
}
small
{
font-size
:
80%
;
}
sub
,
sup
{
font-size
:
75%
;
line-height
:
0
;
position
:
relative
;
vertical-align
:
baseline
;
}
sup
{
top
:
-0.5em
;
}
sub
{
bottom
:
-0.25em
;
}
img
{
border
:
0
;
}
svg
:not
(
:root
)
{
overflow
:
hidden
;
}
figure
{
margin
:
1em
40px
;
}
hr
{
-moz-box-sizing
:
content-box
;
box-sizing
:
content-box
;
height
:
0
;
}
pre
{
overflow
:
auto
;
}
code
,
kbd
,
pre
,
samp
{
font-family
:
monospace
,
monospace
;
font-size
:
1em
;
}
button
,
input
,
optgroup
,
select
,
textarea
{
color
:
inherit
;
/* 1 */
font
:
inherit
;
/* 2 */
margin
:
0
;
/* 3 */
}
button
{
overflow
:
visible
;
}
button
,
select
{
text-transform
:
none
;
}
button
,
html
input
[
type
=
"button"
],
/* 1 */
input
[
type
=
"reset"
],
input
[
type
=
"submit"
]
{
-webkit-appearance
:
button
;
/* 2 */
cursor
:
pointer
;
/* 3 */
}
button
[
disabled
],
html
input
[
disabled
]
{
cursor
:
default
;
}
button
::-moz-focus-inner
,
input
::-moz-focus-inner
{
border
:
0
;
padding
:
0
;
}
input
{
line-height
:
normal
;
}
input
[
type
=
"checkbox"
],
input
[
type
=
"radio"
]
{
box-sizing
:
border-box
;
/* 1 */
padding
:
0
;
/* 2 */
}
input
[
type
=
"number"
]
::-webkit-inner-spin-button
,
input
[
type
=
"number"
]
::-webkit-outer-spin-button
{
height
:
auto
;
}
input
[
type
=
"search"
]
{
-webkit-appearance
:
textfield
;
/* 1 */
-moz-box-sizing
:
content-box
;
-webkit-box-sizing
:
content-box
;
/* 2 */
box-sizing
:
content-box
;
}
input
[
type
=
"search"
]
::-webkit-search-cancel-button
,
input
[
type
=
"search"
]
::-webkit-search-decoration
{
-webkit-appearance
:
none
;
}
fieldset
{
border
:
1px
solid
#c0c0c0
;
margin
:
0
2px
;
padding
:
0.35em
0.625em
0.75em
;
}
legend
{
border
:
0
;
/* 1 */
padding
:
0
;
/* 2 */
}
textarea
{
overflow
:
auto
;
}
optgroup
{
font-weight
:
bold
;
}
table
{
font-family
:
monospace
,
monospace
;
font-size
:
0.8em
;
border-collapse
:
collapse
;
border-spacing
:
0
;
}
td
,
th
{
padding
:
0
;
}
thead
th
{
border-bottom
:
1px
solid
black
;
background-color
:
white
;
}
tr
:nth-child
(
odd
)
{
background-color
:
rgb
(
248
,
248
,
248
);
}
/*
* Skeleton V2.0.4
* Copyright 2014, Dave Gamache
* www.getskeleton.com
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
* 12/29/2014
*/
.container
{
position
:
relative
;
width
:
100%
;
max-width
:
960px
;
margin
:
0
auto
;
padding
:
0
20px
;
box-sizing
:
border-box
;
}
.column
,
.columns
{
width
:
100%
;
float
:
left
;
box-sizing
:
border-box
;
}
@media
(
min-width
:
400px
)
{
.container
{
width
:
85%
;
padding
:
0
;
}
}
@media
(
min-width
:
550px
)
{
.container
{
width
:
80%
;
}
.column
,
.columns
{
margin-left
:
4%
;
}
.column
:first-child
,
.columns
:first-child
{
margin-left
:
0
;
}
.one.column
,
.one.columns
{
width
:
4.66666666667%
;
}
.two.columns
{
width
:
13.3333333333%
;
}
.three.columns
{
width
:
22%
;
}
.four.columns
{
width
:
30.6666666667%
;
}
.five.columns
{
width
:
39.3333333333%
;
}
.six.columns
{
width
:
48%
;
}
.seven.columns
{
width
:
56.6666666667%
;
}
.eight.columns
{
width
:
65.3333333333%
;
}
.nine.columns
{
width
:
74.0%
;
}
.ten.columns
{
width
:
82.6666666667%
;
}
.eleven.columns
{
width
:
91.3333333333%
;
}
.twelve.columns
{
width
:
100%
;
margin-left
:
0
;
}
.one-third.column
{
width
:
30.6666666667%
;
}
.two-thirds.column
{
width
:
65.3333333333%
;
}
.one-half.column
{
width
:
48%
;
}
/* Offsets */
.offset-by-one.column
,
.offset-by-one.columns
{
margin-left
:
8.66666666667%
;
}
.offset-by-two.column
,
.offset-by-two.columns
{
margin-left
:
17.3333333333%
;
}
.offset-by-three.column
,
.offset-by-three.columns
{
margin-left
:
26%
;
}
.offset-by-four.column
,
.offset-by-four.columns
{
margin-left
:
34.6666666667%
;
}
.offset-by-five.column
,
.offset-by-five.columns
{
margin-left
:
43.3333333333%
;
}
.offset-by-six.column
,
.offset-by-six.columns
{
margin-left
:
52%
;
}
.offset-by-seven.column
,
.offset-by-seven.columns
{
margin-left
:
60.6666666667%
;
}
.offset-by-eight.column
,
.offset-by-eight.columns
{
margin-left
:
69.3333333333%
;
}
.offset-by-nine.column
,
.offset-by-nine.columns
{
margin-left
:
78.0%
;
}
.offset-by-ten.column
,
.offset-by-ten.columns
{
margin-left
:
86.6666666667%
;
}
.offset-by-eleven.column
,
.offset-by-eleven.columns
{
margin-left
:
95.3333333333%
;
}
.offset-by-one-third.column
,
.offset-by-one-third.columns
{
margin-left
:
34.6666666667%
;
}
.offset-by-two-thirds.column
,
.offset-by-two-thirds.columns
{
margin-left
:
69.3333333333%
;
}
.offset-by-one-half.column
,
.offset-by-one-half.columns
{
margin-left
:
52%
;
}
}
html
{
font-size
:
62.5%
;
}
body
{
font-size
:
1.5em
;
/* currently ems cause chrome bug misinterpreting rems on body element */
line-height
:
1.6
;
font-weight
:
400
;
font-family
:
"Raleway"
,
"HelveticaNeue"
,
"Helvetica Neue"
,
Helvetica
,
Arial
,
sans-serif
;
color
:
#222
;
}
h1
,
h2
,
h3
,
h4
,
h5
,
h6
{
margin-top
:
2rem
;
margin-bottom
:
0
;
font-weight
:
300
;
}
h1
{
font-size
:
3.6rem
;
line-height
:
1.2
;
letter-spacing
:
-.1rem
;}
h2
{
font-size
:
3.0rem
;
line-height
:
1.25
;
letter-spacing
:
-.1rem
;
}
h3
{
font-size
:
2.8rem
;
line-height
:
1.3
;
letter-spacing
:
-.1rem
;
}
h4
{
font-size
:
2.6rem
;
line-height
:
1.35
;
letter-spacing
:
-.08rem
;
}
h5
{
font-size
:
2.4rem
;
line-height
:
1.5
;
letter-spacing
:
-.05rem
;
}
h6
{
font-size
:
1.5rem
;
line-height
:
1.6
;
letter-spacing
:
0
;
}
p
{
margin-top
:
0
;
}
a
{
color
:
#1EAEDB
;
}
a
:hover
{
color
:
#0FA0CE
;
}
.button
,
button
,
input
[
type
=
"submit"
],
input
[
type
=
"reset"
],
input
[
type
=
"button"
]
{
display
:
inline-block
;
height
:
38px
;
padding
:
0
30px
;
color
:
#555
;
text-align
:
center
;
font-size
:
11px
;
font-weight
:
600
;
line-height
:
38px
;
letter-spacing
:
.1rem
;
text-transform
:
uppercase
;
text-decoration
:
none
;
white-space
:
nowrap
;
background-color
:
transparent
;
border-radius
:
4px
;
border
:
1px
solid
#bbb
;
cursor
:
pointer
;
box-sizing
:
border-box
;
}
.button
:hover
,
button
:hover
,
input
[
type
=
"submit"
]
:hover
,
input
[
type
=
"reset"
]
:hover
,
input
[
type
=
"button"
]
:hover
,
.button
:focus
,
button
:focus
,
input
[
type
=
"submit"
]
:focus
,
input
[
type
=
"reset"
]
:focus
,
input
[
type
=
"button"
]
:focus
{
color
:
#333
;
border-color
:
#888
;
outline
:
0
;
}
.button.button-primary
,
button
.button-primary
,
input
[
type
=
"submit"
]
.button-primary
,
input
[
type
=
"reset"
]
.button-primary
,
input
[
type
=
"button"
]
.button-primary
{
color
:
#FFF
;
background-color
:
#33C3F0
;
border-color
:
#33C3F0
;
}
.button.button-primary
:hover
,
button
.button-primary
:hover
,
input
[
type
=
"submit"
]
.button-primary
:hover
,
input
[
type
=
"reset"
]
.button-primary
:hover
,
input
[
type
=
"button"
]
.button-primary
:hover
,
.button.button-primary
:focus
,
button
.button-primary
:focus
,
input
[
type
=
"submit"
]
.button-primary
:focus
,
input
[
type
=
"reset"
]
.button-primary
:focus
,
input
[
type
=
"button"
]
.button-primary
:focus
{
color
:
#FFF
;
background-color
:
#1EAEDB
;
border-color
:
#1EAEDB
;
}
input
[
type
=
"email"
],
input
[
type
=
"number"
],
input
[
type
=
"search"
],
input
[
type
=
"text"
],
input
[
type
=
"tel"
],
input
[
type
=
"url"
],
input
[
type
=
"password"
],
textarea
,
select
{
height
:
38px
;
padding
:
6px
10px
;
/* The 6px vertically centers text on FF, ignored by Webkit */
background-color
:
#fff
;
border
:
1px
solid
#D1D1D1
;
border-radius
:
4px
;
box-shadow
:
none
;
box-sizing
:
border-box
;
}
/* Removes awkward default styles on some inputs for iOS */
input
[
type
=
"email"
],
input
[
type
=
"number"
],
input
[
type
=
"search"
],
input
[
type
=
"text"
],
input
[
type
=
"tel"
],
input
[
type
=
"url"
],
input
[
type
=
"password"
],
textarea
{
-webkit-appearance
:
none
;
-moz-appearance
:
none
;
appearance
:
none
;
}
textarea
{
min-height
:
65px
;
padding-top
:
6px
;
padding-bottom
:
6px
;
}
input
[
type
=
"email"
]
:focus
,
input
[
type
=
"number"
]
:focus
,
input
[
type
=
"search"
]
:focus
,
input
[
type
=
"text"
]
:focus
,
input
[
type
=
"tel"
]
:focus
,
input
[
type
=
"url"
]
:focus
,
input
[
type
=
"password"
]
:focus
,
textarea
:focus
,
select
:focus
{
border
:
1px
solid
#33C3F0
;
outline
:
0
;
}
label
,
legend
{
display
:
block
;
margin-bottom
:
.5rem
;
font-weight
:
600
;
}
fieldset
{
padding
:
0
;
border-width
:
0
;
}
input
[
type
=
"checkbox"
],
input
[
type
=
"radio"
]
{
display
:
inline
;
}
label
>
.label-body
{
display
:
inline-block
;
margin-left
:
.5rem
;
font-weight
:
normal
;
}
ul
{
list-style
:
circle
;
}
ol
{
list-style
:
decimal
;
}
ul
ul
,
ul
ol
,
ol
ol
,
ol
ul
{
margin
:
1.5rem
0
1.5rem
3rem
;
font-size
:
90%
;
}
li
>
p
{
margin
:
0
;}
th
,
td
{
padding
:
5px
15px
;
text-align
:
left
;
border-bottom
:
1px
solid
#E1E1E1
;
}
th
:first-child
,
td
:first-child
{
padding-left
:
0
;
}
th
:last-child
,
td
:last-child
{
padding-right
:
0
;
}
button
,
.button
{
margin-bottom
:
1rem
;
}
input
,
textarea
,
select
,
fieldset
{
margin-bottom
:
1.5rem
;
}
pre
,
blockquote
,
dl
,
figure
,
table
,
p
,
ul
,
ol
,
form
{
margin-bottom
:
1.0rem
;
}
.u-full-width
{
width
:
100%
;
box-sizing
:
border-box
;
}
.u-max-full-width
{
max-width
:
100%
;
box-sizing
:
border-box
;
}
.u-pull-right
{
float
:
right
;
}
.u-pull-left
{
float
:
left
;
}
hr
{
margin-top
:
3rem
;
margin-bottom
:
3.5rem
;
border-width
:
0
;
border-top
:
1px
solid
#E1E1E1
;
}
.container
:after
,
.row
:after
,
.u-cf
{
content
:
""
;
display
:
table
;
clear
:
both
;
}
pre
{
display
:
block
;
padding
:
9.5px
;
margin
:
0
0
10px
;
font-size
:
13px
;
line-height
:
1.42857143
;
word-break
:
break-all
;
word-wrap
:
break-word
;
border
:
1px
solid
#ccc
;
border-radius
:
4px
;
}
pre
.hljl
{
margin
:
0
0
10px
;
display
:
block
;
background
:
#f5f5f5
;
border-radius
:
4px
;
padding
:
5px
;
}
pre
.output
{
background
:
#ffffff
;
}
pre
.code
{
background
:
#ffffff
;
}
pre
.julia-error
{
color
:
red
}
code
,
kbd
,
pre
,
samp
{
font-family
:
Menlo
,
Monaco
,
Consolas
,
"Courier New"
,
monospace
;
font-size
:
0.9em
;
}
@media
(
min-width
:
400px
)
{}
@media
(
min-width
:
550px
)
{}
@media
(
min-width
:
750px
)
{}
@media
(
min-width
:
1000px
)
{}
@media
(
min-width
:
1200px
)
{}
h1
.title
{
margin-top
:
20px
}
img
{
max-width
:
100%
}
div
.title
{
text-align
:
center
;}
body
{
counter-reset
:
h1counter
;}
h1
{
counter-reset
:
h2counter
;}
h2
{
counter-reset
:
h3counter
;}
h1
.title
:before
{
content
:
none
;
counter-increment
:
none
;
}
h1
:before
{
content
:
counter
(
h1counter
)
"\0000a0-\0000a0"
;
counter-increment
:
h1counter
;
}
h2
:before
{
content
:
counter
(
h1counter
)
"."
counter
(
h2counter
)
"\0000a0-\0000a0"
;
counter-increment
:
h2counter
;
}
h3
:before
{
content
:
counter
(
h1counter
)
"."
counter
(
h2counter
)
"."
counter
(
h3counter
)
"\0000a0-\0000a0"
;
counter-increment
:
h3counter
;
}
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