Icon

06 Switches

06 Switches - Solution
Annotations and comments
  • Exercise: IF Switch Below you see two workflow branches that calculate and visualize the prices by neighborhood and a second category, which is either the room type or number of reviews. Create an IF switch that builds one of these visualizations based on a user selection. 1.1) Separate the workflow branches after the File Reader node with an IF Switch node 1.2) Collect the data from the active branch with the End IF node, and connect it to the top Bar Chart node. You can delete the bottom Bar Chart node. 1.3) Create a Single Selection Configuration node with two selection options: "room type" and "number of reviews" 1.4) Encode the flow variable into "top" if room type was selected, and into "bottom" otherwise. Overwrite the active port setting of the IF Switch node with this flow variable. 1.5) Encapsulate the nodes into a component. Configure the component and open its interactive view. Which neighborhood group is the most expensive for all room types?
  • Read AB_NYC_2019
  • Show average prices
  • category
  • Bin num of reviews into 3 categories
  • Avg price by room type and neighborhood group
  • Avg price by number of reviews and neighborhood group
  • port
  • Select category

Nodes

Extensions

Links