Skip to content

Commit

Permalink
Deploying to gh-pages from @ 694a821 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainv committed Apr 9, 2024
1 parent a5df22e commit 0f7796d
Show file tree
Hide file tree
Showing 28 changed files with 38 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 3f41b48232694922978300c09146fdaf
config: c640b7ea9ce96cebfdbf0c2e420a74b3
tags: 645f666f9bcd5a90fca523b33c5a78b7
2 changes: 1 addition & 1 deletion _modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h1>All modules for which code is available</h1>
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion _modules/riskmapjnr/defor_cat.html
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ <h1>Source code for riskmapjnr.defor_cat</h1><div class="highlight"><pre>
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion _modules/riskmapjnr/defrate_per_cat.html
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ <h1>Source code for riskmapjnr.defrate_per_cat</h1><div class="highlight"><pre>
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion _modules/riskmapjnr/dist_edge_threshold.html
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ <h1>Source code for riskmapjnr.dist_edge_threshold</h1><div class="highlight"><p
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion _modules/riskmapjnr/local_defor_rate.html
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ <h1>Source code for riskmapjnr.local_defor_rate</h1><div class="highlight"><pre>
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion _modules/riskmapjnr/makemap.html
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ <h1>Source code for riskmapjnr.makemap</h1><div class="highlight"><pre>
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
6 changes: 3 additions & 3 deletions _modules/riskmapjnr/misc/miscellaneous.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ <h1>Source code for riskmapjnr.misc.miscellaneous</h1><div class="highlight"><pr
<span class="n">nsquare_y</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">ceil</span><span class="p">(</span><span class="n">nrow</span> <span class="o">/</span> <span class="n">square_size</span><span class="p">))</span>
<span class="n">nsquare</span> <span class="o">=</span> <span class="n">nsquare_x</span> <span class="o">*</span> <span class="n">nsquare_y</span>
<span class="c1"># Upper-left coordinates of each square</span>
<span class="n">x</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">ncol</span><span class="p">,</span> <span class="n">square_size</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">int</span><span class="p">)</span><span class="o">.</span><span class="n">tolist</span><span class="p">()</span>
<span class="n">y</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">nrow</span><span class="p">,</span> <span class="n">square_size</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="n">np</span><span class="o">.</span><span class="n">int</span><span class="p">)</span><span class="o">.</span><span class="n">tolist</span><span class="p">()</span>
<span class="n">x</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">ncol</span><span class="p">,</span> <span class="n">square_size</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="nb">int</span><span class="p">)</span><span class="o">.</span><span class="n">tolist</span><span class="p">()</span>
<span class="n">y</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">nrow</span><span class="p">,</span> <span class="n">square_size</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="nb">int</span><span class="p">)</span><span class="o">.</span><span class="n">tolist</span><span class="p">()</span>
<span class="c1"># Size (number of col and row) of each square</span>
<span class="n">nx</span> <span class="o">=</span> <span class="p">[</span><span class="n">square_size</span><span class="p">]</span> <span class="o">*</span> <span class="n">nsquare_x</span>
<span class="n">ny</span> <span class="o">=</span> <span class="p">[</span><span class="n">square_size</span><span class="p">]</span> <span class="o">*</span> <span class="n">nsquare_y</span>
Expand Down Expand Up @@ -383,7 +383,7 @@ <h1>Source code for riskmapjnr.misc.miscellaneous</h1><div class="highlight"><pr
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion _modules/riskmapjnr/plot.html
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ <h1>Source code for riskmapjnr.plot</h1><div class="highlight"><pre>
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
11 changes: 5 additions & 6 deletions _modules/riskmapjnr/riskmapjnr.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ <h1>Source code for riskmapjnr.riskmapjnr</h1><div class="highlight"><pre>
<span class="c1"># license :GPLv3</span>
<span class="c1"># ==============================================================================</span>

<span class="n">__version__</span> <span class="o">=</span> <span class="s2">&quot;1.2&quot;</span>
<span class="kn">import</span> <span class="nn">riskmapjnr</span> <span class="k">as</span> <span class="nn">rmj</span>


<div class="viewcode-block" id="main">
Expand All @@ -121,10 +121,9 @@ <h1>Source code for riskmapjnr.riskmapjnr</h1><div class="highlight"><pre>
<span class="sd"> ``riskmapjnr`` Python package has been correctly imported.</span>

<span class="sd"> &quot;&quot;&quot;</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;# riskmapjnr: Map of deforestation risk following JNR methodology.&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;# https://ecology.ghislainv.fr/riskmapjnr&quot;</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;# riskmapjnr version </span><span class="si">{}</span><span class="s2">.&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">__version__</span><span class="p">))</span>
<span class="k">return</span> <span class="kc">None</span></div>

<span class="nb">print</span><span class="p">(</span><span class="n">rmj</span><span class="o">.</span><span class="vm">__doc__</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;version </span><span class="si">{</span><span class="n">rmj</span><span class="o">.</span><span class="n">__version__</span><span class="si">}</span><span class="s2">.&quot;</span><span class="p">)</span></div>


