The Top 10 YouTube Channels in Every Category

2 minute read

Or, how to use context filtering in Tableau to create a dynamic Top N filter based on a dimension

Top Channels - All Categories

TL;DR

Exploring the top and bottom performers of a dataset is a go-to exercise when conducting exploratory data analysis. Setting the Category field as a context filter lets us see the top performers in each category dynamically, instead of limiting us to the top performers of the whole data set. Doing this, we create a dynamic Top 10 Channels worksheet that shows us the top performing channels for any selected category.

YouTube Top Channels - Sorted

As a huge fan of YouTube creative content, Rishav Sharma’s daily YouTube trending video data set is one of my favorite ones to explore. As an aspiring content producer, I often want to know which creators are at the forefront of the platform and why. Understanding who leads their respective genres can give insight for opportunities in entering the space.

Tableau is one of my favorite tools for exploring data and it’s common practice for me to create a Top N filter based on my measure of interest; in this case we will look at total channel views. To make my vertically-stacked leader chart, I drag Views to columns and Channel Title to rows. I then sort from high to low.

Top Channels on YouTube

Next, I drag Channel Title to filter and use the Top tab to set my limit to 10.

Top 10 Channels

Filtering For Top 10 by Category

One way that we can visualize the top channels by category is by applying the Category dimension to color.

Top 10 with Colored Categories

While this gives us some categorical insight for top trending videos, it is limited to only the top 10 channels globally. Furthermore, Tableau has the capability to let us drill down and dynamically view the top 10 channels of each category separately via context filtering.

I will separate the video categories by dragging the Category dimension to rows. Then, I use the dropdown menu and select Show Filter to display the categories on a selection card; this also adds Category to the Filters pane. I use the Category card dropdown menu and select Single Value (list).

To set a categorical context filter, in the Filters pane I click the Category dropdown menu and select Add to Context.

Add to Context

Now, the view will select the top 10 channels for each YouTube category. For instance, when the category Music is selected, we see the top 10 channels in the music category. I format the Views axis and remove Category from Rows as some housekeeping for a better aesthetic.

Top 10 with Filter - Music

And voilá! A dynamic top 10 channels view filtered by category for any trending aficionado’s interactive dashboard.