top of page

Oil and Gold: Expensive Stuff From the Ground



This week's #MakeoverMonday was a re-imagining of a chart that Andy Kriebel did 10 years ago when he first started using Tableau.

It was about comparing the rising cost of oil and of gold as commodities. The premise was they were somewhat, but not exactly, linked together in value. By building the chart, we wanted to see how this relationship changed over time, and whether the commodities were truly correlated.

Early Returns

The first few things that I saw when people started sending in their contributions on Sunday was that there were some strong statistical elements to the vizzes that were being done.

Charlie Hutcheson created a connected scatterplot chart that was clean and appealing, heavy on emphasizing the correlation between the prices over time. Steve Fenn went in a similar direction but focused specifically on Pearson Correlation Coefficients, which is a thing that I really have no idea about. (I'm not a hard-core statistician; I leave all that to my PhD-holding wife, Jennifer Schumi, who is a hard-core statistician.) Pooja Gandhi submitted a very coordinated, interactive timeline showing the relationships in line-and-area charts, as well as in big-ass numbers. All of these, and many more submissions, were excellent, but they were of-a-kind: clean and functional, well suited to a report or an executive dashboard.

I Just Like to Make the Pretty Pictures

I decided I wanted to go a different route with my contribution. I wanted to go the infographic route: I would use dramatic visuals to tell the story of the relationship between oil and gold prices. I thought that I could show something that looks kind of like an oil slick, but I wasn't sure how to go about it exactly.

I knew from some quick data analysis in Tableau that the price of oil per barrel fell within a pretty small range: $10 to $140 per barrel. The range for gold, though, was much wider; from about $250 per ounce to as high as around $1,800. Obviously these two ranges wouldn't look very good together if you tried to lay them on the same chart right next to each other. It would be hard to see the rise and fall of their relative prices in any immediate way unless they were on different axis ranges, and I did not want to go down that road.

Time-Saver: Applying Techniques From Other Projects

About a week or two ago, I was working on something that Adam McCann first worked on, which was a ternary chart, or a triangle chart. It's useful in a limited range of cases; for instance, when you're trying to display the relative quantities of three different elements within a single observation.

  • For instance, say you have a field. (An actual field. Like, a plot of land. Not a field in a form or a column in a database.) You know that the land in your field is made up of three different types of soil. You measure one sample, and it's, say, 67% one type of soil, 10% another type, and 23% the third type.

  • Then take another sample from another place in the field. You'll still get the same three soil types, but their proportions will be different.

Ternary charts are good and showing things like that, where you want to show the proportions among three things at the same time. Sometimes it's a good alternative to parallel coordinates chart, but the use cases of that particular chart are kind of limited.

Anyway, in creating those charts, Adam used data from the NFL combine; he used players' 40-yard dash times, their BMI measurements, and the count of 225-lb bench presses they were able to complete in order to make a "Faster/Bigger/Stronger" ternary chart. In order to accomplish this, he had to normalize each of the three variables, since one was a speed measured in hundredths of a second between 4 and 6 seconds, one was a derived decimal measurement between 20.0 and 40-something, and one was a count between 0 and 25 (or so). He normalized each variable to a range between 0.0 and 1.0, where "0" represents the lowest (or worst, in the case of "speed") observation for each variable, and "1" represents the highest/best observation.


I used this same technique to normalize the price ranges of oil and gold. That way, I could use a single axis range for both commodities (although I would use negative values for oil, so that I could have mirror-image bar charts), ranging from 0 to 1, that would show the rise and fall of their respective prices, in terms of how close or far away they were from their maximum price within that 34-year range from 1983 through the present day.



Mirror Images

By setting up oil and gold as mirror images of each other (or, in opposition, if you prefer), it would be easy to see if they were generally correlated. If they were tracking together, the image would look like a symmetrical silhouette; if they were not, it would look asymmetrical. The other element that I decided I could add to the display was a line that showed which of the two commodities was closer to its maximum price, and the degree to which it was outstripping the other commodity at that moment in time.

For instance, if gold were at 20% of its maximum value, and oil were at 10% of maximum value, then the line would be on the "gold" side of the chart, at around the "gold +5%" mark on the axis. Including this line would provide an easy way for somebody to look at a chart quickly and say, "Aha, I see that at this point gold is closer to what its max value is than oil is to its max value."

Get Vertical

The other decision I made in order to make this look like an oil slick was to plot it vertically. I am not usually a fan of vertical timelines, but we have recently had a really good example of how it can work: Joshua Milligan's winning entry, "The Changing Shape of History," for the first 2017 IronViz feeder contest. Here we have a super long dashboard that is basically entirely a vertical timeline.


Once I got a look at the way the data plotted out in mirrored bar charts, I realized that the vertical timeline was going to work out really well, since the prices of both oil and gas were relatively low in 1983, and got relatively higher as the years went on; the visual effect of this would be to have the chart look like a pool of liquid getting wider and wider at the bottom--the perfect visual cue for the oil commodity, and not a bad visual cue for gold (bars and coins are the obvious first metaphors for gold, but liquid/molten gold isn't unheard of either).

The Palette Picks Itself

There are colors that just go naturally with oil and with gold, so I made a decision not to over-think it; I chose to use black for oil and a darker gold color for the gold.


I wanted a different background for the oil side than for the gold side, so I created a parameter called [zero] with a constant value of 0 that I could use to put a reference line in the middle of the chart. I made that line invisible, and then had a gray band below it and a yellow-gold band above it to serve as the background.


At this point, the chart looks like the below, which is what I wanted.


Yeah, Kid, But What's Your Story

Since I turned off all of the axes (except for the years), I needed to include some explanatory text. I created tooltips that showed the absolute prices of oil and gold at each month; where each of those prices falls in the range from min-to-max cost; and which of the two commodities is closer to its max price. (It also includes the Consumer Price Index, which I originally considered including as a separate chart. In truth, the CPI mostly just rises consistently over time and didn't seem to have much of an effect on oil or gold prices, so I left it out.)


I also made sure that I included a help button on the dashboard. (There are lots of ways to do this. Here's one by Nelson Davis.) By hovering over the question mark, the tooltip explains, in the interactive version of the viz, that what the bars are showing is not the specific price of a commodity in time, but rather the percentage of the max value for that commodity at that point in time.


Finally, I put some annotations in to show when oil and gold were most outstripping the other, in terms of proximity to max value; and a few paragraphs of explanatory text, providing some description of the chart and its findings, as well as some guesses as to why the patterns shown appeared as they did.

Finishing Touches

From there it just became a case of adding the bits and baubles that would make it pretty. I went on to Pixabay (thanks Adam Crahen for turning me on to them) and found some good Creative Commons 0 artwork for the finishing touches: a good line vector oil derrick that looks really nice here, sitting right on top of the beginning of the oil slick graphic; and some gold bars that look good on top of the gold side of the chart.

I took out most of the shadows in the gold bar graphic (to make it a good transparent object) using Josh Tapley's very simple PowerPoint-based trick for making transparent images. In this case, because I was nitpicky with what I wanted, I did have to do a little bit of Photoshop cleanup, but the PowerPoint trick got me most of the way there.

The last piece was the title bar, which I hoped was a nice bridging of the colors between the left and the right. The way the ampersand in the title breaks up the gradient, and sits right behind the oil derrick--and the way the derrick flows almost directly into the white mid-point line--is an example of things happening to work out just right.

Here’s the final result:


The decisions that I made in creating this were mostly based on me wanting to take a different route than the outstanding submissions I had already seen. The interactive version of this viz probably gives you a lot of the same information as the other submissions, but in a static format it is definitely going to convey, at best, two or three messages only:

  1. Oil and gold used to be more closely tied together, and are now in a more volatile relationship. (most important message)

  2. Oil got really expensive right before the global economic crisis and hasn't quite recovered.

  3. Gold got much more expensive in the mid-2000s and hasn't really faltered.

After having gone this infographic route, I was happy with how it turned out, visually:

  1. The elements I hoped to combine worked well together and, I feel, supported the message of the viz.

  2. I kept myself from adding to many extraneous pieces (i.e., the Consumer Price Index).

  3. I didn't overthink the color palette--sometimes the obvious choices are the best choices.

  4. I left enough additional detail in the interactive version to feel satisfied that an interested observer could get a deeper understanding by drilling down into the viz, but put enough on the screen--especially with annotations and explanatory text--that the viz should stand on its own as a static image.

 

As always, nothing happens in a vacuum in the Tableau community. If you look back over this post you'll see eight different people mentioned by name, each of whom influenced the design and construction of this viz--and those are just the people I can specifically name. All of our work is a remix of others' work, filtered through our own vision and capabilities and creativity and points of view. I'm proud of how this viz turned out, but I'm also aware and thankful that it's only possible because of the uniquely generous and supportive quality of our #MakeoverMonday and Tableau community writ large.

96 views

Recent Posts

See All
bottom of page