Skip to content

Slopegraphs in Tableau

2013 December 11
by Ben Jones

Andy Kirk of Visualising Data recently blogged and tweeted about his addiction to slopegraphs. In a show of support, I re-created his Barclay’s Premier League comparison chart, followed by a quick how-to tutorial below. Using the slopegraph with an added drop-down selection filter, it’s easy to figure out why Manchester United has performed so poorly in comparison to their first 15 games of last season: it’s their anemic offense.

Change the Select drop-down to “Goals For” and “Goals Against” and see which one changes the most:

Now, heres’s how to make it:

Step 1: Get the data

The Barclay’s Premier League site includes league tables for each season up to a chosen game number:
barclays

The teams’ results up to game 15 for both the 2012/13 and 2013/14 seasons were copied and pasted into an Excel spreadsheet, with an added column for Year:

rawdata

Notice that this spreadsheet is structured differently thank Andy’s. Andy had one column for 2012/13 results and another column for 2013/14 results. I’ve structured the spreadsheet in this way so that I can use Year as a Measure in Tableau.

Step 2: Connect Tableau

This is a very straightforward step: Open Tableau, click Connect to Data, and find your Barclay’s results spreadsheet.

Step 3: Create a parameter and matching calculated field

Before creating the slopegraph, let’s make a Parameter that will allow users to choose which stat to chart.

Right click anywhere in the Dimensions or Measures panel to the left and select “Create New Parameter”

Fill out the dialog box as shown below:

parameter

Click OK, and then right-click the newly created Parameter in the area to the bottom left and select “Show Parameter Control”.

You’ll see a drop-down select appear in the upper right. You can use this to change the value of the Parameter.

We now need to create a Calculated Field to link to the different team stats based on the user’s choice. Right-click on the Parameter and select “Create Calculated Field” and fill out the dialog box as shown below:

calculatedfield

Step 3: Create the basic slopegraph

Now that we have this “Selected” data field mapped to the Parameter, we can use it to create our basic slopegraph as follows:

  1. Drag “Year” to the Columns shelf, and change it to Discrete (blue pill) by clicking the down arrow and selecting “Discrete”
  2. Drag the “Selected” calculated field to the Rows shelf
  3. Change the Marks type from “Automatic” to Line
  4. Drag the “CLUB” Dimension to the Detail card and resize the view (making it wider)
  5. Drag another instance of the “CLUB” Dimension to the Label card, and then click on Label and select “Line Ends” in the “Marks to Label” area

Step 3, #1-5 are shown below:

basicslopegraph

Step 4: Add line coloring and thickness

In order to make the lines one color for increasing values and another c0lor for decreasing values and change their thickness based on the magnitude of the change, we’ll need to create three more calculated fields as shown below

“Delta”: The first calculated field computes the change in value of the selected statistic from one year to the next:

delta

“Direction”: The second calculated field gives one string for increasing values and another for decreasing values. This will be useful for coloring the lines

direction

{UPDATE} A comment from Jay below resulted in a change from “Direction” to “Better or Worse”, in which the color is dependent on whether a team got better or worse, not whether the chosen statistic increased or decreased:

betterorworse

“Magnitude”: This final calculated field yields the absolute value of the change, or the magnitude. This will be helpful for making lines thicker or thinner based on the magnitude of the change:

magnitude

Now that these fields are created, let’s do the following to complete the slopegraph itself:

  1. Drag “Direction” to Color
  2. Drag “Magnitude” to Size
  3. Drag “Selected” to Label and change the Label so that the Club name and the value are in line with a comma separating them
  4. Filter out the Clubs that were either promoted or relegated after the 2012/13 season
  5. Clean up the fonts (change them all to Gill Sans MT)

Step 4: #1-4 are shown below:

finishedslopegraph

I’ve also formatted the tooltips to yield a nice result when mousing over any of the line ends, and I’ve hidden Marks that were placed in awkward positions on the slopegraph that I couldn’t adjust.

Step 4: Design the dashboard

Now that the Slopegraph itself has been created, I prefer to place it on a Dashboard, add the Parameter control and a Drop-Down filter for Clubs as floating dashboard objects, and add a title and data source / reference information at the bottom:

finisheddashboard

