Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lesson_15 [2019/08/30 12:47]
argemiro
lesson_15 [2020/02/18 00:27] (current)
argemiro
Line 1: Line 1:
-{{ :logo_guidebook1.jpg?400 |}}+{{ :logo_logo.png?400 |}}
 \\ \\
 =====LESSON 15: Using "​while"​ to make successive calculations=====  ​ =====LESSON 15: Using "​while"​ to make successive calculations=====  ​
 \\ \\
 \\ \\
 +In the previous exercise we calculated the biomass of the new protected areas (PA) per year of designation. Here we will calculate the biomass of per PA per each year of designation and category, i.e. strictly protected and sustainable use conservation units and indigenous reserves.
  
-==== What will you learn? ==== +For this, we will use:  
- +  * The protected areas map in the year 2000 (''​Guidebook_Dinamica_5/​Database/​Protected_areas/​protected_areas_2000.tif''​) 
-  * Dinamica EGO data structures +  * The Legal Amazon Biomass map (''​Guidebook_Dinamica_5/​Database/​biomass/​biomass.tif''​)
-  * Dinamica EGO file formats +
- +
-The intent of this exercise is:+
 \\ \\
 \\ \\
-For this, we will use+**This exercise is very similar to the previous model. But now Calculate Map produces a map containing the remaining forest for each category and every year.**\\ 
 +\\ 
 +Grab the container Repeat from the Control tab and place it on the sketch. Drag the previous model into it. It will automatically resize to envelop Calculate Map. We extract the attributes and statistics by category using an Extract Categorical Map Attributes. This functor calculates basic statistics from a map for each area delimited by a class. Also grab the functors Get table from key and Lookup table and place it within the Repeat. 
 +\\ 
 +\\ 
 +{{ :​15a.png?​700 |}} 
 +\\ 
 +\\ 
 +The functor Lookup Table is a structure used as a link to other functors, transforming a table into a lookup table if the table has only two columns, one for numeric keys and another for values. 
 +\\ 
 +\\ 
 +The functor Get Table From Key retrieves the sub-table corresponding to the given chain of keys (In this case: “12”) from a given input table. 
 +\\ 
 +\\ 
 +{{ :​15b.png?​400 |}} 
 +\\ 
 +\\ 
 +Click on the Mux Table with the Edit Functor Ports. Every Mux functor has two input ports. In the first iterationthe model reads the input from the Initial port; thereafter from the port Feedback.  
 +\\ 
 +\\ 
 +<note tip>​TIP:​Note that in addition to the Year and CO2 content columns ​we have the category of Protected Areas.</​note>​ 
 +\\ 
 +\\ 
 +{{ :​15c.png?​400 |}} 
 +\\ 
 +\\ 
 +Mark the eye button at the top of “Save Table” to view the results after model run.\\ 
 +\\  
 +Click on the layout tool Left to Right and your final model will look like the one below:  
 +\\ 
 +\\ 
 +{{ :15d.png?​1000 |}} 
 +\\ 
 +\\ 
 +**Save and run the model!**\\ 
 +\\
  
 +Now, click on eye button of “Save Lookup Table” to see the result. This functor output is a table that looks like this:
 \\ \\
 \\ \\
 +{{ :​15e.png?​400 |}}
 +\\
 +\\
 +The result is returned in a table that contains the extracted classes and their corresponding attributes per year and category.
 +\\
 +\\
 +===Congratulations,​ you have successfully completed this lesson!===
 +\\
 +☞[[lesson_16|Next Lesson]]
 +\\
 +☞[[:​guidebook_start| Back to Guidebook Start]]
 +
 +
  
-//Lesson under construction//​