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
Next revision Both sides next revision
lesson_15 [2019/08/30 12:47]
argemiro
lesson_15 [2019/08/30 23:54]
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 calculate the biomass of the expanded area every year. However, it may be necessary to calculate the biomass of the expanded area each year by category of Legal Amazon Protected Areas.
  
-==== What will you learn? ==== +For this, we will use:  
- +  * The protected areas map in the year 2000 (Guidebook Dinamica_4/​Database/​Protected_areas/​protected_areas_2000.tif) 
-  * Dinamica EGO data structures +  * The Legal Amazon Biomass map (Guidebook Dinamica_4/​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 previously model. However, now, calculate Map produces a map containing the remaining forest for each category every year.**\\ 
 +\\ 
 +Grab the container Repeat from the Control tab and place it on the sketch. Drag the previously model into it. It will automatically resize to envelop Calculate Map. We will 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 on 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. 
 +\\ 
 +\\ 
 +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 iterationit reads the input from the Initial port; thereafter it receives the data from the model step through the port Feedback.  
 +\\ 
 +\\ 
 +<note tip>​TIP:​Note that in addition to the Year and CO2 content columns ​we have the type of Legal Amazon Protected Areas.</​note>​ 
 +\\ 
 +\\ 
 +{{ :​15c.png?​400 |}} 
 +\\ 
 +\\ 
 +Mark the eye button at the top of “Save Table” to viewer the results hereafter.\\ 
 +\\  
 +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 table that looks like this:
 \\ \\
 \\ \\
 +{{ :​15e.png?​400 |}}
 +\\
 +\\
 +The result is returned in a table contains the extracted classes and their corresponding attributes year per year by each category of Legal Amazon Protected Areas.
 +\\
 +\\
 +Congratulations,​ you have successfully completed this module! Now let’s move to the **next module and the next lesson:** [[lesson_16|LESSON 16: Calculating Landscape metrics on Dinamica EGO]]
 +
 +
  
-//Lesson under construction//​