Our way to say “Hello world” from the new Data School cohort is recreating and explaining a visualisation using Tableau. Using UK data about climate change, I created a “calendar heat map”. Curious about what it is? Check the post!

For my version, I decided to create a kind of “calendar heat map” (and have also created this name for the viz), a way to make the data easy to “read” by almost everyone.

In this viz each row is a decade and the colours vary by the temperature variation by year, with hues starting blue for those years bellow the median variation and becoming red for those above it.

However, there is an issue in creating this structure: in the dataset we have only the division by years, which will give you a very beautiful line if you drag it into the columns field.

create groups line
To create the “calendar heat map” we need something we don’t already have: a decade’s dimension!

How do you do that? The easiest way (suggested by Andy) is creating a group for each decade. It is a bit of a hassle because you need to do it manually, one by one (In this case, 17 times!), but it is still a good option.

So, let’s create a decade?

FIRST STEP: Making sure the data is organised by years

First thing we need to do is to make sure we are working with years, not with days (if you check on the data source, it has days as rows, not years).

To do that, you need to right click on the Date dimension >> Create >> Custom date. Then select “Years” and click “ok”.

create groups selecting years

SECOND STEP: Grouping years into decades

Now we can finally group the years into decades. If you have never created a group before, it is easy: Right click on the dimension you have created in the last step (in this case “Date(Years)”) >> Create >> Group… And start grouping!

To do that you need to highlight the data from each decade, click on the “Group button” and give it a name like 1850s, 1860s…

create groups creating a group

THIRD AND FINAL STEP: Bringing back the years to the visualisation

Once you have your decades, all you need to do is to add this dimension to the Rows Field and drag the Date field to “Details”, on the Marks Cards and change it from “Automatic” to “Squares”

You will have something like the image above.

create groups drawing the calendar

BONUS: Making it beautiful
A little bit ugly, isn’t it? To make it better, try changing the size (clicking on “size” in the Marks Card) and making each row a little bit higher. If you did those changes you will have something like the image above. Ready to be used as the base to the “heat map”! Clicking here you can check the final result of my visualisation.

makeovermonday_week20_group_better_calendar