With this view, we can do a whole lot more than find out what’s behind Manchester United’s poor performance, we can also notice other big changes, such as Liverpool’s suddenly prolific offense (Select “Goals For”), or Southampton’s dramatic improvement in defense (“Goals Against” through 15 drops from 32 last year to only 14 so far this year).

This is the value of the slopegraph. It allows us to make a whole host of point-to-point comparisons, and the largest magnitude changes literally jump to the surface.

In closing, many thanks to Andy for this awesome work and for coming clean about his love affair with this neat little chart type.

Best,
Ben


Tapestry 2014 Announced

2013 November 6
tags:
by Ben Jones

annapolis-maryland-innOne of the best things about joining Tableau at the beginning of the year was that I got to be a part of the inaugural Tapestry Conference in Nashville. For those of you who don’t know, the goal of Tapestry is to bring together a handful of journalists, academics and practitioners who are all interested in this emerging thing called “data storytelling”.

Tapestry’s rookie year was a big success, and I’m excited that we just announced it’s coming back for a sophomore season.

Tapestry, part deux will be held on February 26th, 2014 at the Historic Inns of Annapolis. It’s a one day conference with a nominal $100 fee to help partially defray the costs of the conference. Attendance is invitation-only since the venue is so small – more on that below…

 

What was so great about Tapestry 2013?

Here’s what I liked most about last year’s event:

  • Great speakers meant great presentations. Watch the videos and see the slides on the Tapestry blog. My favorite was Nigel Holmes on “Why 29 is such a stunning number“.
  • Small group meant one experience. Everyone in the same room, all experiencing the same conference. No professional tracks. No decisions about where to go. Well within Dunbar’s magic number, so you actually get to know people a little.
  • Boutique venue meant intimate experience. This isn’t your standard convention center experience. No herds, no vendors scanning badges, no forklifts hauling in boxes of swag. Last year we hung out in a converted train station. Seemed like an appropriate place to discuss storytelling.
  • One of the best aspects is that many attendees also presented demos, and this year there will also be a poster session.

What excites me most about Tapestry 2014?

  • We’re building on the momentum of last year. Tapestry was an unknown thing in 2013. This time it’s on people’s radar.
  • All three of the above still apply to this year’s conference.
    • Keynotes by Alberto Cairo, Aron Pilhofer and Jake Porway. That says it all, no?
    • Keeping it real…small. Dunbar’s number won’t be broken for a 2nd straight year.
    • Next year we’ll be staying at the Historic Inns of Annapolis. Check out the website to get a sense of the setting.
  • There’s been a lot of focus on “Data storytelling” in the past year, so there should be even more material, tools and ideas to discuss.

How can you get involved?

It’ll be a little bit like Willy Wonka’s Golden Ticket due to the limited space (100 will technically fit in the meeting room, but only barely), so if you want to go, submit a request for an invitation on the Tapestry website and keep your fingers crossed. Bonus points if you have something to contribute in either the demo session or the poster session. Tweet about it using the hashtag #tapestryconf, and get involved in the extended conversation.

Hope to see you there!

Ben

 


A DataViz Book Trifecta

2013 September 30
by Ben Jones

Data visualization touches many disciplines. Engineers, business practitioners, journalists, researchers and academics are all using graphical representations of numerical information to discover and communicate. There are many tools and resources available, and I’ve found the following three books helpful to give a sense of the overall picture of “data viz” right now.

datavizbooks3

Why are these three books particularly complementary? They give three different views of this emerging discipline – the view of the analyst, the view of the journalist and the view of the technologist, as follows:

  • The analyst seeks to convey information accurately and clearly. The 1st book shows how to visualize data “right” (and how to avoid doing it wrong).
  • The journalist is interested primarily in attracting and engaging readers. The 2nd book is a journalist’s bible for doing just that with data.
  • The technologist is interested in pushing the boundaries and innovating. The 3rd book gives a glimpse into the lives of 24 such geniuses.

To be fair, this is an oversimplification, and all three books touch on all three aspects to some degree. But each book has it’s primary focus and perspective. I highly recommend all three. It would be best to read them in order. Here they are:

1. Creating More Effective Graphs - Naomi Robbins (2013)

Creating More Effective Graphs

What it’s about: This book is about how to make charts and graphs that avoid common pitfalls and effectively communicate quantitative information in visual form. The emphasis is on clarity and accuracy.

