Skip to content

Commit

Permalink
Deploying to gh-pages from @ ef19c46 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainv committed May 29, 2024
1 parent 39f6aa1 commit 6ec6dce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
6 changes: 1 addition & 5 deletions _sources/notebooks/large_countries/large_countries.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,10 @@ We prepare the colors for the map.
patches = [mpatches.Patch(facecolor=col, edgecolor="black",
label=labels[i]) for (i, col) in enumerate(colors)]
We load the data: forest cover change, country borders, buffer, and grid.
We load the data: country borders, buffer, and grid.

.. code:: python
# Forest cover change
fcc_tmf_coarsen = xr.open_dataset("out_tmf/fcc_tmf_coarsen.tif",
engine="rasterio").astype("byte")
# Borders
borders_gpkg = os.path.join("out_tmf", "gadm41_PER_0.gpkg")
borders = geopandas.read_file(borders_gpkg)
Expand Down
8 changes: 2 additions & 6 deletions notebooks/large_countries/large_countries.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,8 @@ <h2>Plot the forest cover change map<a class="headerlink" href="#plot-the-forest
<span class="n">label</span><span class="o">=</span><span class="n">labels</span><span class="p">[</span><span class="n">i</span><span class="p">])</span> <span class="k">for</span> <span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">col</span><span class="p">)</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">colors</span><span class="p">)]</span>
</pre></div>
</div>
<p>We load the data: forest cover change, country borders, buffer, and grid.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Forest cover change</span>
<span class="n">fcc_tmf_coarsen</span> <span class="o">=</span> <span class="n">xr</span><span class="o">.</span><span class="n">open_dataset</span><span class="p">(</span><span class="s2">&quot;out_tmf/fcc_tmf_coarsen.tif&quot;</span><span class="p">,</span>
<span class="n">engine</span><span class="o">=</span><span class="s2">&quot;rasterio&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="s2">&quot;byte&quot;</span><span class="p">)</span>

<span class="c1"># Borders</span>
<p>We load the data: country borders, buffer, and grid.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># Borders</span>
<span class="n">borders_gpkg</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="s2">&quot;out_tmf&quot;</span><span class="p">,</span> <span class="s2">&quot;gadm41_PER_0.gpkg&quot;</span><span class="p">)</span>
<span class="n">borders</span> <span class="o">=</span> <span class="n">geopandas</span><span class="o">.</span><span class="n">read_file</span><span class="p">(</span><span class="n">borders_gpkg</span><span class="p">)</span>

Expand Down
Loading

0 comments on commit 6ec6dce

Please sign in to comment.