Icon

LAB 2 Part 3

Annotations and comments
  • Task 1: Build a Group Loop Your task is to build a group loop that compares the life expectancy in each country to the average value on the continent where it's located. 1. Read the JoinedCountryTable.table file by executing the top Table Reader node. This table contains information about the demographics, geolocation, and travel risks in the different countries/territories in 2020. 2. Start a group loop that handles each continent in a separate iteration 3. Build the loop body: - Calculate the average overall life expectancy on the continent - Transform the value into a flow variable - Assign each country the value "below" if their overall life expectancy is below the average and the value "above" otherwise. Use the Rule Engine node and append a new column. 4. Close the loop by concatenating the rows from the different iterations
  • Task 3: Execute an IF Switch The provided workflow visualizes life expectancy values by regions in a bar chart and by countries in a choropleth world map. Your task is to build an IF switch that displays one of these alternative views. 1. Create a Single Selection Configuration node with two options: "Regions" and "Countries" 2. Encode the output of the configuration node into "top" and "bottom". Use the Rule Engine Variable node. 3. Use a switch node to separate the two workflow branches. Control the active port by the flow variable that you created in the previous step. 4. Encapsulate the nodes into a component
  • Task 2: Build a Counting Loop Your task it to build a counting loop that forecasts the population in the next five years. 1. Execute the provided workflow 2. Start a counting loop with 5 iterations on the top output of the Column Splitter node 3. Forecast the population in 2020 by adding the value in the Change column to the value in the Population (2019/07/01) column once in the first iteration. Forecast the population value in 2021 by adding it two times in the second iteration, and so on. Use the Math Formula node and append a new column called "Forecast". 4. Name the Forecast according to the year: - Add the value of the currentIteration flow variable to 2020. Use the Math Formula (Variable) node. - Create a column name which contains the value of this flow variable, for example: "Forecasted population in 2020". Use the String Manipulation (Variable) node. - Rename the Forecast column 5. Exclude all other columns but the newly renamed forecast column 6. Close the loop by joining the columns from the different iterations 7. Join the country names from the bottom output of the Column Splitter node to the loop output
  • Only forecasted values
  • Rename column with forecasted values
  • country names at bottom
  • Life expectancy by regions
  • Geo Chart expects the first column to be the country and the second to be the value
  • Select country column
  • Select numeric column
  • Google Charts - Geo Chart
  • Filter out countries
  • Regions: top Countries: bottom
  • Select countries or regions
  • 5 iterations
  • One iteration per continent
  • avg life expectancy by continent
  • inner join on rowID
  • concatenate the results
  • Add change to current population
  • 2020 + current iteration
  • below or above the continent average
  • Column header

Nodes

Extensions

Links