Who it’s for: This book would be a great resource for students, analysts and journalists who are new to communicating data in visual form. More experienced visualizers will also benefit from a review of best practices.

What I liked about it: Naomi doesn’t just tell you what’s better, she shows you. She shows you a poorly designed chart (all bad examples have a stop sign labeled “NOT Recommended”) and then she asks you a question or two about the chart, such as “What do you see when you look at Figure 6.2?” In this way, she engages the reader to think. Naomi does a great job advocating for her favorite chart types: trellis plots and dot plots.

What could have been better: Naomi does such a great job with black and white, but color would be even better. Also, the examples are all individual charts; I’d love to hear her thoughts on multi-view interactive dashboards.

 

2. The Functional Art – Alberto Cairo (2012)

The Functional Art

What it’s about: “An introduction to information graphics and visualization”, this book covers a wide range of topics, from visualization principles to journalism to the biology of the human visual system. It’s divided into four parts: foundations (from data to encoding to understanding), cognition (how the eye and brain process images), practice (creating static and interactive pieces), and profiles (interviews with experts who practice or study visualization).

Who it’s for: While this book will be illuminating for anyone, it’s primarily useful for journalists in my opinion. I believe analysts and practitioners could benefit by learning how to present information in an interesting and engaging way.

What I liked about it: I thoroughly enjoyed Alberto’s accounts of the creation of various examples of stunning data journalism, complete with richly detailed color images. This is his background, and it’s where he really shines.

What could have been better: Not much, though I didn’t feel the sections on anatomy added much value for me.

 

3. Beautiful Visualization - Edited by Steele and Iliinsky (2010)

Beautiful Visualization

What it’s about: This book gives you a sneak peek into the world of two dozen experts who are pushing the limits of data visualization. Each expert tells in their own words how visualization is being used to understand and present complex relationships in data. The techniques used are novel and innovative, and the images that emerge are mesmerizing.

Who it’s for: This book is for anyone who wants to understand what’s happening on the fringes of “Data Viz”. This book complements the other two because any thriving field needs creative thinkers who are trying new things.

What I liked about it: It reads more like an RSS feed reader than a book – I liked the constant, fresh perspective by the various contributors, and I learned a lot about visualizing networks.

What could have been better: So much has happened in this field since this collection was published in June, 2010 that another version is warranted in my opinion. This book whets your appetite for more.

 

Have you read any of these books? If so, what are your thoughts? Are there others you strongly recommend, and if so, why?

Thanks for stopping by,

Ben


The Briefing Room: FEMA Disasters in the U.S.

2013 September 17
by Ben Jones

I had the privilege of presenting on The Briefing Room today (view the full recording here). Here is the dashboard I built about floods in the U.S. as part of The Briefing Room with Eric Kavanagh and Robin Bloor.

It’s an example of an “exploratory” dashboard (as opposed to an explanatory one) that allows you to see where different types of disasters have occurred since 1953, and how their occurrences were spread over time. The default view shows floods, and you can use the drop-down filter to change the map to show hurricanes, or storms, or earthquakes. You can also show all declared FEMA disasters, in which case you’ll find that I wasn’t so dumb to leave Los Angeles County earlier this year.

The point of this data dashboard is that you can take a story like the floods in Colorado, find the data from the FEMA site, download the spreadsheet, create an interactive data dashboard in publish it to your website in a very short amount of time. The demo took about 10 minutes, and I’d say that it took me a total of 1 hour to create the fully formatted version that you see here:

Here are the slides from the presentation portion, entitled “How Data Visualization Enhances the News”

The briefing room how data visualization enhances the news from dataremixed

Thanks,
Ben


7 Pioneers of Data Visualization

2013 September 7
by Ben Jones

I’m delighted to be able to deliver a presentation this coming Monday at TCC13 at 4pm called “7 Things We Can Learn from the Pioneers of Data Visualization”. The timeline and visualization below reveal the seven pioneers we’ll be considering, but I won’t reveal the “7 things” we can learn from them until the session itself. If you’re at TCC, be sure to swing by the Chesapeake 4-6 conference room to hear what they are. Suffice it to say that anyone who has ever tried to change their corner of the world by communicating data to others will make seven new friends before the session is over.

See you there!
Ben


How to View your Website Stats in Tableau

2013 August 27
by Ben Jones

