The Sparkline
Sparklines are tiny micro line charts without details (like labels or grids) that give us a high-level way to compare trends between categories. The cover image for this newsletter edition shows how two sparklines trending in opposite directions use orange points to denote the high values on each line, while the blue points denote the low values.
Here's the definition from Wikipedia by the inventor of the sparkline, Edward Tufte.
In 2006, the term?sparkline?itself was introduced by?Edward Tufte?for "small, high-resolution graphics embedded in a context of words, numbers, images".?Tufte described sparklines as "data-intense, design-simple, word-sized graphics".
While we don't have to use time series dimensions on the x-axis of sparklines, I've personally found that I use date or date/time values a lot as my x-axis field. Though perhaps this is because I work a lot with time series data in general. There are a lot of great free public data sources that we can use in sparkline data visualizations. Here are a few of my favorites!
Power BI Sparkline Options
There are a few different ways we can add sparklines using functionalities specifically for doing so in Power BI.
On Existing Tables and Matrix Visuals
One of the newer features in Power BI is the ability to add sparklines as fields in our existing standard table and matrix visuals. Because this feature is still in development, you'll want to first enable it through the Preview features menu options. Here's an example of how we can use this nifty functionality in a recent video of my Power BI Weekly series!
领英推荐
The neat thing about the built-in sparklines option is that we can choose between lines and also bars to show our data trends. Below is an example of where bars would be more impactful. Because we're dealing with just four months of time series data points in this (completely made-up) example, the bars do a better job showing that there are fewer data points. This is especially true when we compare them to the lines, which can more readily hide the fact that there are only four months of data.
There are, however, many scenarios where using lines makes a lot more sense. Especially if the sparklines show the trends over many time periods, lines can be a bit easier to read and less cluttered than the same sparklines with bars instead of lines.
Custom Sparkline Visual
I mentioned earlier in this article that the built-in sparklines are a more recent addition to the available Power BI functionalities. Before these were available in Power BI directly, there were also custom visuals that enabled us to set up sparklines. One of them was the Sparkline by OKVIZ visual. In the Data Dashboards in Power BI course, I show how to use sparklines on data from the US Census (which I also use throughout the rest of this same course).
Up Next
Thank you to everyone who subscribes and reads my newsletter! I try to publish it every week, but that doesn't necessarily always happen with other ongoing concurrent work projects and courses that I'm also working on. The sparklines in this newsletter, in particular, are exciting to share because they're right in line with the time series analysis course I'm preparing to record before the end of the year. Stay tuned for updates on that course and each of my upcoming Power BI Weekly videos as well!
-HW
Attended PPA Business School
2 年Divine Damango
Attended PPA Business School
2 年Meeting today morning and I am not sure
Epidemiology & Biostatistics Consultant a/k/a Data Scientist | Exclusive and innovative solutions for data science challenges in public health, research and education
2 年Thank you for highlighting sparklines! When I first read about them from Tufte, I wondered: How could I see this done in practice? Your use-case with the fruits is logical - if you are in a business where you care about the ups and downs of fruit inventory (which is kind of hard to imagine for me, I admit). Here is a great example from the home page of Coinbase, a crypto trading platform. This is a use-case where I see sparklines as VERY USEFUL!
The Space Data Guy ???
2 年Edward Tufte created a lot more stuff than I realized. Sounds like something I need to dive into! Do you know of any Python or R packages to create sparklines?