<span class="c1"># End</span>
Expand All @@ -137,7 +136,7 @@ <h1>Source code for riskmapjnr.riskmapjnr</h1><div class="highlight"><pre>
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
4 changes: 3 additions & 1 deletion _modules/riskmapjnr/set_defor_cat_zero.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ <h1>Source code for riskmapjnr.set_defor_cat_zero</h1><div class="highlight"><pr
<span class="c1"># Data</span>
<span class="n">catzero_data</span> <span class="o">=</span> <span class="n">ldefrate_band</span><span class="o">.</span><span class="n">ReadAsArray</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="n">px</span><span class="p">],</span> <span class="n">y</span><span class="p">[</span><span class="n">py</span><span class="p">],</span> <span class="n">nx</span><span class="p">[</span><span class="n">px</span><span class="p">],</span> <span class="n">ny</span><span class="p">[</span><span class="n">py</span><span class="p">])</span>
<span class="n">dist_data</span> <span class="o">=</span> <span class="n">dist_band</span><span class="o">.</span><span class="n">ReadAsArray</span><span class="p">(</span><span class="n">x</span><span class="p">[</span><span class="n">px</span><span class="p">],</span> <span class="n">y</span><span class="p">[</span><span class="n">py</span><span class="p">],</span> <span class="n">nx</span><span class="p">[</span><span class="n">px</span><span class="p">],</span> <span class="n">ny</span><span class="p">[</span><span class="n">py</span><span class="p">])</span>
<span class="c1"># Ensure NoData when dist_data equals zero (especially for t2)</span>
<span class="n">catzero_data</span><span class="p">[</span><span class="n">dist_data</span> <span class="o">==</span> <span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="mi">0</span>
<span class="c1"># Set 1 for zero risk of deforestation (beyond distance threshold)</span>
<span class="n">catzero_data</span><span class="p">[</span><span class="n">dist_data</span> <span class="o">&gt;=</span> <span class="n">dist_thresh</span><span class="p">]</span> <span class="o">=</span> <span class="mi">1</span>
<span class="n">catzero_band</span><span class="o">.</span><span class="n">WriteArray</span><span class="p">(</span><span class="n">catzero_data</span><span class="p">,</span> <span class="n">x</span><span class="p">[</span><span class="n">px</span><span class="p">],</span> <span class="n">y</span><span class="p">[</span><span class="n">py</span><span class="p">])</span>
Expand Down Expand Up @@ -251,7 +253,7 @@ <h1>Source code for riskmapjnr.set_defor_cat_zero</h1><div class="highlight"><pr
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion _modules/riskmapjnr/validation.html
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ <h1>Source code for riskmapjnr.validation</h1><div class="highlight"><pre>
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion articles.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ <h1>Articles<a class="headerlink" href="#articles" title="Link to this heading">
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ <h2>riskmapjnr 0.1<a class="headerlink" href="#riskmapjnr-0-1" title="Link to th
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion code_of_conduct.html
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ <h2>Attribution<a class="headerlink" href="#attribution" title="Link to this hea
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ <h2>Contribute to code<a class="headerlink" href="#contribute-to-code" title="Li
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ <h2 id="V">V</h2>
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ <h2>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Li
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion indices.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Li
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion license.html
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ <h2>How to Apply These Terms to Your New Programs<a class="headerlink" href="#ho
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion notebooks/get_started.html
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ <h3><a class="toc-backref" href="#id14" role="doc-backlink">3.4 Risk map of defo
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion notebooks/kenya.html
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ <h3><a class="toc-backref" href="#id14" role="doc-backlink">3.4 Risk map of defo
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion notebooks/parallel.html
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ <h2><a class="toc-backref" href="#id5" role="doc-backlink">4 Results</a><a class
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion notebooks/steps.html
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ <h2><a class="toc-backref" href="#id19" role="doc-backlink">9 Final risk map</a>
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion py-modindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ <h1>Python Module Index</h1>
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
4 changes: 3 additions & 1 deletion reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ <h3 id="searchlabel">Quick search</h3>
<h1>Python API<a class="headerlink" href="#python-api" title="Link to this heading"></a></h1>
<section id="module-riskmapjnr">
<span id="main-functions"></span><h2>Main functions<a class="headerlink" href="#module-riskmapjnr" title="Link to this heading"></a></h2>
<p>riskmapjnr: mapping deforestation risk using the moving window approach.
<a class="reference external" href="https://ecology.ghislainv.fr/riskmapknr/">https://ecology.ghislainv.fr/riskmapknr/</a></p>
<dl class="py function">
<dt class="sig sig-object py" id="riskmapjnr.defor_cat">
<span class="sig-name descname"><span class="pre">defor_cat</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">ldefrate_with_zero_file</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">riskmap_file</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'riskmap.tif'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">ncat</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">30</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">method</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'Equal</span> <span class="pre">Area'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">blk_rows</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">128</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">verbose</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/riskmapjnr/defor_cat.html#defor_cat"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#riskmapjnr.defor_cat" title="Link to this definition"></a></dt>
Expand Down Expand Up @@ -722,7 +724,7 @@ <h1>Python API<a class="headerlink" href="#python-api" title="Link to this headi
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion search.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ <h1 id="search-documentation">Search</h1>
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2022, Ghislain Vieilledent.
&#169;2024, Ghislain Vieilledent.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 7.2.6</a>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 0f7796d

Please sign in to comment.