Icon

07 Loops

07 Loops
Exercise: Group LoopSame Exercise but done based on if the person makes more money than the average. Exercise: Counting LoopThe second task it to build a counting loop that forecasts the population in the next five years.2.1) Read the population2019.table file by executing the Table Reader node2.2) Start a counting loop with 5 iterations2.3) Forecast the population in 2020 by adding the value in the Change column to the value in the Population (2019/07/01) columnonce. Forecast the population value in 2021 by adding it two times, and so on. Use the Math Formula node. Append a new columncalled "Forecast".2.4) Rename the Forecast column differently in each iteration: - Add the current iteration value to the year 2020. Use the Math Formula (Variable) node.- Use this flow variable to create a title, for example, "Forecasted population in 2020". Use the String Manipulation (Variable) node.- Use this flow variable to rename the "Forecast" column2.5) Exclude all other columns2.6) Close the loop by joining the columns from the different iterations. What is the forecasted population in Chile in 2024? Node 5Time Use Node 27Node 28Time Use by education and weekly EarningsNode 33Node 34Node 35Node 36Node 37Node 38Node 39Node 40 Table Rowto Variable CSV Reader Group Loop Start Counting Loop Start CSV Reader GroupBy Rule Engine Loop End Math Formula(Variable) String Manipulation(Variable) Column Rename Math Formula Column Filter Loop End (ColumnAppend) Exercise: Group LoopSame Exercise but done based on if the person makes more money than the average. Exercise: Counting LoopThe second task it to build a counting loop that forecasts the population in the next five years.2.1) Read the population2019.table file by executing the Table Reader node2.2) Start a counting loop with 5 iterations2.3) Forecast the population in 2020 by adding the value in the Change column to the value in the Population (2019/07/01) columnonce. Forecast the population value in 2021 by adding it two times, and so on. Use the Math Formula node. Append a new columncalled "Forecast".2.4) Rename the Forecast column differently in each iteration: - Add the current iteration value to the year 2020. Use the Math Formula (Variable) node.- Use this flow variable to create a title, for example, "Forecasted population in 2020". Use the String Manipulation (Variable) node.- Use this flow variable to rename the "Forecast" column2.5) Exclude all other columns2.6) Close the loop by joining the columns from the different iterations. What is the forecasted population in Chile in 2024? Node 5Time Use Node 27Node 28Time Use by education and weekly EarningsNode 33Node 34Node 35Node 36Node 37Node 38Node 39Node 40 Table Rowto Variable CSV Reader Group Loop Start Counting Loop Start CSV Reader GroupBy Rule Engine Loop End Math Formula(Variable) String Manipulation(Variable) Column Rename Math Formula Column Filter Loop End (ColumnAppend)

Nodes

Extensions

Links