October 31, 2014
Tomorrow is the first month of November so that means people everywhere will put down their razors for the month and see what happens in support of men’s health. It’s Movember! If you haven’t heard, Matt Francis is organizing a Tableau Team. Unfortunately (or probably fortunately, really…) I can’t grow a mustache. Luckily, Tableau can grow one for me!
A few other Tableau celebrities got the mustache treatment, as well. Check it out in my viz!
October 20, 2014
Thanks to the lovely folks at import.io for showing a super fun time last Thursday at our Halloween special webinar! If you logged on, you probably caught some of our “fancy dress” but in case you weren’t, this happened:
If you didn’t make it, never fear! It was recorded and you can watch the whole thing here:
I wanted to go a little more into detail about how to build this dashboard, so I’ll break it down piece by piece so that you can recreate it!
Building the first bar chart is pretty easy. To start, put [Costume Category] on rows. Since there are duplicate rows (due to having one row for every word in a title), instead of using [Number of Records] we are going to do a CountDistinct([Prod ID]). You can do this by right-click dragging [Prod ID] to the columns shelf and then selecting Count Distinct, or by clicking the drop down menu on the Prod ID pill and then going to Measure>Count(Distinct). This means Tableau is now only counting each costume once.
Making the price histogram was also very simple. All you have to do is select [Price] in the Measures pane and then hit the histogram button in Show Me.
If the bins that your histogram selects are too big or small you can edit them by finding [Price(Bin)] in the Dimensions pane, clicking the drop down and clicking “Edit”. This will allow you to change your bins to whatever size you’d like.
Lastly, instead of doing a count on price, which will make for duplicate rows because of the join with the words, switch out [CNT(Price)] on the Rows shelf with [CNTD(Prod Id)].
To create the word cloud, drag the [Words] on to text and [Number of Records] on size. At first, you’ll get a treemap. This is a good point to filter out some of the words to keep them mucking out the word cloud. I filtered out words like costume, adult, the, of, etc. You can just over over a square and click “Exclude”. Once you do that, you can switch the marks card from “Automatic” to “Text” to get a word cloud.
Another thing I wanted to do was filter to only the top 30 words; that way nothing is too small. Since we already filtered on [Words] when we excluded “adult” and “costume” and the like, we can create a duplicate field for words and filter on that. If you click the drop down menu on [Words] you will find the Duplicate option. Click on this and drag it to the Filters shelf. Once you are there, click the tab that says “Top” and choose “By field:” and set it to the Top 30 by [Number of Records].
The table is pretty simple. Drag [Item] to rows and [Price] to label. Easy peasy. I also put [Prod Id] on Detail in the Marks card (you’ll see why later) and [Description] in the tooltip.
Hover Help Ghost
This is a trick I use all the time as it’s a great way to add context to your dashboard without taking up too much space. It’s been well documented before so I won’t go into too much detail. The only real thing I did differently was change the shape to a custom shape that looks like a little ghost. Read more about utilizing custom shapes here.
The “Sexy” button
To create this, I first went through all the words and created groups so that words like “Babe” and “Flirty” fell into the “Sexy” group and all other words counted as “Everything else”
With the groups created and renamed to [Sexy Words] I created the “Sexy” button by dragging out [Sexy Words] to the text on the marks card and then editing the label by clicking on the Text button and editing it to say “Click here to bring back”. Then I put [Sexy Words] on filter and filtered to only show words in the “Sexy” group. Then, I edited the formatting to have borders and colors to make it look button like.
Tableau Public is great for rapidly creating a lot of different charts types like we did above, but the real power comes in making these charts interact with each other. This is done through “Dashboard Actions.” Now that all of our sheets are created, we can create a new dashboard and drag everything onto it. Then we can create a series of dashboard actions by going to Dashboard>Actions in the menu. Here’s all the actions I created:
- Category filters everything: This action makes it so that click on a costume category in the bar chart filters the price histogram, frequent words, and costume list. Set “Categories” as the source sheet and “Price Histogram” “Table” and “Word Cloud” as the targets, with the action set to run on Select and clearing it will Show all values. I also set the target filter to only filter on [Costume Category].
- Histogram filters everything: This action makes it so that click a price bin will filter the table, bar chart, and word cloud to only show costumes that fall in that price point. This is set up by having the histogram as the Source Sheet and the bar chart, table, and word cloud.
- Word cloud filters everything: Just like the two actions above, this means that clicking on a word in the word cloud filters the prices, categories, and costume list to only show costumes that contain that word. In this case, the word cloud is the Source and the Targets are everything else.
- The “Sexy” button: Clicking on this button will filter everything to only show costumes that contain words that are in the “Sexy” group we made earlier. The source sheet is the sexy button and the target sheets are the categories, histogram, table, and word cloud.
- View the image: Dashboard actions do more than just filter things. They can also be used to display images. Buycostumes.com has images for every costume based on the [Prod ID] so we can easily pull in these photos using a URL action. When clicking the “Add Action” button, choose URL. The source of this action will be the table (this is why we put [Prod ID] on detail!) and set the URL to say “http://images.buycostumes.com/mgen/merchandiser/.jpg?zm=170,170,1,0,0″. Set the action to run on Select. Now, clicking on a costume in the table will open up the image. If we add a Web Page to the dashboard using the Web Page object, we can view the image right on the dashboard.
I wanted the theme to be really obvious, so I did a bit of design work to make everything match the Halloween theme. First, I set the background color to all of my sheets and the dashboard to black and set the other colors to fit a theme. I based everything off of this color scheme:
Color by COLOURlovers
I even created custom color palettes in Tableau so that I could use those colors as a gradient in the data.
Another thing I did was create a set of custom titles out of a custom font I found on DaFont called “Scary Halloween”
I also added a little tombstone image to the dashboard for the costume picture to load on top of.
So, that’s basically it! Our finished product looks pretty neat:
So, that’s it! I hope you enjoyed the webinar and the dashboard!
October 14, 2014
Several months ago, I was doing some Google searching to figure out what a Barbie Dream Boat is worth these days. The Barbie Dream Boat was basically my most prized possession as a kid. I got it for Christmas when I was 7. It came in a gigantic box. It had a pool that you could fill with water. AND IT HAD A BLENDER. I made so many virgin piña coladas in there.
In searching to see how much these go for these days, I stumbled upon BarbieValues.com
. Being me, I was instantly excited about this repository of Barbie data. Unfortunately, my traditional methods of web scraping couldn’t handle this beast of a dataset. Thankfully, after pleading with the audience of my “Pokemon, Porn, and Pop Culture: Using data that doesn’t suck” session
at this year’s Tableau Conference
, a few super smart Tableau devs, specifically Charles Vaughn
and Nathan Brandes
, came to my rescue! This dataset is amazing and I have all kinds of plans on things to do with it. But for the first in my series of Barbie data vizzes, I created an n-gram search
. You can use this to see occurrences of words or phrases in Barbie models and accessories over time. To create the n-gram search, I used a parameter method that Matt Francis recently blogged about
. Check it out below:
In future Barbie vizzes, we will figure out who her favorite friend is (Midge? Teresa? Skipper?) and explore the many, many careers she’s had.
October 9, 2014
For those who don’t know, I’m on a bit of an extended trip working out of our London office right now. It’s been rad and one of the things I’m really excited about doing while I’m here is hanging out with my pals at Import.io. We are putting on a special Halloween edition webinar next Thursday, October 16th (my birthday!), to show how to scrape Buycostumes.com and build this viz in Tableau:
You can use the viz above to find the perfect animal-ears-plus-lingerie combo, a la Mean Girls.
Hope to see you next Thursday!
October 3, 2014
Fall is in full swing, so you know what that means: pumpkin spice lattes! Pumpkin spice muffins! Pumpkin spice doughnuts! Pumpkin spice bubble baths! And now… PUMPKIN SPICE ANALYTICS!
Making fun of the prominence of pumpkin spice seems to be the cool thing to do. The silly thing is, it seems that all this vitriol towards pumpkin spice is actually making it more popular. Take a look on my story below to see what I mean.
September 19, 2014
The purpose of this post is really just because I came up with a dataviz related “Coffee Talk” joke and needed to share it.
If you have no idea why I find this hilarious, check out this classic SNL clip of Mike Myers’ classic character “Linda Richman.” One of my favorite sketches and characters from SNL ever.
If you have any other Coffee Talk jokes, tweet them to me!
EDIT: Just in case anyone actually wants to know the origins of the term “treemap” Iron Viz contestant and data genius Jeffrey Shaffer has us covered:
September 18, 2014
This morning I had the extreme pleasure of talking to a group of smart, talented high schoolers about data journalism. They were at the University of Washington for the Washington Journalism Education Association’s (WJEA) Journalism day. I’m excited to see what this creative group of young journalists will come up with in Tableau Public.
Here’s a viz we made together in about 15 minutes. I used data from Maxpreps on my high school football team. An interesting finding was that Mariner actually lost their highest scoring game of the last decade.
September 17, 2014
If you were at Pimp My Viz, or at least read yesterday’s summary about it, then you may recall that I spoke a little bit about using the Spotify Web API to pull data into Google Spreadsheets. My partner (and author of this excellent tutorial about bring JSON into Google Spreadsheets) alerted me to the existence of these New York Times APIs yesterday. They have APIs for a number of different things but the ones I think you could get a LOT of interesting data out of are the Best Sellers API, Campaign Finance API, Congress API, Movie Reviews API, and Real Estate API.
Now go forth and do awesome things with data!
September 16, 2014
I had SOOOOOO MUCH FUN being Xzibit for a day and getting to pimp some vizzes last week! Thanks to everyone who came and hung out with me. For those who missed it, here are the vizzes I pimped and some information about what I did with them.
Mat Hughes’ music dashboard
/r/tableau regular, Mr. Mat Hughes, sent me this great little dashboard of his music listening as tracked by last.fm. I wanted to make it more obnoxiously obvious that it was about music, so when I was done, it looked like this:
Here’s some of the stuff I did:
- Style stuff:
- I got the background image by doing a Google search for “Ghetto blaster.” I took one of the images I liked and used Image Trace in Adobe Illustrator so that I could stretch it out to the size I needed for the dashboard without it getting pixelated.
- I got the font for the title from DaFont and added it to the background boombox image. You can’t embed custom fonts in Tableau (yet…but if Santa exists, maybe one day!) so putting the title as part of an image is how to get that custom look. Custom fonts are one of the easiest ways to make a viz more pimpin.
- I used the eyedropper tool in Adobe Illustrator to find the background color of the boombox and matched the formatting of my sheets so that the background color of the sheets matched the boombox. I floated all the sheets on top of the boombox image. I refrained from using two pie charts so that the viz community wouldn’t try to assassinate me.
- I consciously picked the green/yellow/red color scheme so that the bar chart would look like an equalizer.
- Other stuff:
Lari’s Disney Dashboard
The story behind this dashboard is that Lari McEdward, Tableau instructional video extraordinaire, and her sister were trying to choose a Disney movie to watch and resolved to make the decision by choosing the movie with the best songs. They judged all the songs and created this pretty-in-pink viz. Here’s my pimped version:
Here’s some of the stuff I did:
- Style stuff:
- I put the whole thing is mother fucking castle! Because, obviously, that’s key.
- Again, the custom font title does a lot here evoke the Disney feeling. This one is called Waltograph and I found it at DaFont.
- I liked that Lari had used some pinks and purples, so I kept that and added another pink hued custom color palette for the treemap on the right.
- Other stuff:
- As important as Lari and her sister may think their opinions are, I thought the data was a little misleading and not really a TRUE measure of a song’s actual popularity. I wanted to add a somewhat less subjective metric in there, so I added in Spotify popularity. I got this data by getting all the URI’s for the songs and feeding them into the Spotify Web API and extracting the popularity out of the JSON file. I used this super handy method of turning JSON into a Google Spreadsheet. You can see the resulting Google Spreadsheet here if you want to try to reverse engineer it.
- I did something a little different for the tooltip hover helps in this one. Bringing in fairy godmother images as custom shapes led to them being way too grainy, so instead I added them as background images. I then used a transparent shape in the middle of the plot to hold the tooltip help menu.
- I put in a special little Easter egg for if your filters get funky. See what happens when you bring Spotify down all the way and Lari’s rating up all the way. I document this trick here. I drew that friendly little NPC onto the background image. Since everything is floating on top, when the filters make the charts disappear, Toad appears!
Tweet me if you want more info on any of this. Hopefully you picked up some fun tricks that’ll make your dashboards a little more pimpin! To close, here’s some tweets:
Huge thanks to everyone who came out to see me, Peter, and Andy for our blogger panel last week. We all had a blast. It was great to get a chance to goof around with y’all and show you the fun side of data! As promised, here’s some of the resources I promised to round up for you.
- import.io- My preferred method for web scraping. Basically the Tableau of webscrapers. Check out this webinar I did if you’d like to see it in action.
- Kimono- haven’t used it, so this isn’t an endorsement, but I’ve heard good things.
- ScraperWiki- has a really great tool for scraping tweets
Quantified Self Apps:
- Sleep Cycle- I use this to track my sleep quality every night. It’s also a great alarm clock.
- Last.fm- Track your music listening history.
- Reporter- customize questions for personal surveys throughout the day.
- Period Tracker- for those of us of the fairer sex to keep track of data that makes dudes uncomfortable.
- Spreadsheets- track your intimate moments. Hopefully, they are more pleasant than this guy.
- Pornhub Insights- for those of us who just can’t get enough porn vizzes.
- OKtrends- the best damn data blog out there. Data analysis from the founder of OKCupid.
- Darling Data Fabric Collection- Here’s where you can buy the fabric I made my viz skirts out of! Also available as wrapping paper.
And here’s a little of the Twitter action from the session: