Skip to content

Commit

Permalink
Correction chapitre 3
Browse files Browse the repository at this point in the history
  • Loading branch information
appariciop committed Jun 20, 2024
1 parent 65368d7 commit 7e9f73a
Show file tree
Hide file tree
Showing 21 changed files with 441 additions and 175 deletions.
2 changes: 1 addition & 1 deletion 03-MethodesRepartitionPonctuelle.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ TessalationC <- as.tess(FenetresC)
TessalationH <- as.tess(FenetresH)
```
Nous pouvons calculer différents tests avec la fonction `quadrat.test`. Dans un premier temps, nous vérifions si **la distribution est dispersée** avec la méthode Monte-Carlo et 999 permutations (`alternative ="regular"`). Que ce soit avec les quadrats carrés ou hexagonaux, la valeur de *p* est égale à 0. Cela signifie que nous sommes 100 % certains que la distribution n'est pas dispersée.
Nous pouvons calculer différents tests avec la fonction `quadrat.test`. Dans un premier temps, nous vérifions si **la distribution est dispersée** avec la méthode Monte-Carlo et 999 permutations (`alternative ="regular"`). Que ce soit avec les quadrats carrés ou hexagonaux, la valeur de *p* est égale à 1. Cela signifie que nous sommes 100 % certains que la distribution n'est pas dispersée.
```{r}
#| echo: true
Expand Down
3 changes: 1 addition & 2 deletions 05-AnalyseReseau.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ Différentes mesures renvoyant à différentes conceptualisations de l'accessibi

```{r}
#| label: tbl-ConceptualisationAccessibilite
#| tbl-cap: Liste des formats avec le *package* `sf` (`st_drivers`)
#| tbl-cap: Conceptualisation et mesures de l'accessibilité spatiale potentielle aux services
#| echo: false
#| message: false
#| warning: false
Expand Down Expand Up @@ -1324,7 +1324,6 @@ ggplot(df2) +
color = 'fonction'
) +
theme_minimal()
```
Le choix d'une fonction de pondération doit avant tout reposer sur des considérations théoriques et représenter correctement la décroissance de l'attractivité d'un service en fonction de la distance d'éloignement. Idéalement, ces fonctions devraient être ajustées en fonction de données sur les habitudes de déplacement des individus.
Expand Down
6 changes: 3 additions & 3 deletions data/chap01/export/Carte1.html

Large diffs are not rendered by default.

Binary file modified data/chap01/export/Carte1.pdf
Binary file not shown.
Binary file modified data/chap01/export/Data.gpkg
Binary file not shown.
Binary file modified data/chap01/export/PointsGPS.dbf
Binary file not shown.
267 changes: 267 additions & 0 deletions data/chap01/export/PointsGPS.geojson

Large diffs are not rendered by default.

Binary file modified data/chap05/_DataReseau/GTFS_clients.zip
Binary file not shown.
34 changes: 17 additions & 17 deletions docs/01-ManipulationDonneesSpatiales.html

Large diffs are not rendered by default.

142 changes: 71 additions & 71 deletions docs/02-Autocorrelation.html
Original file line number Diff line number Diff line change
Expand Up @@ -2217,7 +2217,7 @@ <h1 class="title"><span id="sec-chap02" class="quarto-section-identifier"><span
<div class="sourceCode" id="cb56"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co">## Valeurs permutées</span></span>
<span><span class="fu"><a href="https://rdrr.io/r/base/print.html">print</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/sample.html">sample</a></span><span class="op">(</span><span class="va">Carres</span><span class="op">$</span><span class="va">CasA</span><span class="op">)</span><span class="op">)</span></span></code><button title="Copier vers le presse-papier" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code> [1] 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 1 1</code></pre>
<pre><code> [1] 0 1 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 1 1 0 0</code></pre>
</div>
</div>
</div>
Expand Down Expand Up @@ -2338,7 +2338,7 @@ <h1 class="title"><span id="sec-chap02" class="quarto-section-identifier"><span
alternative hypothesis: greater
sample estimates:
mean of simulation variance of simulation
163.1672 109.2556
162.4745 116.4620