DataRemixed.com turns 2 today(!), so I’m giving my website a little more breathing room by increasing the overall width of the site. Now I’ll be able to publish wider visualizations and interactive dashboards, which should hopefully result in better overall quality. By all means, hold me to it!

Last year, when DataRemixed turned one, I published 4 DataViz Blogging Lessons Learned. I re-read it today and I still stand by those words a year later. If anything, I’d add a 5th lesson – “Add your unique perspective”. Charles Joseph Mindard was a civil engineer and built canals and railroads. Is it any wonder that he made great flow maps after his engineering career was over? Flow maps were part of his DNA by that point. What is your unique perspective, and how does it inform your best work?

This year, I’m taking a look back at the usage of this site in its second full year of existence. Using Tableau Desktop’s Google Analytics connector, I pulled in data about my website and created this interactive dashboard, which I’m happy to share with the world:

What are my key take-aways from this dashboard?

  1. Be Helpful. Look at the top 6 destinations. 4 start with the two simple words “How to”. It’s as simple as that.
  2. Think about SEO. Google is the #1 source of traffic for my website. What does it look like to a search engine?
  3. Data Viz is global. My site is a very small corner of the world wide web, but visitors from 155 countries stopped by. Incredible

Taking #1 above seriously, let me show you how I created this dashboard. Chances are you care about your website stats more than you care about mine, so the next section includes a detailed dashboard walk-through so you can do the same. You’ll need Tableau Desktop. If you don’t already have it, you can get a 14 day trial here. If you’re a student or a member of IRE, you can get it for free. You can also open and explore my workbook if you want by clicking on “Download” in the bottom right corner and opening the .twbx file in Tableau.

Here goes.

How did I make it?
This slideshare document walks you through the steps I took to build this interactive web traffic dashboard. Click to the right of the slides to advance them one by one:

I hope this was a helpful tutorial, and please let me know if anything was unclear, or if you have any suggestions to make this dashboard even better.

Thanks for stopping by,
Ben


Worldwide Open Data Sites

2013 August 8
by Ben Jones

Hi, it’s been a while since I posted last! The Tableau Public team has been busy launching author profiles (here’s mine) and expanding the free application’s data limit from 100k rows to 1M rows, so I haven’t posted very often this summer. After wrapping up another project I’m working on, I’ll pick it back up again here at DataRemixed.

In the meantime, I thought I’d share a handy dandy tool that helps users find Open Data sites around the world.

In researching sites to give users who are looking to find data to play with, I came across a data.gov website called “Open Data Sites” that provides a csv file containing a bunch of links to sites (292 294 of them) from different countries (48 50 different ones, to be exact). To get to the sites, you have to download the csv, open it, and click the links. Not the best workflow, so I created this viz to ‘lean out’ the process, which I hope you also find useful:

If you know of other useful sites to find publicly available data sets, I’d love it if you’d leave a comment for everyone else’s benefit.

Thanks for stopping by,
Ben


Remixing it up in New York

2013 July 5
by Ben Jones

Earlier this week I had the pleasure and honor of presenting after Giorgia Lupi of Accurat at Data Visualization New York. My presentation focused on how to use Tableau as a data discovery tool, and luckily for me, the amount of data about New York is as abundant as everything else about the city. There was no shortage of material, from garbage to graffiti to rat sightings and electric consumption. New York hiccups, and it gets recorded.

Sharing data on the web with Tableau Public is both my job and my hobby, but this presentation allowed me to demonstrate how quickly Tableau allows users to find insights in data. Data discovery is a very important part of the overall process, which I conceptualized as a horse race track:

data_discovery

I made the analogy that using Tableau is like riding Secretariat – you get the distinct advantage of being able to race around the track a rapid rate, transitioning between the phases and quickly identifying patterns, outliers and trends in your data.

I also made a somewhat philosophical point that data is only one type of input in the overall learning process. Using data has its benefits and limitations. A benefit is that you can obtain valuable “explicit knowledge” – who, what, when and where? A limitation is that it’s often difficult to answer “why?” and “how?” using only data. Consider riding a bike: what’s a better way to learn, reading about it or doing it? And consider New York: no matter how many charts you see about the city, nothing replaces the unique experience of walking its streets and riding its subways. Tacit knowledge. Often the best outcome of data discovery is that you know what questions to ask in the analog world.

learning_process

