Creating a Flight Details dashboard

In this exercise, you will create a dashboard to show information about airlines and flight cancellations. You can create this dashboard using the Data Discovery and Visualization application integrated into Cloudera Machine Learning.

  1. In Data, select the SQL tab, then select the airline data connection.
  2. In Database, select airline_ontime_parquet.
  3. In Enter SQL below, enter this SQL statement:
    select * from airline_ontime_parquet.flights
    Enter the table name by clicking flights in the Tables list. The database name is automatically prepended in the SQL statement.
  4. Click Run.
    The SQL statement executes, and the results appear in the Results tab.
  5. Click New Dashboard.
    The Visuals tab opens.
  6. In the Visuals menu, select the Table graphic type.
  7. In the Dimensions menu, select uniquecarrier and drag it to the Dimensions shelf.
  8. In the Measures menu, select Record Count and drag it to the Measures shelf.
  9. In the Dimensions menu, select cancelled and drag it to the Measures shelf.
    It appears as sum(cancelled).
  10. On this sum(cancelled) item, in the Field Properties, click Alias, and rename the item to Cancel Count.
  11. Drag the cancelled item again from the Dimensions menu to the Measures shelf.
  12. For the second item, click the right arrow next to the label, and select Enter/Edit Expression.
    The expression displays in an edit pane.
  13. Change the expression to the following:
    sum([cancelled])/count(1)*100 as "Cancel Percent"
  14. Click Save.
    Note that the name of the item is changed to "Cancel Percent".
  15. Click on Record Count, then Alias, and change the name to Flight Count.
  16. Click on uniquecarrier, then Alias, and change it to Carrier.
  17. Click Refresh Visual.
    The column names in the visual area are updated.
  18. Click and select Clone.
    The table is copied to a new area in the visual designer.
  19. In the new table, click Configure .
  20. In the Visuals menu, select Bars to create a bar chart. The table transforms into a bar chart.
  21. Move items around on the shelves so that they are arranged as shown:
    • X Axis: Carrier
    • Y Axis: Cancel Percent
    • Tooltips: Cancel Count, Flight Count
  22. Click Refresh Visual.
    When you move the pointer onto a bar, tooltips showing data for that bar appear.
  23. Click Cancel Percent, and in Field Properties, click Order and Top K.
  24. Select Descending.
  25. Click Refresh Visual.
    The bars are reordered from largest to smallest.
  26. In the Action menu on the graphic pane, select Edit Dataset SQL. The SQL editor page opens.
  27. Click on the Dataset name field, and rename it to Flight Details. Click Apply, then click Apply again in the modal window that appears.

This completes the Flight Details dashboard.