Monte-Carlo simulation of join-count statistic
Expand All @@ -2352,7 +2352,7 @@ <h1 class="title"><span id="sec-chap02" class="quarto-section-identifier"><span
alternative hypothesis: greater
sample estimates:
mean of simulation variance of simulation
213.6436 128.2997 </code></pre>
213.3874 123.7947 </code></pre>
</div>
</div>
<p>L’approche d’inférence basée sur les permutations signale aussi que les deux distributions sont significativement autocorrélées spatialement (<em>p</em>&nbsp;=&nbsp;0,001).</p>
Expand Down Expand Up @@ -2384,104 +2384,104 @@ <h1 class="title"><span id="sec-chap02" class="quarto-section-identifier"><span
</tr></thead>
<tbody>
<tr class="odd">
<td style="text-align: center;">-3,47</td>
<td style="text-align: center;">-9,99</td>
<td style="text-align: center;">0,17</td>
<td style="text-align: center;">-0,29</td>
</tr>
<tr class="even">
<td style="text-align: center;">0,24</td>
<td style="text-align: center;">1,36</td>
<td style="text-align: center;">-1,21</td>
<td style="text-align: center;">-3,37</td>
</tr>
<tr class="odd">
<td style="text-align: center;">2,98</td>
<td style="text-align: center;">8,92</td>
<td style="text-align: center;">-0,93</td>
<td style="text-align: center;">-1,56</td>
</tr>
<tr class="even">
<td style="text-align: center;">0,14</td>
<td style="text-align: center;">3,40</td>
<td style="text-align: center;">-1,77</td>
<td style="text-align: center;">-6,91</td>
</tr>
<tr class="odd">
<td style="text-align: center;">-1,68</td>
<td style="text-align: center;">-2,95</td>
<td style="text-align: center;">0,69</td>
<td style="text-align: center;">4,28</td>
</tr>
<tr class="even">
<td style="text-align: center;">-1,64</td>
<td style="text-align: center;">-7,23</td>
<td style="text-align: center;">-0,55</td>
<td style="text-align: center;">0,28</td>
</tr>
<tr class="odd">
<td style="text-align: center;">-1,19</td>
<td style="text-align: center;">1,19</td>
<td style="text-align: center;">1,68</td>
<td style="text-align: center;">12,05</td>
</tr>
<tr class="even">
<td style="text-align: center;">0,19</td>
<td style="text-align: center;">-2,13</td>
<td style="text-align: center;">0,54</td>
<td style="text-align: center;">2,29</td>
</tr>
<tr class="odd">
<td style="text-align: center;">-1,24</td>
<td style="text-align: center;">0,67</td>
<td style="text-align: center;">2,57</td>
<td style="text-align: center;">12,20</td>
</tr>
<tr class="even">
<td style="text-align: center;">0,47</td>
<td style="text-align: center;">-3,26</td>
<td style="text-align: center;">-1,57</td>
<td style="text-align: center;">-11,75</td>
</tr>
<tr class="odd">
<td style="text-align: center;">-2,51</td>
<td style="text-align: center;">-10,69</td>
<td style="text-align: center;">-2,16</td>
<td style="text-align: center;">-5,69</td>
</tr>
<tr class="even">
<td style="text-align: center;">-0,25</td>
<td style="text-align: center;">1,75</td>
<td style="text-align: center;">-0,68</td>
<td style="text-align: center;">-1,31</td>
</tr>
<tr class="odd">
<td style="text-align: center;">0,59</td>
<td style="text-align: center;">9,69</td>
<td style="text-align: center;">1,69</td>
<td style="text-align: center;">11,93</td>
</tr>
<tr class="even">
<td style="text-align: center;">2,82</td>
<td style="text-align: center;">15,55</td>
<td style="text-align: center;">2,68</td>
<td style="text-align: center;">10,16</td>
</tr>
<tr class="odd">
<td style="text-align: center;">1,23</td>
<td style="text-align: center;">4,76</td>
<td style="text-align: center;">-2,13</td>
<td style="text-align: center;">-12,91</td>
</tr>
<tr class="even">
<td style="text-align: center;">1,58</td>
<td style="text-align: center;">2,75</td>
<td style="text-align: center;">0,87</td>
<td style="text-align: center;">9,23</td>
</tr>
<tr class="odd">
<td style="text-align: center;">2,27</td>
<td style="text-align: center;">9,16</td>
<td style="text-align: center;">-1,33</td>
<td style="text-align: center;">0,38</td>
</tr>
<tr class="even">
<td style="text-align: center;">2,11</td>
<td style="text-align: center;">5,27</td>
<td style="text-align: center;">-3,91</td>
<td style="text-align: center;">-14,22</td>
</tr>
<tr class="odd">
<td style="text-align: center;">-1,38</td>
<td style="text-align: center;">-2,33</td>
<td style="text-align: center;">2,71</td>
<td style="text-align: center;">6,57</td>
</tr>
<tr class="even">
<td style="text-align: center;">-0,35</td>
<td style="text-align: center;">-7,72</td>
<td style="text-align: center;">2,41</td>
<td style="text-align: center;">10,15</td>
</tr>
<tr class="odd">
<td style="text-align: center;">-1,41</td>
<td style="text-align: center;">-3,25</td>
<td style="text-align: center;">-1,49</td>
<td style="text-align: center;">0,54</td>
</tr>
<tr class="even">
<td style="text-align: center;">-2,59</td>
<td style="text-align: center;">-12,61</td>
<td style="text-align: center;">-0,15</td>
<td style="text-align: center;">-3,67</td>
</tr>
<tr class="odd">
<td style="text-align: center;">1,78</td>
<td style="text-align: center;">-4,69</td>
<td style="text-align: center;">1,99</td>
<td style="text-align: center;">6,77</td>
</tr>
<tr class="even">
<td style="text-align: center;">0,44</td>
<td style="text-align: center;">2,00</td>
<td style="text-align: center;">0,36</td>
<td style="text-align: center;">4,94</td>
</tr>
<tr class="odd">
<td style="text-align: center;">-1,49</td>
<td style="text-align: center;">-8,32</td>
<td style="text-align: center;">-2,52</td>
<td style="text-align: center;">-9,34</td>
</tr>
</tbody>
</table>
Expand Down Expand Up @@ -2949,26 +2949,26 @@ <h1 class="title"><span id="sec-chap02" class="quarto-section-identifier"><span
<div class="sourceCode" id="cb80"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/base/summary.html">summary</a></span><span class="op">(</span><span class="va">localMoranI.mc</span><span class="op">)</span></span></code><button title="Copier vers le presse-papier" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code> Ii E.Ii Var.Ii Z.Ii
Min. :-0.90053 Min. :-0.077143 Min. :0.0000003 Min. :-2.0405
1st Qu.: 0.08313 1st Qu.:-0.009712 1st Qu.:0.0384477 1st Qu.: 0.4443
Median : 0.49029 Median :-0.001289 Median :0.1406886 Median : 1.4076
Mean : 0.61678 Mean :-0.003918 Mean :0.2181586 Mean : 1.2414
3rd Qu.: 0.97602 3rd Qu.: 0.002865 3rd Qu.:0.2605785 3rd Qu.: 2.1315
Max. : 3.37625 Max. : 0.046552 Max. :1.8142256 Max. : 3.8234
Min. :-0.90053 Min. :-0.065838 Min. :0.0000003 Min. :-1.9767
1st Qu.: 0.08313 1st Qu.:-0.010354 1st Qu.:0.0380096 1st Qu.: 0.4345
Median : 0.49029 Median :-0.002083 Median :0.1348654 Median : 1.4127
Mean : 0.61678 Mean :-0.004765 Mean :0.2178117 Mean : 1.2434
3rd Qu.: 0.97602 3rd Qu.: 0.002220 3rd Qu.:0.2550047 3rd Qu.: 2.1822
Max. : 3.37625 Max. : 0.036870 Max. :1.8913286 Max. : 3.9483
Pr(z != E(Ii)) Pr(z != E(Ii)) Sim Pr(folded) Sim Skewness
Min. :0.0001316 Min. :0.0020 Min. :0.0010 Min. :-0.457154
1st Qu.:0.0330465 1st Qu.:0.0240 1st Qu.:0.0120 1st Qu.:-0.212551
Median :0.1303801 Median :0.1400 Median :0.0700 Median :-0.075311
Mean :0.2497461 Mean :0.2545 Mean :0.1273 Mean :-0.008966
3rd Qu.:0.3910429 3rd Qu.:0.3960 3rd Qu.:0.1980 3rd Qu.: 0.216325
Max. :0.9895698 Max. :0.9960 Max. :0.4980 Max. : 0.432950
Min. :0.0000787 Min. :0.0020 Min. :0.0010 Min. :-0.392737
1st Qu.:0.0290922 1st Qu.:0.0200 1st Qu.:0.0100 1st Qu.:-0.223122
Median :0.1243130 Median :0.1260 Median :0.0640 Median :-0.069893
Mean :0.2482241 Mean :0.2531 Mean :0.1265 Mean :-0.007173
3rd Qu.:0.3981747 3rd Qu.:0.4080 3rd Qu.:0.2040 3rd Qu.: 0.208019
Max. :0.9621181 Max. :0.9800 Max. :0.4890 Max. : 0.434594
Kurtosis
Min. :-0.46371
1st Qu.:-0.26232
Median :-0.17371
Mean :-0.15732
3rd Qu.:-0.07312
Max. : 0.41548 </code></pre>
Min. :-0.46491
1st Qu.:-0.25292
Median :-0.15752
Mean :-0.15824
3rd Qu.:-0.07347
Max. : 0.17966 </code></pre>
</div>
</div>
<p>Avec la cartographie du <em>I</em> de Moran local, nous repérons localement l’autocorrélation spatiale positive (valeurs similaires, fortes ou faibles localement) et l’autocorrélation spatiale négative (valeurs dissemblables localement) (<a href="#fig-Chap02CartoIMoranLocal">figure&nbsp;<span>2.28</span></a>).</p>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/02-Autocorrelation_files/figure-html/fig-ExMapBivar-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/02-Autocorrelation_files/figure-html/fig-FigCorrelation-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/02-Autocorrelation_files/figure-html/fig-localLeeMaps-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/03-MethodesRepartitionPonctuelle.html
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,7 @@ <h1 class="title"><span id="sec-chap03" class="quarto-section-identifier"><span
<span><span class="va">TessalationC</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/pkg/spatstat.geom/man/as.tess.html">as.tess</a></span><span class="op">(</span><span class="va">FenetresC</span><span class="op">)</span></span>
<span><span class="va">TessalationH</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/pkg/spatstat.geom/man/as.tess.html">as.tess</a></span><span class="op">(</span><span class="va">FenetresH</span><span class="op">)</span></span></code><button title="Copier vers le presse-papier" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>Nous pouvons calculer différents tests avec la fonction <code>quadrat.test</code>. Dans un premier temps, nous vérifions si <strong>la distribution est dispersée</strong> avec la méthode Monte-Carlo et 999&nbsp;permutations (<code>alternative ="regular"</code>). Que ce soit avec les quadrats carrés ou hexagonaux, la valeur de <em>p</em> est égale à 0. Cela signifie que nous sommes 100&nbsp;% certains que la distribution n’est pas dispersée.</p>
<p>Nous pouvons calculer différents tests avec la fonction <code>quadrat.test</code>. Dans un premier temps, nous vérifions si <strong>la distribution est dispersée</strong> avec la méthode Monte-Carlo et 999&nbsp;permutations (<code>alternative ="regular"</code>). Que ce soit avec les quadrats carrés ou hexagonaux, la valeur de <em>p</em> est égale à 1. Cela signifie que nous sommes 100&nbsp;% certains que la distribution n’est pas dispersée.</p>
<div class="cell">
<div class="sourceCode" id="cb41"><pre class="downlit sourceCode r code-with-copy"><code class="sourceCode R"><span><span class="co">## Réalisation des différents tests du khi-deux</span></span>
<span><span class="co"># test pour une distribution dispersée (Carrés)</span></span>
Expand Down
18 changes: 9 additions & 9 deletions docs/05-AnalyseReseau.html
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ <h1 class="title"><span id="sec-chap05" class="quarto-section-identifier"><span
from_id from_lat from_lon to_id to_lat to_lon option
1 Rue Wellington S. 45.38947 -71.88393 Rue Darche 45.38353 -71.89169 1
departure_time total_duration total_distance segment mode segment_duration
1 15:18:25 8.1 1215 1 BICYCLE 8.1
1 09:01:01 8.1 1215 1 BICYCLE 8.1
wait distance route geometry
1 0 1215 LINESTRING (-71.88396 45.38...</code></pre>
</div>
Expand All @@ -799,7 +799,7 @@ <h1 class="title"><span id="sec-chap05" class="quarto-section-identifier"><span
from_id from_lat from_lon to_id to_lat to_lon option
1 Rue Darche 45.38353 -71.89169 Rue Wellington S. 45.38947 -71.88393 1
departure_time total_duration total_distance segment mode segment_duration
1 15:18:25 6.8 1215 1 BICYCLE 6.8
1 09:01:02 6.8 1215 1 BICYCLE 6.8
wait distance route geometry
1 0 1215 LINESTRING (-71.89191 45.38...</code></pre>
</div>
Expand Down Expand Up @@ -861,7 +861,7 @@ <h1 class="title"><span id="sec-chap05" class="quarto-section-identifier"><span
from_id from_lat from_lon to_id to_lat to_lon option
1 Départ 45.42203 -71.88183 Campus principal 45.37802 -71.92953 1
departure_time total_duration total_distance segment mode segment_duration
1 15:18:26 22 11352 1 CAR 22
1 09:01:02 22 11352 1 CAR 22
wait distance route geometry
1 0 11352 LINESTRING (-71.88129 45.42...</code></pre>
</div>
Expand All @@ -875,7 +875,7 @@ <h1 class="title"><span id="sec-chap05" class="quarto-section-identifier"><span
from_id from_lat from_lon to_id to_lat to_lon option
1 Campus principal 45.37802 -71.92953 Départ 45.42203 -71.88183 1
departure_time total_duration total_distance segment mode segment_duration
1 15:18:26 19.2 9685 1 CAR 19.2
1 09:01:02 19.2 9685 1 CAR 19.2
wait distance route geometry
1 0 9685 LINESTRING (-71.92952 45.37...</code></pre>
</div>
Expand Down Expand Up @@ -1209,10 +1209,10 @@ <h1 class="title"><span id="sec-chap05" class="quarto-section-identifier"><span
<span> <span class="st">"\n Transport en commun : "</span>, <span class="fu"><a href="https://rdrr.io/r/base/Round.html">round</a></span><span class="op">(</span><span class="va">duree.tc</span>,<span class="fl">2</span><span class="op">)</span>, <span class="st">"secondes"</span><span class="op">)</span></span></code><button title="Copier vers le presse-papier" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>Temps de calcul des matrices :
Voiture : 8.62 secondes
Marche : 0.33 secondes
Vélo : 2.88 secondes
Transport en commun : 0.26 secondes</code></pre>
Voiture : 7.67 secondes
Marche : 0.28 secondes
Vélo : 2.44 secondes
Transport en commun : 0.24 secondes</code></pre>
</div>
</div>
<p>Une fois les matrices obtenues, nous les enregistrons dans un fichier <code>Rdata</code>.</p>
Expand Down Expand Up @@ -1397,7 +1397,7 @@ <h1 class="title"><span id="sec-chap05" class="quarto-section-identifier"><span
<div class="cell-output-display">
<div id="tbl-ConceptualisationAccessibilite" class="anchored">
<table class="table table-sm table-striped small">
<caption>Tableau&nbsp;5.1: Liste des formats avec le <em>package</em> <code>sf</code> (<code>st_drivers</code>)</caption>
<caption>Tableau&nbsp;5.1: Conceptualisation et mesures de l’accessibilité spatiale potentielle aux services</caption>
<colgroup>
<col style="width: 41%">
<col style="width: 58%">
Expand Down
18 changes: 9 additions & 9 deletions docs/06-AnalyseReseauEvenements.html

Large diffs are not rendered by default.

Loading

0 comments on commit 7e9f73a

Please sign in to comment.