Last week on #Workoutwednesday2019 challenge was given by Curtis Harris and it was about trying out one of the material design concept for data visualisation. It was simple line chart with few twists to highlight temperature of the city and highlighting current month of the year.
Requirements:
- Dashboard size 1000×800
- All elements should be in a vertical container, except for the filter
- Provide 150px padding on all sides of the vertical container
- Make sure values display the degrees symbol as a suffix
- Axis should display marks every 20 degrees, and should provide context to the reader at the top most mark
- Add a reference line for the current month, that will update automatically as the year goes on
- Add a circle over the point in the lines that represents the current month’s average temp
- Add a label for the hottest city, in the current month, for all of the cities in the view
- If you filter out Phoenix, the label should move to Salt Lake City
- Add a simple color legend that updates as the filter changes
- Turn off tooltips – not necessary for the challenge
Data for the workout can be downloaded from here
Here is my output for the challenge (Click on gif for interactive version):
I will try to provide step by step guide to re-create this dashboard and complete the challenge:
STEP 1: Creating calculated fields
After Importing the file into Tableau, we need to create 2 calculated fields:
First one is to identify the current month (month of the year):
Second one is to calculate average temperature for the current month:
Step 2: Create sheet with city names
Drag City to column and color in marks area then sort by average temperature
Add filter of city and apply for all the sheets (as shown below image)
Step 3: Create sheet with Line chart and reference line:
Drag Month to columns, select to show months and set to continuous by right clicking the month
Drag Average temperature, set to minimum and select line chart from marks area then drag city column to color
Drag our calculated field Today’s month temp to rows, set to minimum and select circle from marks area then drag city column to color and Today’s month column to detail area.
Then select dual axis by right clicking Min(Today’s Month temp) and synchronize the axis.
Add Reference Line to point degrees in Fahrenheit and add reference line for current month
Format the label to display maximum temperature of the selected filters of city
Step 4: Integrate into dashboard
In dashboard select vertical object and drag to dashboard then add inner padding of 150 from each side.
Add the title, Line chart sheet, and city sheet to make dashboard look like below screen shot:
And we are ready with final visualization as show above.
Thanks Curtis Harris for this workout
Happy Data Visualisation!!!!
Thanks for visiting this post. Please do let me know your feedback or if you have any questions about the blog do not hesitate to contact me on twitter (@Desaimithun)
Do subscribe to Tabvizexplorer.com to keep receive regular updates.