Icon

06 Switches

06 Switches
Annotations and comments
  • Exercise: Switches The workflow below accesses life expectancy data for countries and regions. The bar chart shows the average life expectancy values by regions, and the choropleth world map shows the life expectancy values by countries. Your task is to build an IF switch that controls which of the two visualizations is shown. 1.1) Create a Single Selection Configuration node with two options: "Regions" and "Countries" 1.2) Encode the flow variable values Regions and Countries into "top" and "bottom", respectively, with the Rule Engine Variable node 1.3) Use an IF switch to separate the two workflow branches. Control the active port by the flow variable with the possible values top and bottom. 1.4) Encapsulate the nodes into a component. Select Countries or Regions in the component's configuration dialog. Execute and open the component's view. Do you see the right graph?
  • 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
  • Read LifeExpectancy.table

Nodes

Extensions

Links