I was asked to visualize a set of quarterly KPIs for different companies. The main ask was to make a clear comparison between the companies, with respect to the *range* of the KPIs.

Given the fairly high number of KPIs, I ended up going for a tabular approach, with small horizontal bullet graphs inside each table cell, using the Sparkline package in R.
However, I quickly experiences that it was not straightforward to place *Sparkline* objects inside table cells. I finally discovered the wonderful Reactable package, that made it all quite manageable.

# The result

The following table shows the resulting data visualization, with sample data. Each KPI is a percentage value. Each bullet graph corresponds to a whole year, for a given combination of company and KPI. The dark blue part of the bar show the KPI’s range (spans from worst to best quarterly value that year). The vertical black line is the KPI target value, here set to 70 %.

Thus, each bullet graph show the KPI’s quarterly range for each single company. If you look at a whole column at once, you can easily see how the KPI’s range (and level!) varies between companies.

The R code is available here.