This content is also available at learn.palantir.com ↗ and is presented here for accessibility purposes.
You now have a new path Delayed Route Analysis where we will transition to navigating an analysis that provides us with flight delay information. Our team at our notional aviation company is thrilled with our analysis around routes. However, now they want to better understand the impact of delays on routes. To do this, we will leverage a Pivot Table
board. A Pivot Table
board is similar to a pivot table in Excel, which allows you to transform your active dataset into a table based on aggregations of your choice. Let’s build a Pivot Table
board to look at the overall delays the team wants to see.
Click on the Transform board category in the bar at the bottom of your Contour path and choose Pivot Table
.
In the board configuration on the right, under Rows, search for and then click on route
. This sets the rows of the pivot table to be the names of the different routes. Leave the Columns section blank.
In the Aggregates dropdown, search for and then click on dep_delay
. This will add the departure delay within each route as a column.
ℹ️ Note: Row count
should have been automatically populated as an Aggregate, and you should leave Row count
there during this step.
Next to the grey dep_delay
bar under Aggregates, click on the aggregation type to change it from Sum
to Mean
.
Add arr_delay
the same way you added 'dep_delay' above.
Next to the grey arr_delay
bar under Aggregates, click on the aggregation type to change it from Sum
to Mean
.
Finally, click Compute. The resulting Pivot Table shows you the average delay (arrival and departure) for each route.
Once it's finished computing, click on Switch to pivoted data
at the bottom of the Pivot Table
board. When Switch to pivoted data
is selected, the active dataset switches to what’s shown in the Pivot Table board; any boards you add beneath this board in the Contour path will use the pivoted data rather than the original dataset.
Pivot tables are an incredibly powerful tool within Contour that provides the opportunity to compute multiple aggregations quickly. Read more about the Pivot Table board here.