Skip to content

Commit

Permalink
up tuto
Browse files Browse the repository at this point in the history
  • Loading branch information
dmetivie committed Jun 15, 2024
1 parent 7a975b3 commit e5f0bb2
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions examples/tuto_paper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ md"""
"""

md"""
SWG as described in Métivier, Gobet and Parey
This tutorial describes the Stochastic Weather Generator describes in *Interpretable Seasonal Hidden Markov Model for spatio-temporal stochastic rain generator in France* by Emmanuel Gobet, David Métivier and Sylvie Parey.
It provides a step by step construction of the Seasonal Hidden Markov Model (SHMM), the interpretation of the hidden states as Weather regimes over France and eventually the validation of the model with simulations.
"""
md"""
## Set up
Expand Down Expand Up @@ -43,6 +44,7 @@ using SmoothPeriodicStatsModels # Name might change. Small collection of smooth
using StochasticWeatherGenerators # interface to use with SmoothPeriodicStatsModels.jl

#-
save_tuto_path = "../../assets/tuto_1"

Random.seed!(1234)

Expand All @@ -51,21 +53,21 @@ md"""
Some settings to have nice plots and save cropped version of plots (necessary in some cases).
"""

using StatsPlots, LaTeXStrings
using Plots.PlotMeasures # To play with margin in Plots
using StatsPlots.PlotMeasures # To play with margin in Plots

gr() # plotly() # for interactive plots
default(thickness_scaling=1.2, fontfamily="Computer Modern", linewidth=2, label=nothing, size=(1000, 600))
scalefontsizes(1.5)
cur_colors = get_color_palette(:auto, 100);
my_palette(K) = palette(vcat(cur_colors[1], [cur_colors[c] for c in 3:4], cur_colors[2]), K)

using Plots: @userplot, @recipe
file_for_plot_utilities = download("https://raw.githubusercontent.com/dmetivie/StochasticWeatherGenerators.jl/master/examples/plot_utilities.jl")
include(file_for_plot_utilities)

md"""
To plot maps, we use `GeoMakie.jl` + a hack with `NaturalEarth.jl`. This is quite experimental.
To plot maps, we use `GeoMakie.jl` + a hack with `NaturalEarth.jl`. This is still experimental.
I used `cartopy` before with `PyCall.jl` which works very well.
For the following code to work you will need to add the following packages
Expand All @@ -78,10 +80,6 @@ Pkg.add("HTTP", "JSON3", "GeoMakie", "CairoMakie")
file_for_maps_with_geomakie = download("https://raw.githubusercontent.com/dmetivie/StochasticWeatherGenerators.jl/master/examples/geo_makie_features.jl") # download file from a GitHub repo
include(file_for_maps_with_geomakie)

md"""
### Data files
"""

md"""
### Global Parameters
"""
Expand Down

0 comments on commit e5f0bb2

Please sign in to comment.