Tableau is a great tool that lets you draw any type of chart with your numbers.

When it comes to drawing with numbers, one’s imagination is only the limit.  Of course, another constraint is having access to good data.

A couple of years back, my daughter asked some help to get started with a project on the periodic table. We ended up building a periodic table using Tableau. This effort not only solidified her understanding of elements in the periodic table but also gave her a footing on this great tool.

I would like to share some of the steps we took to build this visualization.

If I had to help her build a dynamic and interactive periodic table, I first need to understand a little bit about the periodic table. It was years passed since the last time I saw one.

I found this on the internet. Courtesy to https://sciencenotes.org/printable-periodic-table/.

If we could imagine the area that appears behind the squares are nothing but a canvas for us to draw, the would save us a lot of time. 

The canvas is nothing but a Cartesian plane. The Cartesian plane has X and Y axes.

This picture was downloaded from https://www.superteacherworksheets.com/mystery-graph-picture.html

If you could imagine the above object as a lion smiling at you, I am sure you could draw anything.

If you look closely at this picture of the periodic table that we saw earlier, we see that the squares are drawn on the canvas to enclose the elements’ names. Every center of these squares has a point on the Cartesian plane.

Data points: We need to come up with data so that there are as many squares as elements in the periodic table.

Positioning: These data points, aka information about elements, must align according to the rules outlined in the periodic table

Color: They get the color according to the periodic table’s rule

Labeling: Each element must have at least a name attribute to label them.

Let’s go and start prepping the data. I am sure you are now able to see clearly the X and Y coordinates semi-enclosing the periodic table.

In the imaginary X, Y plane, let’s place (0,0) at far bottom left corner. If you start counting from (0, 0) upwards towards the Y-axis, you can see that the Fr (Francium) element’s center might fall approximately in (1,4), Cs (Cesium) falls at (1,5) and so on. 

This is what we initially started prepping.

But we later found that this data was readily available for us to download from the internet. 

Before we get to this readily available data, I wanted to stress the importance of the data-preparation and cleaning phase. This step is very crucial in any data visualization and machine learning projects

The machine learning pundits estimate that about 80% of the work in data science field can be easily attributed to data prep and cleansing. The model building, testing, and deployment takes the mere 20%.”

As you can see that all elements in the first column of the periodic table have one color. The second column has a different color and so on. As part of your data preparation step, what it means is that you need to group a set of elements to achieve the color effect. We started grouping elements in our spreadsheet to give the same color to element sets.

Enough said about the importance of prepping the data. Let’s get into some action.

We have this data set that we can use readily. you may download it from here.

https://www.amazon.com/clouddrive/share/HBDqorLbzmif3sfR3tPfLV3UAj7jRxCpSCkriVbmzlO

Fire up the Tableau desktop and then connect to the above excel sheet. If you get to the below state, you are with me.

The section where it says “Sheet 5” is your canvas. It’s not a coincidence that it looks like a Cartesian plane.

I would suggest you go through the data that you downloaded to familiarize yourself with it. I have been using Tableau for more than 6 years. So it took only a couple of minutes to be on the driving seat.

 

Let’s first drag X to the Column shelf. Then drag Y to the Rows shelf. If you got a screen like below, you are on the right track.

This is definitely not a periodic table. If you stay with me for another 5 minutes, we will complete our test drive.

In the spreadsheet, it had a field called Type to group the element. Let’s drag that onto the “Color” card.

Things are changing but we are still far from seeing a periodic table.

Let’s change the shape from the circle to the square and then add “Symbol” from “Dimensions” to “Details” card.

These two actions made canvas getting closer to look like a periodic table.

 

Let’s focus on increasing the size of the square and then dragging the dimension field symbol to the Label card.

 

Some small nuances. The labels appear outside of the box. Click on the label card. Change the vertical alignment to the middle.

The periodic table is looking right at you. 

 

 

Before you show your creativity to the audience, don’t forget to add a good title and also take the grid out.

Leave a Reply

Your email address will not be published. Required fields are marked *