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_11 [2020/02/14 18:41]
argemiro
lesson_11 [2020/02/14 19:24]
argemiro
Line 53: Line 53:
  
 \\ \\
-{{ :guide_01.png?600 |}}+{{ :aaa3.png?600 |}}
 \\ \\
-  * After including ​the changes, click on Apply changes / Update Submodel Properties as shown in the image below: +  * On the top bar of the Functor integer value, click on the option Export functor inputs and outputs, and, in the new window, double-click the editor icon (pencil) and enter the name "​crop"​. Click Ok:
- \\+
 \\ \\
-  * IMAGEM+{{ :​aaa6.png?​600 |}}
 \\ \\
 +  * After including the changes, click on Apply changes / Update Submodel Properties as shown in the image below and click OK:
 \\ \\
-  ​* Create a new model script, grab a **Load Table Functor** and place it on the sketch. Double click the Load Table Functor and open the IBGE_crop_information_complete.csv file located in ''​Guidebook_Dinamica_5/​Models/​Set_2/​basics/​2_add_table_column_set_table_by_key/​IBGE_crop_information_complete.csv''​. Grab a **Reorder Table Column** and place it on the sketch to switch the order of the year and crop key columns. Connect the Load Table to Reorder Table Column. In the Functor Editor window insert the index of the column to be moved (1) and the new column index (0).+{{ :​aaa10.png?​600 |}} 
 +\\ 
 +Next, click OK, and again OK: 
 +{{ :​aaa5.png?​600 |}} 
 +\\ 
 +  ​* Create a new model script, grab a **Load Table Functor** and place it on the sketch. Double click the Load Table Functor and open the IBGE_crop_information_complete.csv file located in ''​Guidebook_Dinamica_5/​Models/​Set_2/​basics/​2_add_table_column_set_table_by_key/​IBGE_crop_information_complete.csv''​. Grab a **Reorder Table Column** and place it on the sketch to switch the order of the year and crop key columns. Connect the Load Table to Reorder Table Column. In the Functor Editor window insert the index of the column to be moved (1) and the new column index (0) and click OK.
 \\ \\
 \\ \\
Line 68: Line 72:
 \\ \\
 \\ \\
-  * To insert our previously created Submodel, first, click on the Submodels tab and from the library window grab a Calc Most Productive year Submodel and place it on the sketch. ​+  * To insert our previously created Submodel, first, click on the Local Submodels tab and from the library window grab a Calc Most Productive year Submodel and place it on the sketch.  
 +\\ 
 +\\ 
 +  * We want to calculate the most productive year for each crop; thus, we will use this Submodel 3 times, i.e. for the crops 1, 2 and 3. For this, Double click in each submodel loaded and inserts the number that corresponds to each crop choose, as the image bellow
 \\ \\
 +{{ :​aaa7.png?​600 |}}
 \\ \\
-  * We want to calculate the most productive year for each crop; thus, we will use this Submodel 3 times, i.e. for the crops 1, 2 and 3 inserting the number that corresponds to each crop on the Integer value functor, as the imagem bellow. ​To save the results to a file, grab three **Save Table** functors, place them on the sketch and connect to each Submodel (for the three crops). Open **Save Table** Functors, browse to the ''​Guidebook_Dinamica_5/​Models/​Set_2/​basics/​6_submodel''​ and write the file names (e.g. most_productive_year_for_crop_1.csv, ​ most_productive_year_for_crop_2.csv and most_productive_year_for_crop_3.csv).+  * To save the results to a file, grab three **Save Table** functors, place them on the sketch and connect to each Submodel (for the three crops). Open **Save Table** Functors, browse to the ''​Guidebook_Dinamica_5/​Models/​Set_2/​basics/​6_submodel''​ and write the file names (e.g. most_productive_year_for_crop_1.csv, ​ most_productive_year_for_crop_2.csv and most_productive_year_for_crop_3.csv).
 \\ \\
 \\ \\
Line 78: Line 86:
 <​note>​The red box highlights the window in which the crop should be chosen</​note>​ <​note>​The red box highlights the window in which the crop should be chosen</​note>​
 \\ \\
-{{ :guide_04.png?600 |}}+{{ :aaa8.png?700 |}}
 \\ \\
 \\ \\