From 4ee2051ce091a93003527bd07bc70a72571f0f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20F=C3=A9votte?= Date: Mon, 13 Apr 2020 01:25:15 +0200 Subject: [PATCH] =?UTF-8?q?Ex=2003-3:=20r=C3=A9sum=C3=A9=20+=20correction?= =?UTF-8?q?=20taux=20d'accroissement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - passage à Plotly pour les figures - correction du style --- .gitignore | 1 + module3/exo3/.gitignore | 2 + module3/exo3/Manifest.toml | 8 +- module3/exo3/compile.jl | 17 + module3/exo3/exercice.html | 266420 ++++++++++++++++++++++++++- module3/exo3/exercice.jmd | 223 +- module3/exo3/julia_html.tpl | 56 + module3/exo3/make.jl | 24 +- module3/exo3/plotly-latest.min.js | 7 + module3/exo3/utils.jl | 41 +- 10 files changed, 266663 insertions(+), 136 deletions(-) create mode 100644 .gitignore create mode 100644 module3/exo3/.gitignore create mode 100755 module3/exo3/compile.jl create mode 100644 module3/exo3/julia_html.tpl mode change 100644 => 100755 module3/exo3/make.jl create mode 100644 module3/exo3/plotly-latest.min.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e4e5f6c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*~ \ No newline at end of file diff --git a/module3/exo3/.gitignore b/module3/exo3/.gitignore new file mode 100644 index 0000000..9f52c5c --- /dev/null +++ b/module3/exo3/.gitignore @@ -0,0 +1,2 @@ +Exercice.so +exercice.jl \ No newline at end of file diff --git a/module3/exo3/Manifest.toml b/module3/exo3/Manifest.toml index 79755bd..5626303 100644 --- a/module3/exo3/Manifest.toml +++ b/module3/exo3/Manifest.toml @@ -112,9 +112,9 @@ version = "2.0.0" [[DataStructures]] deps = ["InteractiveUtils", "OrderedCollections"] -git-tree-sha1 = "73eb18320fe3ba58790c8b8f6f89420f0a622773" +git-tree-sha1 = "4dead20a1606a60292529023d6eac18a1ef6432e" uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" -version = "0.17.11" +version = "0.17.12" [[DataValueInterfaces]] git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" @@ -170,9 +170,9 @@ uuid = "e30172f5-a6a5-5a46-863b-614d45cd2de4" version = "0.24.7" [[ElasticArrays]] -git-tree-sha1 = "5b5b7cb8cba44bcf337b8af0a1f3e57c89468660" +git-tree-sha1 = "6643de157ea3332d73e35a6a6ed2bdffe7792b12" uuid = "fdbdab4c-e67f-52f5-8c3f-e7b388dad3d4" -version = "1.0.0" +version = "1.1.0" [[ElasticPDMats]] deps = ["LinearAlgebra", "MacroTools", "PDMats", "Test"] diff --git a/module3/exo3/compile.jl b/module3/exo3/compile.jl new file mode 100755 index 0000000..9b6efdc --- /dev/null +++ b/module3/exo3/compile.jl @@ -0,0 +1,17 @@ +#!/bin/bash +#= +exec julia --color=yes --startup-file=no "${BASH_SOURCE[0]}" "$@" +=# + +using Pkg +Pkg.activate(@__DIR__) +Pkg.instantiate() + +using PackageCompiler +@time create_sysimage(Symbol.(keys(Pkg.project().dependencies)); + sysimage_path=Pkg.project().name * ".so", + precompile_execution_file=joinpath(@__DIR__, "make.jl")) + +# Local Variables: +# mode: julia +# End: diff --git a/module3/exo3/exercice.html b/module3/exo3/exercice.html index 2d793f0..aa50b8f 100644 --- a/module3/exo3/exercice.html +++ b/module3/exo3/exercice.html @@ -6,6 +6,8 @@ Analyse de la concentration de CO2 dans l'atmosphère depuis 1958 + + + +

Un zoom sur les dernières années laisse penser que le cycle court se produit sur une période annuelle, avec un minimum local atteint chaque année autour du mois d'octobre.

- + +
+ + +

Analyse

Dans cette analyse, nous allons tenter de séparer ces deux composantes : composante tendancielle "lisse" et composante oscillante de période annuelle. Plus précisément, en notant $C$ la concentration en CO2 et $t$ le temps, nous cherchons une approximation des mesures sous la forme :

@@ -988,7 +7949,7 @@ Missing data: 2012-09-29 - 2012-10-20 (21 days)
-interp = DI.LinearInterpolation(data_raw.val, date2num.(data_raw.date));
+interp = DI.LinearInterpolation(data_raw.co2, date2num.(data_raw.date));
 
@@ -997,7 +7958,7 @@ Missing data: 2012-09-29 - 2012-10-20 (21 days)