August 24, 2016
After publishing my viz earlier today that used Google Sheets, Zen Master Chris Love posted this question on our collaboration tool:
So I told him I’d create a video that shows three things:
- How to scrape data from a web page into Google Sheets
- How to import that data into Tableau with the Google Sheets connector
- Ensuring it refreshes when you publish the viz to Tableau Public
UPDATE: Zen Master Jeffrey Shaffer sent me a link to this post on his blog. It’s important to note that the IMPORTHTML function does not seem to auto-refresh. You can force an auto-refresh in your Google Sheet by making the first cell an IF statement like this following -
Then you need to update your spreadsheet settings. Click "File" -> "Spreadsheet setting" and set the "recalculate" to "On change and every hour". This will keep the data refreshed.
It’s election time, so time for an election viz. You will notice this is very similar to the RealClearPolitics version the difference being that I am calculating the 2-week average of all polls in their data set.
This little project also provided me a chance to try out the new Google Sheets connector in Tableau 10 and allow the extract to refresh on Tableau Public. In addition, I learned how to scrape a table from the web in a Google Sheet via this blog post, which should (if I did it right) update automatically.
This was also another chance for me to test out the Device Designer that came with Tableau 10. Enjoy!
August 23, 2016
August 22, 2016
This week for Makeover Monday we are tackling the malaria epidemic. The fact that countries still have to worry about malaria despite the prevention measures available is quite sad. Fortunately, the Tableau Foundation is helping and you can help too. Please visit visualizenomalaria.org to help.
Let’s look at the original visualisation on the World Health Organization website.
What works well?
- Really nice interactivity with both hover and click actions
- You can make any are full screen
- Consistent color palette
- Easy to understand
What doesn’t work well?
- Map is way too wide
- List of countries doesn’t aid in understanding
- Time series and bar chart don’t adjust for the data that is filtered
- Timeline is missing several years, even though the data exists
- Time series doesn’t display anything until you click on a country
I wanted my visualisation to fix the issues listed above, but also to be more focused on Africa. I also wanted it to serve as a call to action. I start with a summary and background information, dig a bit into some insights I found, and wrap it up with a way people can help.
August 17, 2016
This Data School Gym challenge is nothing more than a remake of an existing chart. I was reading Andy Kirk’s great series “The Little of Visualisation Design” and he showcased a chart from The Economist. From Andy’s blog:
"Typically, charts like this would have categorical value labels right-aligned to the left of the vertical axis. However, in this case, the labels are positioned with immediate proximity just to the right of the highest value - which is the value used to order the categories vertically. This approach aids readability, making it just that little bit more efficient to perceive the values and their associated categories."
According to The Economist, this chart shows:
"In every state where exit polling from this year’s primaries is comparable with the previous competitive cycle (2012 for the Republicans and 2008 for the Democrats), more voters have described themselves as “conservative” on the Republican side and “liberal” on the Democratic one."
I thought this would be a fun chart to try to rebuild in Tableau. I recreated the data manually, which you can download here. Note that the data probably isn’t 100% accurate to the original chart; I did the best I could and that’s not the point anyway. The point is to practice, practice, practice.
- This is three charts.
- I used 100% floating objects.
- The vertical and horizontal lines were added manually.
- Each event has its own sort: The top is sorted by Conservatives, the second by Liberals and the third by Moderates.
- The shading must span from the smallest to largest value for each event and state.
Give it a shot. I didn’t think this one was too terribly difficult. The toughest parts for me were getting the layout just right.
August 16, 2016
August 15, 2016
Several of the ladies that participate in Makeover Monday have been asking for a while now to look at a data set and viz that related to the original #MakeoverMonday hashtag. That is, something to do with beauty, make-up or hair.
This week, we look at this infographic from Raconteur Media, a publishing house and content marketing agency. Raconteur has a whole section devoted to their infographics if you’re looking to do more makeovers on your own and need interesting data sets, or if you’re looking for some creative inspiration.
In particular, the focus on this Makeover Monday is on the radial chart in center of the graphic. This chart attemps to show the year-over-year change in the UK market for various makeup products.
What works well?
- Each of the sections is sorted from largest to smallest
- Each bar has a clear label for the 2014 value and the change vs. 2013
- Design catches and retains your attention
- Simple summary in the middle
- Really crisp font that is easy to read
- Good color choices that contrast well
- Consistent decimal formatting
What doesn’t work well?
- The categories are not sorted, so it takes a lot of work to see which category is the largest.
- Comparing products across categories is basically impossible.
- Originally, I thought the white T-line extended out to the value for 2014, but it doesn’t mean anything. It’s simply to fit the text.
- This led me to think that the bars themselves were 2013 values, but they aren’t. So I’m not totally sure what the white line and bars represent.
- Some of the bars are cut off with squiggly lines to show they go farther than the viz shows. This can be misleading.
- At a glance, it’s very hard to tell which products are growing and which have declined.
For my version, I decided to go 100% floating in Tableau for the first time ever. I now understand why people design in Tableau this way. I can make my dashboard look EXACTLY the way I want and it’ll render exactly the same way on Public. Previously I would try to float only parts of the dashboard and they would shift a few pixels in Public. Not so with 100% floating. So, what I’ve learned is design Tableau dashboards 100% tiled or 100% floating, but don’t mix the two. This is the beauty (pardon the pun) of Makeover Monday; it gives me a chance to experiment and learn.
I deliberately chose colors that I thought looked more “make-upy”. I used an orange-to-purple diverging color palette from ColorBrewer and added it to my Tableau preferences file. Lastly, I also incorporated a phone version using Tableau 10’s new Device Designer.
My goals for this dashboard were simple:
- Make a dashboard that makes understanding and compare within and across categories easier
- Create a computer and phone version
- Use colors that represent the topic, but also clearly show products that are increasing or decreasing
Another fun week of Makeover Monday complete and, once again, I learned a TON! Enjoy!
August 12, 2016
Today at the Data School, Amanda Patist was giving an Alteryx demo and she used worldwide population data. That got me thinking about population pyramids; I’ve always wanted to build one. When I create this, it required a few tricks to get it just right. So I thought I’d post it as a Data School Gym challenge.
The small line chart show the % females and % males. The big chart shows the population. Post a link with your solution before you download mine.
Ignore the gray lines that are going across the viz. That’s a bug in Tableau 10.
August 10, 2016
A fun Data School Gym challenge for you today. Using this data source of human height since 1896, create this visualisation:
- Each country should show only 1896 and 1996 and they should be connected
- Label the midpoint with the country name
- Use an orange to blue diverging color palette based on the Avg Height
- Allow the user to filter by sex (no All option)
- Create a parameter to allow the user to pick a country; it should also include an (All) option
- Use the parameter to sort the visualisation; (1) If (All) is chosen then sort from largest to smallest based on the 1996 value. (2) If a specific country is chosen, that should be displayed at the top and the rest should be sorted from largest to smallest.
When the user picks Bermuda, for example, the visualisation should look like this:
Here’s the interactive version. Post a comment with a link to your solution. Good luck!
August 9, 2016
In this week’s tip, I walk you through how I’ve learned to use Tableau 10’s Device Designer feature, which makes it so much easier to create device specific designs.
Note: I ramble a bit at some points in this video as I learn some things along the way and I also hit some wifi issues, so I apologize in advance. Hopefully this helps you see that no one is perfect and we’re all on this journey of learning Tableau together.
August 8, 2016
With the Olympics starting this weekend, I thought we’d take a look at the most classic way that people display Olympic medal counts, as stacked bars. Being an American, I pretty much have only known NBC as the host of the Olympics, so when I went to their website and looked for historical medal counts, I was mortified. This viz is just about as bad as it can get.
What works well?
- The countries are ordered from most medals to least.
- There’s cute little actions when you click on the medals.
- They used appropriate colors for each medal type.
Seriously, that’s all I see that’s any good. This is an incredibly poorly done graphic.
What doesn’t work well?
- There’s no title.
- There aren’t any tooltips, so I have no idea how big each bar is; I’m forced to guess.
- I can only see seven countries at a time, and I can’t even see the name of the seventh country. I mean, who would ever want to compare only the 15th-21st ranked countries?
- When I click on the scroll button, it scrolls by an increment of 2. Why?
- Comparisons are nearly impossible with a stacked bar except for the total medal count and bronze.
Here are some of the changes I made:
- I separated out each medal into a dot plot and chose to show only the top 25.
- I included a summary next to each country to provide the exact medals counts.
- I included a mobile view, but in this view I remove this summary for a better visual look.
- I included informative tooltips.
- I included a title so you know what the chart is about.
- I included filters so the user can decide which Olympic games to include.
- The "sort by" option allows the user to pick the medal count to sort by making comparisons easier.
August 1, 2016
Definitely my quickest Makeover Monday ever. Forgive me, I’m busy at the bar at the beach.
This week we looked at a rather funny dataset from FiveThirtyEight about how the media tries to avoid saying “groin” when someone in a sporting event gets hits where it hurts. They presented their work in this table:
There’s nothing particularly terrible about this other than a table of numbers makes comparisons more difficult than necessary. The summary on the right helps it make a bit more sense.
For my viz, I wanted to create a chart that I’ve never built - a treemap bar chart. Basically this is a way to view the distribution of the words by each media outlet but also summarize them in bar chart form so that you can see which media outlet ranks the highest.
July 28, 2016
Malcolm Gladwell, one of my all-time favorite authors, recently started the Revisionist History podcast. In his typical style, it is absolutely amazing!
"Each week for 10 weeks, Revisionist History will go back and reinterpret something from the past: an event, a person, an idea. Something overlooked. Something misunderstood."
In the middle is a three-episode series about education in the United States. One story in particular caught my attention and, coincidentally, I happened to listen to this podcast on the same day that The Data School was working on their dashboards based on the College Scorecard data.
Here’s Gladwell’s summary of episode 5: Food Fight!
Bowdoin College in Maine and Vassar College in upstate New York are roughly the same size. They compete for the same students. Both have long traditions of academic excellence. But one of those schools is trying hard to close the gap between rich and poor in American society—and paying a high price for its effort. The other is making that problem worse—and reaping rewards as a result.
In the spirit of not accepting statements as fact, I decided to create this visualisation comparing the two colleges. In every section I start with a similarity then next to it I point out a difference. This really helped me compare the schools and confirm much of what Gladwell spoke about in the podcast.
July 26, 2016
About 3 1/2 years ago Alberto Cairo came to give a talk at Facebook. It was an incredible talk and immediately after I built a viz about how he built his book cover for The Functional Art. One thing bothered me when I built it though; I wasn’t able to include the vertical lines like he did…until this past weekend when I finally figured it out.
So today, while The Data School works through their next dashboard during Dashboard Week, I decided to build it again, this time with the vertical lines. I had to do a lot of finagling with the mark labels. Click on the image below to view the interactive version.
In this week’s Tableau Tip Tuesday, I show you how I created a slope graph that includes vertical lines. I really like the addition of the vertical lines as they add structure to the overall look and keep the viz neatly aligned. This was originally posted as a Data School Gym challenge, which you can view here.
July 25, 2016
Following on from last week’s discussion about Makeover Monday and what might be keeping people from participating, Andy and I are committing ourselves to keeping our visualisations simple and quick. The data set provided this week has A LOT of census information included, but I focused on the data from the original post. Here’s the original from Rhiannon Fox, a graphic designed based in Bermuda.
I spoke to Rhiannon about her work and I’m hoping she becomes part of our teaching curriculum at the Data School. She’s very excited to see what everyone comes up with.
What works well?
- I love the colors
- Simple, small multiples layout
- Great fonts
- Great labeling
- Consistent use of shapes for the unit charts
- Neatly organized in a Z-pattern from oldest to most recent
- Population growth is easy to see
What doesn’t work well?
- A unit chart sacrifices accuracy for engagement.
- The overall pattern is harder to see than it needs to be.
- It’s too difficult to compare females from year to year.
Given what I like and don’t like, and sticking to the one hour time limit, I decided to go with a diverging bar chart, also known as a back-to-back bar chart or a bikini chart or a population pyramid.
July 23, 2016
It’s my birthday, so what else would I be doing other than practicing Tableau and having a cold beer? I’m working on a project (more to come in a couple months) and needed a way to create vertical lines in slope graphs that are based on dimensions.
So here’s your challenge. Given this data set of fruit sales by region, build this slope graph. If you can’t access the data, email me and I’ll send it to you.
Some formatting tips:
- I used Avenir Next Condensed for the font - 18pt title, 12pt in the chart.
- The decreasing value is highlighted with color #E15759 and the increasing values are using #A5ACAF.
This was a fun little challenge for me. You’ll likely either get it immediately or get stuck. Upload your answer to Tableau Public and leave a link in the comments. Have fun! I need to get back to my Punk IPA.
July 21, 2016
A couple weeks ago, I started using a shortlink service for the links to the Makeover Monday data sets. Each week I publish both a flat file (Excel or CSV) and a Tableau Extract. When Andy and I started this, we figured a TDE would be the easiest way for people to start. But I was wrong…well, that’s assuming the last 2 weeks are representative of every week.
To our surprise, people are using the Excel files at about a 2-to-1 rate to the TDE. That was surprising enough; I just assumed people would use the TDE because it’s simpler.
And look at those download numbers! 285 people downloaded the week 28 data and 219 have downloaded week 29 (as of this writing). I combined that with the number of vizzes uploaded to Twitter for those weeks and tagged #MakeoverMonday.
Yes, you’re seeing the same thing I am. We are getting an incredible number of submissions, but pretty small compared to the number of downloads. To give the situation a bit more context, consider this visualisation:
I’m curious. Who are these people that are downloading the data, yet not sharing their work? Do you have any ideas as to why aren’t they sharing their work? I don’t have the answer. I’m hoping you, the Community, can help explain this. What can we do to encourage more people to share their work? Are we doing anything that may be putting them off?
Please share your thoughts in the comments below. Thank you!