Here is a diagram showing the overall learning process, and how data fits in as a specific type of input:

As I mentioned, there was a wealth of data to explore and visualize about New York. I explored a number of those data sets, and here are a few of the projects I recreated during the 1 hour time slot I was given (focus was on learning, not fit & finish).

Click to open an interactive version:

1. “Know what” – Garbage data: DSNY Collection Tonnages (get the data here)
dsny_collection_tonnages

2. “Know where” – The Bridges of NY & NJ (get the data here):
bridges_ny_nj

3. “Know when” – Rat sightings in NYC (get the data here)
rat_sightings

It was an amazing and unique experience for me. I had a lot of fun presenting (not shown here is the Homer Simpson bologna viz I created in response to Accurat’s project “A Slice for Everyone“), and I met a number of fellow visualization enthusiasts, including Naomi Robbins. Naomi was gracious enough to sign a copy of her newly reprinted Creating More Effective Graphs, which I am currently reading and hope to review soon.

I’d like to say a special thanks to meetup organizers Christian Lilley and Paul Trowbridge for the invitation to present, and to McKinsey for hosting the event.

Thanks for stopping by,

Ben

 


Beyond the Written Word – IRE 2013

2013 June 22
by Ben Jones

I spent the past few days with some colleagues in San Antonio at the Investigative Reporters and Editors (IRE) Conference training journalists to use Tableau and meeting others interested in data visualization and data journalism.

I also had the opportunity to participate in a panel discussion with Ryan Murphy of the Texas Tribune, Steve Thompson of the Dallas Morning News and Matt Waite of the University of Nebraska-Lincoln.

My core message is that there are different tools for different situations. I’m a big believer that static charts made with Excel and R have their place, and so do intricate and elegant coded visualization masterpieces. I also see Tableau as a unique tool that affords much of the interactivity with a user interface that is easy to learn. A bowl of porridge that’s often “just right”.

Here are my slides from the presentation. As always, these are my nascent thoughts, and I’d love to get your take:

Beyond the written word – visual data in journalism IRE 2013 from dataremixed

Here are hyperlinks to the visualizations and websites included in the presentation:

As always, thanks for stopping by,
Ben


Upcoming Data Viz Contests, Summer 2013

2013 June 12
by Ben Jones

DataViz Competition

Hi all,

There are a number of interesting data visualization contests going on right now that I thought I’d bring your attention to. There are contests for people with different interests: volunteering, healthcare, online transparency and neuroscience. Prizes are fairly generous this time around – trips to conferences, cash, products and software. Here goes:

 

1. Tableau’s Civic Data Viz Contest

  • Challenge: “use Tableau Public to visualize data about your community” (global)
  • Data: links to various sources provided here
  • Winner gets: 3-day trip to TCC13 in Washington D.C. (crowd favorite wins $500)
  • Deadline: June 24, 2013
 
2. Visualizing.org’s Visualizing Online Takedown Requests
  • Challenge: “We challenge you to visualize the removal requests in Google’s Transparency Report”
  • Data: Google Transparency Report
  • Winner gets: $3,250 (2nd place gets $1,250, 3rd place gets $500)
  • Deadline: June 27, 2013, 11:59 pm EDT

 

3. Civic Data Challenge 2013
  • Challenge: “turn the raw data of ‘civic health’ into useful applications and visualizations that have direct impact on public decision-making” (U.S)
  • Data: files available for download here
  • Winner gets: “2013 Prizes will be announced throughout the Challenge” (check the Prizes site here)
  • Deadline: July 28, 2013, 11:59 pm EDT

 

4. 2013 IEEE Scientific Visualization Contest

  • Challenge: “help identify spatial and temporal gene expression patterns in the developing mouse brain”
  • Data: Download here
  • Winner gets: Free full registration for the VIZ 2013 Conference
  • Deadline: July 31, 2013

 

5. Visualizing.org’s Visualizing Hospital Price Data

  • Challenge: “We challenge you to visualize the hospital price data to create greater transparency in the healthcare field”
  • Data: Medicare Provide Charge Data for Inpatient and Outpatient
  • Winner gets: $9,000 (interactive) and $6,000 (static) – see website for full list of prizes totaling $30,000
  • Deadline: August 25, 2013, 11:59 pm EDT

 

Best of luck!  Let me know if I missed any.

Ben