Visualizing current value with high and low across different scales
Bar charts are great tools for visualizing precise quantitative comparisons, but in certain instances they can be problematic. For example, if the difference in the data is very small then other chart types are often better, for example a dot plot. To further complicate things, let's imagine that the scale of the things being compared are all very different. A common example is stock price. When looking at a portfolio of stocks, the most common metrics are the current stock price and the 52-week high and low. Each stock is on a different scale. Their prices are vastly different and the range between the low and the high will be different. Below is a bar chart comparing the current stock price of Berkshire Hathaway (BRK.A) at $268,000 per share to the price of Kroger (KR) at $24 per share. It just doesn't work for this kind of data and using a dot plot in this case won't solve it either.
Most any website providing stock information offers the same basic information, typically in a table format. I am going to focus on the current stock price and the 52-week high and low. Here is the stock price information for Tableau Software from Yahoo Finance.
If looking at the price of a single stock over time, then one of the standard stock charts is a candlestick chart. This type of chart is specific to stocks and it shows the high and low price and the open and close price over time.
Once you are familiar with this chart, it is easy to see the range of the stock price over time (assuming you aren't colorblind). But here's the challenge, what if you wanted to see the current price at a single point in time and where that price is in comparison to the overall range of the 52-week low and high, AND do it for multiple stocks that each have very different price ranges like Berkshire Hathaway and Kroger? Not an easy problem to solve.
One solution is to normalize the data in a way that it can be condensed. First, we imagine the 52-week low to be 0% and the 52-week high to be 100% and then we can plot the current price in between. However, instead of actually converting them to 0% and 100%, we show the actual values. This allows us to make a relative comparison across multiple stocks, but still enables us to see the high, low and current price within that range.
Fidelity offers this type of view on their website. I decided to create my own variation of this using Tableau along with a few tweaks. I show the stock symbols in alphabetical order, followed by the current price. The shaded bar shows the range from the stock's 52-week low to the 52-week high and the blue dot plots the current price in relation to the low and high.
It is now easy to see where each stock relates to its 52-week low and 52-week high. Chipotle is very close to its 52-week low while Adobe and Nvidia are very close to their 52-week high. You will also notice that this version is great for mobile design too. The chart works very well in a small space making it great for dashboards or allowing for a vertical scroll on mobile.
This type of chart could be used to compare lots of different things, any product or service with a current or average price, and comparing within a range (low and high price). For example, different products sell at different price points; automobiles with different models, hotel rooms, class of service on an airline, tickets to an event, etc. In each case there are likely pricing tiers, a current price and a range of historical pricing.
Building in Tableau
I will save the detailed instruction for another post. This one is a bit tricky with lots of little details to get the bar, dots and labels to work just right. It might be a good Workout Wednesday exercise for those fo you who follow Andy and Emma. In the meantime, if you just want to take apart the workbook you can download it from Tableau Public here.
I hope you find this information helpful. If you have other ideas on how to visualize this information or if you have any questions feel free to email me at Jeff@DataPlusScience.com