- to import a FoodChain-Lab template.
- to display and configure the delivery network.
- to visualize the backward and forward trace for a station.
- Select Food-Lab and Open DB Gui… in the menu bar to open the database interface.
- If you get a message saying the internal database has been created, click OK. If not, the database has obviously been created before.
- Download the example file from “FCL_Examples.xlsx”.
- In the database interface click the Table import button in the upper left corner.
- Now, a file dialog will pop up. FoodChain-Lab data templates (*.xlsx files) can be selected here.
- Navigate to the folder with the file “FCL_Examples.xlsx” which you have downloaded. Select the file in the dialog and press Open.
- If errors or warnings occurred during the import process you would see a dialog after the import is finished.
- As no errors ocurred, there is no such dialog and you can click OK.
- In the database interface, you can now have a look at the data you have imported.
- Close the dialog.
- Now we want to create a workflow, that uses the imported data.
- Right click on LOCAL in the KNIME Explorer and select New KNIME Workflow…
- In the dialog you need to give the workflow a name. How about “MyFirstWorkflow”?
- Click Finish.
- The created empty workflow will be shown in the editor in the center. Here you can add nodes to build your workflow.
- Now we need FoodChain-Lab nodes. You can find them in the Node Repository on the left. Click on the small arrow on the left of “FoodChain-Lab” to show all FoodChain-Lab nodes.
- Drag the Supply Chain Reader from the Node Repository into your empty workflow.
- We do not need to configure the Supply Chain Reader.
- Right click on it and select Execute.
- The Supply Chain Reader has now read all data from the internal database.
- Select the Supply Chain Reader in the workflow (so that a rectangle is drawn around it), then double click on the Tracing View node in the Node Repository.
- The Tracing View node should show up in the workflow and its three input ports should be automatically connected to the Supply Chain Reader. This is the fastes way to attach one node to another.
- Another option would be to drag the Tracing View node from the Node Repository into the editor. Then left click on the upper output port of the Supply Chain Reader (black arrow), keep pressing the left mouse button and drag a line to the first input port of the Tracing View (black arrow directing at the blue Tracing View). Repeat for the second and third connection.
- Double click on the Tracing View node to configure it.
- You can see a network of stations (circles) and deliveries (arrows).
- In this network of a fictitious foodborne disease outbeak a contaminated product could be found in three supermarkets. We want to mark them as outbreak stations.
- To do so, right click somewhere into the empty space and choose Set Selected Stations.
- In this dialog you can specify which stations should be selected.
- Press the button in the red circle to set the Property.
- Select “type of business”.
- Typical types of business are “primary producer”, “supplier” and “manufacturer”, for example.
- We only want to select supermarkets, since this is where contaminated products were found.
- Set Value to “Supermarket” and press OK. You can either click the small dropdown button on the right of the value field and select an entry or you type “Supermarket” into the white value field.
- Click OK.
- Now, three stations are selected (blue circles).
- Right click somewhere into the empty space and choose Station Selection and Show Properties.
Note: If you accidentally click with the left mouse button, you deselect all selected stations. Please go one step back to select the three supermarkets again.
- A window pops up and you see the properties of the three selected supermarkets.
- Click Set All Weight.
- By setting the weight to “1” you mark all supermarkets as outbreak stations. Here, “1” is already selected and you simply need to click OK.
- All three supermarkets have a weight of “1” now.
- Another way to set the weight would be to click directly into one of the cells of the weight column and to type in the weight for each station individually.
- Click OK.
- Left click into the white network area to deselect highlighted stations (and deliveries) and you will see… nothing new.
- To get the image you see above, open the context menu (right click) and click Set default Highlighting.
- Tick the box below Show Legend to display the legend. Here it is shown what the colours and symbols in the graph mean.
- So, the outbreak stations are red and the common link is yellow. The common link is a station which is connected (via identical ingredient lots or products thereof) with two or more outbreak stations in the same food chain.
- To arrange the network in a better way right click in the graph and select Apply Layout and choose a layout, for example Fruchterman-Reingold.
- This layout process is not deterministic. That means you will get a different result each time.
- You can apply the layout again, if you are not satisfied with the current result.
- You can also apply a layout for certain stations only: Therefore you have to select the stations you want to be layouted and apply the layout again.
- You can activate Join Deliveries to simplify the graph. Deliveries with the same supplier and recipient are joined now.
- This option is especially useful in networks with many deliveries.
- Double click on the station marked as “common link”.
- The dialog shown above will pop up, showing all attributes of the station.
- Select Observed and click OK.
- All stations / deliveries of the forward trace are orange-colored and the ones of the backward trace are shown in purple.
- We will go into detail on this in the tutorial “Tracing”.