The Corona Collaboration

Since the Covid-19 pandemic started, researchers from all over the world are searching for answers. These scientific results related to the Covid-19 virus are also communicated by several (social) media platforms. At Leiden University, CWTS wanted to create a flexible tool for monitoring how research around the pandemic is being disseminated and discussed on social media.

Together with our customer CWTS I have created the CWTS Covid-19 social media dashboard. This dashboard provides an easy-to-use visual and flexible tool to explore the online media reception of scientific publications related to the COVID-19 pandemic. In this blog I will show the dashboard and the solutions we used to create this dashboard.


As an Analytics Consultant and Trainer, I enjoy going to customers and help them become more data driven, particularly when these data refers to something as important as the media dissemination of the scientific knowledge about the pandemic. After the intelligent lockdown in the Netherlands started March 12th visiting customers was no longer an option, which represented a novel challenge for this specific collaboration with CWTS. Because of the lockdown we were forced to collaborate without any physical contact.


Prior to the lockdown I trained employees of CWTS in Tableau Desktop Fundamentals. Given the complexity of the monitoring dashboard about the social media dissemination of COVID-19 research they envisioned to build, they asked if I could support them in building it. We extensively discussed the meaning of the dashboard, the audience, and available data sources, using Microsoft Teams. CWTS built a first draft and I provided substantial assistance in creating an advanced flexible tool that is still visually clear. As an Analytics Consultant I know the importance of flexibility and visuality, but most of all, the challenge of finding the right balance between these two key aspects.


During the past few weeks, we have had regular contacts in Microsoft Teams to discuss the progress and challenges building the dashboard. There were some difficulties of course, like discussing visualizations with different screen resolutions, understanding data issues in the original sources, dealing with visualization problems (e.g. like the treatment of ‘null’ values in Tableau), or providing instructions to perform complex operations via sharing our screens. Despite these difficulties, looking back, the collaboration was excellent!


Yesterday the dashboard went live and I am proud of the result. I would like to thank Rodrigo Costas for the pleasant collaboration during this project. To see what we build see the dashboard below (or see the following link or look at a blog post discussing the dashboard).

The solutions

In this blog I would like to tell you about the solutions we used to create this flexible dashboard. Because this is an open dashboard I’m free to show you the calculations we have used. It’s also possible to download the workbook yourself and take a more closer look.


First challenge was that CWTS wanted to show several measure values in one dashboard, and let the user decide which one to use. In Tableau we can use parameters to solve this. A parameter gives the viewer the possibility to change a specific value, in this case the measure. In this dashboard I had to build several because of the flexibility requested.

Step 1:

Create a parameter (Select Measure X-axis) so the viewer can select the measure they need.

CWTS Covid-19 - Edit Parameter

Step 2:

Create a calculated field (Selected measure X) so Tableau can change the value for the selected measure. In this case I choose to use a aggregated calculation because we needed both SUM and MAX.

CWTS Covid-19 - Selected Measure X

Step 3:

Use  the calculated field in the visualization. We can use this field in every way a regular measure is used. In this dashboard I applied it for rows and columns, size and filter. The viewer can now select what measure they need to answer their question.

CWTS Covid-19 - Column Rows

Data source selector

In the dataset created for this dashboard the source of the publication was also available. In this dashboard we had three different sources for publication data. A publication could be mentioned in multiple sources and CWTS requested that we could also filter on source.

The default filter in Tableau includes or excludes an entire row, depending on the dimension or value selected.  In case a publication appears in multiple sources we couldn’t just filter a specific source because that would mean I also filter out rows that to occur in other sources.

The working of the filter requested was that only the publications in the selected sources are shown and the rest is filtered out. I solved this by using a parameter action in combination with a filter.

Step 1:

Create a parameter for a toggle switch. I this case just two values, 1 and 0 (yes and no). I explain later why we used an Integer parameter and not an Boolean.

CWTS Covid-19 - Edit Parameter Toggle WHO

Step 2:

Create a calculated which only contains the parameter value. We will use this calculation to define the shape used in step 4.

CWTS Covid-19 - Calculation

Step 3:

Create a calculated field for the parameter action. What action do we want the parameter to do. In this calculation we change the value from 0 to 1 and vice versa.

Step 4:

Create a worksheet where the calculated field from step 2 is on shapes. (I added two custom shapes of a check box checked and unchecked)

Drag the calculation from step 3 to details. We need this for the parameter action.

CWTS Covid-19 - Shapes

Step 5:

Create a parameter action. The source sheet is the sheet created in step 4. The Target Parameter is the parameter from step 1 and the Field is the calculation from step 3.

Now we have created a toggle switch that changes from checked to uncheked and back. Nothing else happens at this point. Only the value of the parameter changes and therefor the shapes we selected.

CWTS Covid-19 - Parameter Action

Step 6:

Create a calculated field for each source. In this calculation we check if the source is selected and if the publication was from that specific source. In that case we give the value 1, else 0.

CWTS Covid-19 - Calculated field source

Step 7:

Repeat all the steps above for all the different sources.

Step 8:

Create a calculated field where we add all the values of the sources. And we only want to show the record in case the value is at least 1, it occurs in at least one selected source. Drag this calculation to filters and select TRUE.

CWTS Covid-19 - Source Filter

In this solution we can select a source without filtering entire records when deselected.

Want to get started with Tableau?

Do you want to start making dashboards in Tableau yourself? Please contact us or download the Tableau trial here .