From 3fe1d399fcd4ed6f05d775e96ec2f7af984d7e68 Mon Sep 17 00:00:00 2001
From: tkerr1 <theodoremkerr@gmail.com>
Date: Sun, 6 Feb 2022 16:10:56 +0000
Subject: [PATCH] Corrected a typo causing an error in creating the forest
 cover raster

---
 .../forest_biomass_summary_DRC_output.ipynb   | 321 +++++++-----------
 1 file changed, 117 insertions(+), 204 deletions(-)

diff --git a/country_outputs/forest_biomass_summary_DRC_output.ipynb b/country_outputs/forest_biomass_summary_DRC_output.ipynb
index b8f0473..9cc0f5e 100644
--- a/country_outputs/forest_biomass_summary_DRC_output.ipynb
+++ b/country_outputs/forest_biomass_summary_DRC_output.ipynb
@@ -2,7 +2,7 @@
  "cells": [
   {
    "cell_type": "markdown",
-   "id": "worst-franklin",
+   "id": "dress-sharing",
    "metadata": {},
    "source": [
     "# ESA Biomass Climate Change Initiative global forest aboveground biomass dataset v2.0 2010, 2017, 2018\n",
@@ -18,7 +18,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "velvet-candidate",
+   "id": "exceptional-premium",
    "metadata": {},
    "source": [
     "#### Install these R packages first, and load them into the R session. Source R script with support functions."
@@ -27,7 +27,7 @@
   {
    "cell_type": "code",
    "execution_count": 1,
-   "id": "italic-yorkshire",
+   "id": "greenhouse-solid",
    "metadata": {},
    "outputs": [
     {
@@ -114,7 +114,7 @@
       "\n",
       "Attaching package ff\n",
       "\n",
-      "- getOption(\"fftempdir\")==\"/tmp/RtmpL4tTUU/ff\"\n",
+      "- getOption(\"fftempdir\")==\"/tmp/RtmpWv3cYE/ff\"\n",
       "\n",
       "\n",
       "- getOption(\"ffextension\")==\"ff\"\n",
@@ -201,7 +201,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "municipal-laundry",
+   "id": "armed-image",
    "metadata": {},
    "source": [
     "#### Set the path to the CCI, JPL, and NCEO Biomass data folders & read in world countries shapefile"
@@ -210,7 +210,7 @@
   {
    "cell_type": "code",
    "execution_count": 2,
-   "id": "muslim-domestic",
+   "id": "owned-fashion",
    "metadata": {},
    "outputs": [
     {
@@ -244,7 +244,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "interested-candle",
+   "id": "under-welsh",
    "metadata": {},
    "source": [
     "#### Generate 10x10 degree WGS84 grid that the CCI Biomass and Hansen Forest Cover products are tiled on"
@@ -253,7 +253,7 @@
   {
    "cell_type": "code",
    "execution_count": 3,
-   "id": "promising-buyer",
+   "id": "greek-video",
    "metadata": {},
    "outputs": [
     {
@@ -275,7 +275,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "altered-twenty",
+   "id": "comparative-relationship",
    "metadata": {},
    "source": [
     "#### Print out country names in Africa to select from"
@@ -284,7 +284,7 @@
   {
    "cell_type": "code",
    "execution_count": 4,
-   "id": "proper-messenger",
+   "id": "played-lithuania",
    "metadata": {},
    "outputs": [
     {
@@ -592,7 +592,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "satisfied-breakfast",
+   "id": "artistic-sterling",
    "metadata": {},
    "source": [
     "#### Select a country in Africa to plot with corresponding data tiles"
@@ -601,7 +601,7 @@
   {
    "cell_type": "code",
    "execution_count": 5,
-   "id": "bigger-shadow",
+   "id": "renewable-wheat",
    "metadata": {},
    "outputs": [
     {
@@ -661,7 +661,7 @@
   {
    "cell_type": "code",
    "execution_count": 6,
-   "id": "fabulous-clark",
+   "id": "hired-bankruptcy",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -671,7 +671,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "opening-jenny",
+   "id": "fitted-vehicle",
    "metadata": {},
    "source": [
     "#### Read in the CCI Biomass data for this AOI from the downloaded CCI Biomass tiles, mosaicing multiple tiles as necessary"
@@ -680,7 +680,7 @@
   {
    "cell_type": "code",
    "execution_count": 7,
-   "id": "talented-university",
+   "id": "bibliographic-windsor",
    "metadata": {},
    "outputs": [
     {
@@ -691,7 +691,7 @@
        "resolution : 0.0008888889, 0.0008888889  (x, y)\n",
        "extent     : 12.21067, 31.28089, -13.45867, 5.375111  (xmin, xmax, ymin, ymax)\n",
        "crs        : +proj=longlat +datum=WGS84 +no_defs \n",
-       "source     : r_tmp_2021-12-15_192017_795_49394.tif \n",
+       "source     : r_tmp_2022-02-06_151734_2045_87112.tif \n",
        "names      : agbd_2020, agbd_sd_2020 \n",
        "min values :         0,            0 \n",
        "max values :       552,         1068 \n"
@@ -708,7 +708,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "satellite-discharge",
+   "id": "impaired-williams",
    "metadata": {},
    "source": [
     "#### Plot the CCI AGBD for 2020"
@@ -717,7 +717,7 @@
   {
    "cell_type": "code",
    "execution_count": 8,
-   "id": "silent-currency",
+   "id": "polish-skiing",
    "metadata": {},
    "outputs": [
     {
@@ -742,7 +742,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "comprehensive-letters",
+   "id": "aware-memorabilia",
    "metadata": {},
    "source": [
     "#### Read in the NCEO Biomass data for this AOI from the downloaded data. NCEO data is stored as a single file for the continent of Africa, rather than multiple tiles."
@@ -751,7 +751,7 @@
   {
    "cell_type": "code",
    "execution_count": 9,
-   "id": "indian-cruise",
+   "id": "honest-leadership",
    "metadata": {},
    "outputs": [
     {
@@ -769,7 +769,7 @@
        "resolution : 0.0008983153, 0.0008983153  (x, y)\n",
        "extent     : 12.2108, 31.28024, -13.45856, 5.375519  (xmin, xmax, ymin, ymax)\n",
        "crs        : +proj=longlat +datum=WGS84 +no_defs \n",
-       "source     : r_tmp_2021-12-15_192510_795_90692.grd \n",
+       "source     : r_tmp_2022-02-06_152248_2045_20968.grd \n",
        "names      : agbd_2017 \n",
        "min values :         0 \n",
        "max values :       730 \n"
@@ -804,7 +804,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "statewide-there",
+   "id": "ruled-dairy",
    "metadata": {},
    "source": [
     "#### Plot the NCEO AGBD for 2017"
@@ -813,7 +813,7 @@
   {
    "cell_type": "code",
    "execution_count": 10,
-   "id": "contemporary-penguin",
+   "id": "acute-pearl",
    "metadata": {},
    "outputs": [
     {
@@ -839,7 +839,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "stylish-butler",
+   "id": "concerned-berkeley",
    "metadata": {},
    "source": [
     "#### Read in the JPL Biomass data for this AOI"
@@ -848,7 +848,7 @@
   {
    "cell_type": "code",
    "execution_count": 11,
-   "id": "generous-package",
+   "id": "fuzzy-utility",
    "metadata": {},
    "outputs": [
     {
@@ -866,7 +866,7 @@
        "resolution : 0.0008983153, 0.0008983153  (x, y)\n",
        "extent     : 12.2108, 31.28024, -13.45856, 5.375519  (xmin, xmax, ymin, ymax)\n",
        "crs        : +proj=longlat +datum=WGS84 +no_defs \n",
-       "source     : r_tmp_2021-12-15_192606_795_09167.grd \n",
+       "source     : r_tmp_2022-02-06_152346_2045_23923.grd \n",
        "names      : agbd_2020 \n",
        "min values :         0 \n",
        "max values :     24186 \n"
@@ -907,7 +907,7 @@
   {
    "cell_type": "code",
    "execution_count": 12,
-   "id": "annoying-journal",
+   "id": "executive-prisoner",
    "metadata": {},
    "outputs": [
     {
@@ -918,7 +918,7 @@
        "resolution : 0.0008983153, 0.0008983153  (x, y)\n",
        "extent     : 12.2108, 31.28024, -13.45856, 5.375519  (xmin, xmax, ymin, ymax)\n",
        "crs        : +proj=longlat +datum=WGS84 +no_defs \n",
-       "source     : r_tmp_2021-12-15_193041_795_70841.grd \n",
+       "source     : r_tmp_2022-02-06_152824_2045_90329.grd \n",
        "names      : agbd_2020 \n",
        "values     : 0, 1997.5  (min, max)\n"
       ]
@@ -938,7 +938,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "premium-revision",
+   "id": "transparent-rental",
    "metadata": {},
    "source": [
     "#### Plot the JPL AGBD for 2020"
@@ -947,7 +947,7 @@
   {
    "cell_type": "code",
    "execution_count": 13,
-   "id": "nearby-blair",
+   "id": "manual-conducting",
    "metadata": {},
    "outputs": [
     {
@@ -972,7 +972,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "documented-final",
+   "id": "special-hello",
    "metadata": {},
    "source": [
     "#### Read in forest cover raster. Currently using 30% forest cover from Hansen product. The cover rasters have been resampled to the resolutions of CCI Biomass, JPL Biomass, and NCEO Biomass for use as a forest cover mask."
@@ -981,7 +981,7 @@
   {
    "cell_type": "code",
    "execution_count": 14,
-   "id": "pleased-investing",
+   "id": "maritime-assessment",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -992,7 +992,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "stretch-cruise",
+   "id": "narrative-proof",
    "metadata": {},
    "source": [
     "#### Create 10% cover forest threshold mask for CCI, JPL, and NCEO (or set desired % below)"
@@ -1000,15 +1000,15 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 18,
-   "id": "incomplete-array",
+   "execution_count": 15,
+   "id": "electoral-relevance",
    "metadata": {},
    "outputs": [],
    "source": [
     "recode_gfc2020 <- function(treecover2020) {\n",
     "    forest_threshold <- 10\n",
     "    forest2020 <- treecover2020 > forest_threshold\n",
-    "    thresholded <- matreix(c(forest2020),\n",
+    "    thresholded <- matrix(c(forest2020),\n",
     "                          nrow=length(forest2020),\n",
     "                          ncol=1)\n",
     "    return(thresholded)\n",
@@ -1017,7 +1017,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "reflected-lucas",
+   "id": "negative-tennessee",
    "metadata": {},
    "source": [
     "#### Create cover forest threshold mask for CCI"
@@ -1025,28 +1025,19 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 17,
-   "id": "dense-mathematics",
+   "execution_count": 16,
+   "id": "medical-pulse",
    "metadata": {},
    "outputs": [
     {
-     "ename": "ERROR",
-     "evalue": "Error in clusterR(gfc_cci, overlay, arg = list(fun = recode_gfc2020)): cluster error\n",
-     "output_type": "error",
-     "traceback": [
-      "Error in clusterR(gfc_cci, overlay, arg = list(fun = recode_gfc2020)): cluster error\nTraceback:\n",
-      "1. system.time({\n .     beginCluster(n = 5)\n .     gfc_cci_thresholded <- clusterR(gfc_cci, overlay, arg = list(fun = recode_gfc2020))\n .     endCluster()\n . })",
-      "2. clusterR(gfc_cci, overlay, arg = list(fun = recode_gfc2020))   # at line 3 of file <text>",
-      "3. stop(\"cluster error\")"
-     ]
-    },
-    {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "Timing stopped at: 0.358 0.787 5.279\n",
-      "\n"
-     ]
+     "data": {
+      "text/plain": [
+       "   user  system elapsed \n",
+       " 14.062   9.309 638.868 "
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
     }
    ],
    "source": [
@@ -1059,7 +1050,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "valued-electron",
+   "id": "exceptional-accident",
    "metadata": {},
    "source": [
     "#### Create cover forest threshold mask for JPL"
@@ -1067,10 +1058,21 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
-   "id": "agricultural-designation",
+   "execution_count": 17,
+   "id": "adaptive-company",
    "metadata": {},
-   "outputs": [],
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "   user  system elapsed \n",
+       " 13.314   8.518 605.357 "
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
    "source": [
     "system.time({\n",
     "beginCluster(n=5)\n",
@@ -1081,7 +1083,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "aware-jewelry",
+   "id": "parliamentary-gospel",
    "metadata": {},
    "source": [
     "#### Create cover forest threshold mask for NCEO"
@@ -1089,10 +1091,21 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
-   "id": "happy-stretch",
+   "execution_count": 18,
+   "id": "hidden-friday",
    "metadata": {},
-   "outputs": [],
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "   user  system elapsed \n",
+       " 13.297   6.573 605.319 "
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
    "source": [
     "system.time({\n",
     "beginCluster(n=5)\n",
@@ -1103,8 +1116,8 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
-   "id": "reliable-lightning",
+   "execution_count": 19,
+   "id": "respiratory-hands",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1115,7 +1128,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "traditional-peter",
+   "id": "meaningful-benjamin",
    "metadata": {},
    "source": [
     "### Checkpoint: Write out and read in Forest cover threshold mask for CCI and JPL"
@@ -1124,7 +1137,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "designing-ladder",
+   "id": "small-interaction",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1143,7 +1156,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "willing-organ",
+   "id": "unsigned-presentation",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1165,7 +1178,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "certain-tulsa",
+   "id": "aging-faculty",
    "metadata": {},
    "source": [
     "#### Apply the forest cover threshold mask to CCI, JPL, and NCEO"
@@ -1174,7 +1187,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "adapted-packet",
+   "id": "relevant-casting",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1185,7 +1198,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "clinical-grounds",
+   "id": "seventh-spelling",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1197,7 +1210,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "designing-passage",
+   "id": "plain-cotton",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1208,7 +1221,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "straight-region",
+   "id": "finite-brazil",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1220,7 +1233,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "tutorial-shift",
+   "id": "owned-grill",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1231,7 +1244,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "recorded-terry",
+   "id": "indonesian-depression",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1242,7 +1255,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "viral-personality",
+   "id": "convenient-schema",
    "metadata": {},
    "source": [
     "### Checkpoint: Write out and read in Forest only biomass for CCI, JPL, and NCEO"
@@ -1251,7 +1264,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "traditional-editor",
+   "id": "amazing-salad",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1270,7 +1283,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "cosmetic-alfred",
+   "id": "spread-strain",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1292,7 +1305,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "hollow-interface",
+   "id": "removed-scope",
    "metadata": {},
    "source": [
     "#### Mask to country shape"
@@ -1301,7 +1314,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "ceramic-hearts",
+   "id": "pursuant-worth",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1311,7 +1324,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "finnish-singing",
+   "id": "czech-maine",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1321,7 +1334,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "changing-torture",
+   "id": "primary-surface",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1331,7 +1344,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "ordinary-karaoke",
+   "id": "raising-cuisine",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1342,7 +1355,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "elect-waters",
+   "id": "fewer-linux",
    "metadata": {},
    "source": [
     "#### Plot forest biomass map and histogram of biomass density for CCI, JPL, and NCEO"
@@ -1351,7 +1364,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "downtown-fiction",
+   "id": "useful-humanity",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1383,7 +1396,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "processed-messaging",
+   "id": "polyphonic-performer",
    "metadata": {},
    "source": [
     "#### Calculate total aboveground biomass and average aboveground biomass density for 2020 CCI and JPL biomass for the selected country"
@@ -1392,7 +1405,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "treated-basics",
+   "id": "public-present",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1403,7 +1416,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "automatic-gamma",
+   "id": "electrical-diamond",
    "metadata": {},
    "source": [
     "#### Print out basic forest aboveground biomass statistics for the selected country\n"
@@ -1412,7 +1425,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "stunning-rebate",
+   "id": "beneficial-instruction",
    "metadata": {},
    "outputs": [],
    "source": [
@@ -1436,7 +1449,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "extraordinary-smile",
+   "id": "advised-shower",
    "metadata": {},
    "source": [
     "## The following is old code I'm keeping here for reference purposes"
@@ -1444,7 +1457,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "intensive-attraction",
+   "id": "exclusive-lounge",
    "metadata": {},
    "source": [
     "#### Calculate total aboveground biomass and average aboveground biomass density for 2020 CCI and NCEO biomass for the selected country"
@@ -1452,78 +1465,10 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 23,
-   "id": "professional-stability",
-   "metadata": {
-    "collapsed": true,
-    "jupyter": {
-     "outputs_hidden": true
-    }
-   },
-   "outputs": [
-    {
-     "name": "stderr",
-     "output_type": "stream",
-     "text": [
-      "Warning message in showSRID(uprojargs, format = \"WKT2\", multiline = \"YES\", prefer_proj = prefer_proj):\n",
-      "“Discarded datum WGS_1984 in Proj4 definition”\n",
-      "Warning message in showSRID(uprojargs, format = \"WKT2\", multiline = \"YES\", prefer_proj = prefer_proj):\n",
-      "“Discarded datum WGS_1984 in Proj4 definition”\n",
-      "Data appears to be in latitude/longitude. Calculating cell areas on a sphere.\n",
-      "\n",
-      "Warning message in showSRID(uprojargs, format = \"WKT2\", multiline = \"YES\", prefer_proj = prefer_proj):\n",
-      "“Discarded datum WGS_1984 in Proj4 definition”\n",
-      "Warning message in showSRID(uprojargs, format = \"WKT2\", multiline = \"YES\", prefer_proj = prefer_proj):\n",
-      "“Discarded datum WGS_1984 in Proj4 definition”\n",
-      "Data appears to be in latitude/longitude. Calculating cell areas on a sphere.\n",
-      "\n"
-     ]
-    },
-    {
-     "data": {
-      "text/html": [
-       "<table class=\"dataframe\">\n",
-       "<caption>A data.frame: 2 × 8</caption>\n",
-       "<thead>\n",
-       "\t<tr><th scope=col>year</th><th scope=col>aoi</th><th scope=col>agb_CCI</th><th scope=col>agbd_CCI</th><th scope=col>agbd_sd_CCI</th><th scope=col>agb_NCEO</th><th scope=col>agbd_NCEO</th><th scope=col>agbd_sd_NCEO</th></tr>\n",
-       "\t<tr><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;chr&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th><th scope=col>&lt;dbl&gt;</th></tr>\n",
-       "</thead>\n",
-       "<tbody>\n",
-       "\t<tr><td>2020</td><td>AOI 1</td><td>15721489565</td><td>116.8332</td><td>99.37238</td><td>        NA</td><td>      NA</td><td>      NA</td></tr>\n",
-       "\t<tr><td>2017</td><td>AOI 1</td><td>         NA</td><td>      NA</td><td>      NA</td><td>8378359251</td><td>77.45101</td><td>71.80152</td></tr>\n",
-       "</tbody>\n",
-       "</table>\n"
-      ],
-      "text/latex": [
-       "A data.frame: 2 × 8\n",
-       "\\begin{tabular}{llllllll}\n",
-       " year & aoi & agb\\_CCI & agbd\\_CCI & agbd\\_sd\\_CCI & agb\\_NCEO & agbd\\_NCEO & agbd\\_sd\\_NCEO\\\\\n",
-       " <dbl> & <chr> & <dbl> & <dbl> & <dbl> & <dbl> & <dbl> & <dbl>\\\\\n",
-       "\\hline\n",
-       "\t 2020 & AOI 1 & 15721489565 & 116.8332 & 99.37238 &         NA &       NA &       NA\\\\\n",
-       "\t 2017 & AOI 1 &          NA &       NA &       NA & 8378359251 & 77.45101 & 71.80152\\\\\n",
-       "\\end{tabular}\n"
-      ],
-      "text/markdown": [
-       "\n",
-       "A data.frame: 2 × 8\n",
-       "\n",
-       "| year &lt;dbl&gt; | aoi &lt;chr&gt; | agb_CCI &lt;dbl&gt; | agbd_CCI &lt;dbl&gt; | agbd_sd_CCI &lt;dbl&gt; | agb_NCEO &lt;dbl&gt; | agbd_NCEO &lt;dbl&gt; | agbd_sd_NCEO &lt;dbl&gt; |\n",
-       "|---|---|---|---|---|---|---|---|\n",
-       "| 2020 | AOI 1 | 15721489565 | 116.8332 | 99.37238 |         NA |       NA |       NA |\n",
-       "| 2017 | AOI 1 |          NA |       NA |       NA | 8378359251 | 77.45101 | 71.80152 |\n",
-       "\n"
-      ],
-      "text/plain": [
-       "  year aoi   agb_CCI     agbd_CCI agbd_sd_CCI agb_NCEO   agbd_NCEO agbd_sd_NCEO\n",
-       "1 2020 AOI 1 15721489565 116.8332 99.37238            NA       NA        NA    \n",
-       "2 2017 AOI 1          NA       NA       NA    8378359251 77.45101  71.80152    "
-      ]
-     },
-     "metadata": {},
-     "output_type": "display_data"
-    }
-   ],
+   "execution_count": null,
+   "id": "quick-moldova",
+   "metadata": {},
+   "outputs": [],
    "source": [
     "# agb_summary <- function(agb_raster, data_name, aoi, scale_factor, year){\n",
     "\n",
@@ -1665,7 +1610,7 @@
   },
   {
    "cell_type": "markdown",
-   "id": "european-infrastructure",
+   "id": "driving-zoning",
    "metadata": {},
    "source": [
     "#### Print out basic forest aboveground biomass statistics for the selected country\n",
@@ -1674,29 +1619,10 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 24,
-   "id": "vocational-tolerance",
+   "execution_count": null,
+   "id": "informative-savannah",
    "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "CRS arguments: +proj=longlat +datum=WGS84 +no_defs "
-      ]
-     },
-     "metadata": {},
-     "output_type": "display_data"
-    },
-    {
-     "data": {
-      "text/plain": [
-       "CRS arguments: +proj=longlat +datum=WGS84 +no_defs "
-      ]
-     },
-     "metadata": {},
-     "output_type": "display_data"
-    }
-   ],
+   "outputs": [],
    "source": [
     "# crs(cci)\n",
     "# crs(nceo)"
@@ -1704,23 +1630,10 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 26,
-   "id": "detected-launch",
+   "execution_count": null,
+   "id": "considerable-covering",
    "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "[1] \"Country name: Democratic Republic of the Congo\"\n",
-      "[1] \"Country area: 2325240.42 km2\"\n",
-      "[1] \"Total biomass estimate CCI 2020: 15.72 Pg\"\n",
-      "[1] \"Total biomass estimate NCEO 2017: 8.38 Pg\"\n",
-      "[1] \"Mean biomass density estimate CCI 2020: 116.83 Mg/ha\"\n",
-      "[1] \"Mean biomass density estimate NCEO 2017: 77.45 Mg/ha\"\n"
-     ]
-    }
-   ],
+   "outputs": [],
    "source": [
     "# for(i in 1:nrow(aoi@data)){\n",
     "\n",
@@ -1752,7 +1665,7 @@
   {
    "cell_type": "code",
    "execution_count": null,
-   "id": "divine-institute",
+   "id": "considerable-anchor",
    "metadata": {},
    "outputs": [],
    "source": []
-- 
GitLab