October 6, 2015
Back in February 2014 I wrote about creating Bollinger Bands. Today’s tip is a simplified, more practical version of this tip. This tip will help you to create bands lines that are quite visually pleasing to the consumers of your work.
In this video I focus on three topics:
- How to create confidence bands
- Using parameters to control the size of the confidence bands
- How to create a user-defined moving average based on a parameter
Click on the image below to watch the video and interact with the visualisations.
October 5, 2015
To say the start to Chelsea’s season has been a debacle would be a massive understatement. From an outsider, it seems fairly clear that Jose Mourinho has lost the dressing room. He even got the kiss of death today when the club released a statement giving him a vote of confidence.
It’s been interesting watch it unfold from this side of the pond. Mourinho is a media darling, even getting away without punishment from the FA and the club for his treatment of team doctor Eva Carneiro. After every loss he pushes the blame on someone other than himself. It’s likely only a matter of one more loss before he gets the sack.
Given all of Mourinho’s shortcomings as a manager this year, the ultimate proof comes in the form of his players’ performances on the pitch. So far this season, those performances have been downright dreadful. Just how bad has it been? The viz below shows that things are really, really bad.
I looked at three key stats from WhoScored.com: Player Rating, Pass Completion %, and Aerial Duals Won. I took the data and filtered it down to the outfield players that made contributions both last season and this. I then created the simple analysis below.
- Every player has a lower rating this year than last. Particularly in poor form are Terry, Hazard, Costa and Ivanovic.
- Some of Chelsea’s most creative players are struggling to connect passes. Are the likes of Ramires, Oscar and Fabregas trying too hard under the pressure perhaps?
- Matic has been taking a lot of stick from Mourinho, but his pass completion % is 3.5% better than last year. He’s not being nearly as sloppy with the ball as his midfield counterparts, though if you read the papers you would think it was the opposite.
- John Terry is showing his age when it comes to aerial duals. He’s winning less than half as many as last year.
If things don’t turn around in the next fixture against Aston Villa, I wouldn’t be at all surprised if Jose got the sack. Why? Because you can’t fire 24 players at once and because Mourinho’s ego is too big to last more than three years at any club.
Click on the image below to interact with the viz.
John Schoen over at CNBC is a pretty regular Tableau user and it’s great to see Tableau being used in news organisations. However, I think he missed the mark with this visualisation about taxpayer migration in the US.
Let’s start with the squared map.
- While some might see this as cute, it’s quite poor at communicating effectively. It’s difficult to compare the size of the squares. The size legend is essentially useless.
- The colour scale is not colour-blind friendly. I suppose he’s going for a stop light type of look, but that’s not even what this is because it has four colours, not three.
- The placement of the squares is not geographically accurate.
How about the scatter plot?
- Again, why the squares?
- Same colour issues as the map, but at least it’s consistent with the map.
- The annotations he added work well and the reference line at 50% aids in understanding, but both of those are merely encoding the same measure as the colour scheme.
- What is the scatter plot adding that the map is not already showing us?
And the line chart?
- This works well for a single state, but what if I want to compare states? What if I want to see all states at the same time so that I can see if there are any common themes?
- The colour scale is not consistent with the other two charts. Click on California and you’ll see what I mean.
One of the great things about Tableau Public is that most people allow you to download their workbooks so you can have a play for yourself. That’s exactly what I did in this case. I’ve build the dashboard below to address the communication issues that I feel the original has.
Click on the image for an interactive version.
What did I do?
- Focused on a single metric, in this case net migration, since that’s what the original story was about.
- Used a single colour pallet that is colour-blind friendly
- Added all states to the line chart. Clicking on a state in the map will highlight the state on the line chart.
- Included a bar chart of the states that have a net outward migration
- Gave the visualisation a more meaningful title
What would you do differently? I’d love your suggestions for making this better.
October 4, 2015
When I saw the topic for week 24, I immediately knew what I wanted to create. In California, our neighborhood was managed by a homeowner’s association, which meant uniformity everywhere, including every house door being black. One of the first things I noticed upon moving to our home in Kingston was how colourful the doors are.
Since there are so many homes on each street (townhouse/terrace style homes mostly), it was going to take quite some time to document all of the door colours. My wonderful daughter walked me with to help with the survey; I wrote down the door colours while she told me what they were. We got a few bizarre looks from people. Given that I was writing in a notebook as we looked at each house, it wasn’t too surprising.
When I started entering the data into Excel, I realized that I didn’t write down the house numbers. So out we went again for a second survey. After entering all of the data, I copied the addresses into Batch Geocoder to get the latitude and longitude for each address.
Next, I create a custom black and white Mapbox map for use in Tableau. I initially used a house shape for each house, but when I was showing this to people at the Data School, they thought it looked to cluttered, so I stuck with circles.
My postcard looks pretty similar to Tableau in terms of style. However, I think my postcard looks cleaner and simpler. I almost felt like an architect or city planner creating this map.
Click the image below to view my story. Enjoy!
October 3, 2015
Another mass shooting in the USA. 17 more people shot. 10 dead. 7 wounded.
So what’s one to do? How about find some data and see if a visualisation can have an impact?
This morning, I woke up early thinking about the data. I didn’t want data about murders; I wanted data about shootings. Why? Because if shootings don’t occur, then gun murders can’t occur.
A Google search turned up the amazing website Mass Shooting Tracker. They’ve been collecting data about mass shootings since 2013. Their explanation of what and why they track what they do is critical:
The most obscene incidents of gun violence usually do not make the mainstream news at all. Why? Because their definition is incorrect. The mainstream news meaning of "Mass Shooting" should more accurately be described as "Mass Murder".
The old FBI definition of Mass Murder (not even the most recent one) is four or more people murdered in one event. It is only logical that a Mass Shooting is four or more people shot in one event.
Here at the Mass Shooting Tracker, we count the number of people shot rather than the number people killed because, "shooting" means "people shot".
I downloaded all of the data, parsed out the locations, loaded them into Batch Geocoding and viola…all the data I needed to build this viz.
Click on the image for an interactive version.
September 29, 2015
I’ve been faced with this scenario many times - I need to sort the top N of a dimension by a measure (e.g., sales), but I want the rest of the members of the dimension to be sorted alphabetically. This is an especially handy trick if you have tons of members in your dimension. It makes it easy to see which members are in the top N, then the rest can be found by looking them up alphabetically.
Click on the image for the video and to interact with the dashboards that you see me build. You may also pick up a few other tips along the way, like creating sets and parameters, quickly formatting worksheets, faking headers, etc.
September 28, 2015
A couple weeks ago, Business Insider published a very simple bar chart showing the total value of all franchises for the four major professional sports in the USA. At the Data School, I’m always stressing context in visualisations.
Business Insider’s chart is lacking context, so in today’s makeover, I walk you through a few simple methods for adding context to a simple bar chart. Click on the image below to view the story.
September 27, 2015
I had finally caught up on all of the Dear Data Two postcards, then this extremely difficult topic came up. The problem isn’t necessarily the topic itself, but the data collection. How the heck do you collect data about being nice?
My initial thought was to do a word analysis for Tweets and emails, but that didn’t interest me much. I considered tracking every time I said something nice to someone, but that would be a data collection nightmare.
Instead, I settled on a simple list of some of the people I’m closest to and ways that I can be nicer to them. I borrowed heavily from Giorgia’s categorisation. From there I thought I would create tree-like structures for each person, but when I sent a sample to Jeffrey, his first comment was:
Wow. This looks really awesome. Antenna charts.
So deflated! But drawing the trees meant adding a lot of rows to the dataset…maybe this was a blessing in disguise. I decided to go with the antenna charts idea and straightened out the branches. The Tableau part was pretty simple, since it’s really just a game of “connect the dots”. The tough part was transforming this onto a postcard given my limit drawing skills.
With that being said, click on the image below to view my story of Dear Data Two | Week 23: Being Nice(r).
September 25, 2015
Bonus tip today. This tip started with a request for feedback from The Information Lab’s head honcho Tom Brown. Tom is getting ready to demo a dashboard to a customer and we noticed that he was using automatic sizing on the dashboard he created. This is generally not recommended because Tableau will re-size the dashboard depending on the device size, which can cause your dashboard to not look as you intended.
Click on the image below to interact with the dashboard I created for the Transport for London bike scheme and to watch the video on how to get your dashboards to be the “perfect” size. In this video, I used James Dunkerley’s Web Data Connector, which you can find here.
September 22, 2015
I was first exposed to using lollipop charts to track progress by Alberto Cairo back in January 2013. In the viz, I used lollipop charts to show the percentage of educated and obese people by State in the U.S. I realized I never wrote about how to create them, so in this tip, I’m going to show you several things:
- How to use import.io to get the data
- How to use the Tableau Web Data Connector to bring data into Tableau from import.io
- How to build the lollipop progress charts
- Options for customising the view
- A practical example that will likely apply to your work
Click on the image below to watch the video and/or download the workbook. It’s a bit of a long video since there’s so much to cover. If there’s anything else you’d like me to create videos for, please let me know in the comments below.
NOTE: After creating the video, I did quite a bit of formatting on the visualisations to get the sorting to keep the sheets in sync and to create the second dashboard. I’d highly recommend you download the workbook to see how I did it. Particularly, see the LOD calc I had to create to get the sorting to work on the sparklines.
September 21, 2015
Saturday Down South, which focuses almost exclusively on Southeastern Conference (SEC) football, posted an article back in January about the size of SEC football stadiums. In the article, they have a great line:
The conference’s stadiums are some of the biggest in the world, representing four of the top 10 and seven of the Top 25, many in towns that more than double in population on game days.
They wrap up the article with this basic table:
WORLD’S LARGEST STADIUMS RANKED BY CAPACITY
1. Rungrado May Day Stadium (Pyongyang, North Korea): 150,000
2. Salt Lake Stadium (Kolkata, India): 120,000
3. Michigan Stadium (Ann Arbor, Mich.): 109,901
4. Beaver Stadium (State College, Pa.): 107,282
5. Kyle Field (College Station, Texas): 106,511*
6. Estadio Azteca (Mexico City, Mexico): 105,000
7. Ohio Stadium (Columbus, Ohio): 104,944
8. Neyland Stadium (Knoxville, Tenn.): 102,455
9. Tiger Stadium (Baton Rouge, La.): 102,321
10. Bryant-Denny Stadium (Tuscaloosa, Ala.): 101,821
11. Bukit Jalil National Stadium (Kuala Lumpur, Malaysia): 100,411
12. Darrell K Royal-Texas Memorial Stadium (Austin, Texas): 100,119
13. Melbourne Cricket Ground (Melbourne, Australia): 100,024
14. Camp Nou (Barcelona, Spain): 99,786
15. Soccer City (Johannesburg, South Africa): 94,713
16. Los Angeles Memorial Coliseum (Los Angeles, Calif.): 93,607
17. Sanford Stadium (Athens, Ga.): 92,746
18. Rose Bowl (Pasadena, Calif.): 92,542
19. Cotton Bowl (Dallas, Texas): 92,100
20. Memorial Stadium (Lincoln, Neb.): 91,471
21. Wembley Stadium (London, England): 90,000
22. Ben Hill Griffin Stadium (Gainesville, Fla.): 88,548
23. Gelora Bung Karno Stadium (Jakarta, Indonesia): 88,306
24. Jordan-Hare Stadium (Auburn, Ala.): 87,451
25. Borg El Arab Stadium (Alexandria, Egypt): 86,000
Simple enough, right? The focus of the article is on SEC football stadiums, but their method of emphasising (via bold text) is easy to overlook and comparisons to other stadiums is difficult.
For my makeover, I’ve:
- Changed the view into a bar chart, which helps see the size variances between the stadiums
- Used colour to group the stadiums as to whether they are in the SEC, another college football stadium, or something else
- Used the SEC’s official yellow for the background and blue for the bars of the SEC stadiums
- Used the News Gothic font, which is the closest I can get to Benton Sans, the font the SEC uses on their website
- Included a map for the locations of the college football stadiums (this was also my first time creating a custom Mapbox map)
Click on the image below for an interactive version.
September 15, 2015
This week I go back to a post I wrote in January that showed how to create a parameter that returns a value, but those values have multiple number formats (e.g., pounds and percentages). I then show how to use custom number formatting to display the metric selected with the proper number format.
Note: This logic only works if all of the numbers you are showing are positive.
Click on the image below to view the video and download the workbook.
September 14, 2015
From there, I started working on a couple of different draft versions of my postcard for Jeffrey. I thought I had settled on one and I showed it to my wife. When I asked for her impressions, she thought it was strange how I had stuff going left and right; she thought left looked negative and right positive, so in the final version I incorporated her feedback.
Data collection was pretty straight forward. I used:
- LinkedIn for the dates of my professional history
- Blogger for the dates when I started my various blogs
- The rest was by memory (or what is left of it)
Click on the image below to view my Tableau resume, and draft and final versions of the postcard.
How much does each state contribute to the US economy? http://t.co/aykgGdkdMN #economics pic.twitter.com/07RHuVxtK6— World Economic Forum (@wef) September 7, 2015
It looks like WEF hired howmuch.net to create this tree-map pie chart thingy, as they have a more extensive write up about it here. I’ve used story points to review the visualisation, walk through a series of alternatives, and then conclude with an interesting tidbit about how uninteresting their data is.
Click on the image below to view the story.
September 8, 2015
One of the problems with maps like this is that the sorting defaults to the data source order, which is this case is the zip code.
What I want the map to do is bring the highest and lowest values to the front. When I look at the sort options on the zip code dimension, I can choose Profit in descending order.
Choosing that only bring the positive values for profit to the front.
To get the positive and negative outliers to the front, I need to create a simple calculated field on Profit that returns the absolute value.
Then in the sort for zip code, choose this measure.
And now you can clearly see the outliers for your map.
If you really want to see the outliers to pop, make one small adjustment to the colour scale. Change it to a palette that has white in the middle of the range.
Download the workbook used to create from Tableau Public here.
September 7, 2015
September 6, 2015
Click on the image to view the story.
September 3, 2015
Click on the image to view the story of Jeffrey's future travel plans.
September 2, 2015
To collect the data for this week, I combined data from Moves (for places and times), Fitbit (for sleeping) and Sunrise (for my calendar). I entered everything manually into Excel and connected it to Tableau.
Click on the image to view the story.