|

Experimenting with Power BI’s small multiples

Microsoft Power BI tends to do quite frequent updates to their program but most of the time I'm kind of unaware because I don't have a need for the new tricks and I'm not that far along with Power BI to be able to use all of the new stuff. Mainly, I just don't need them.

But there is something called small multiples which is an interesting approach. I'm not 100% keen on how it works but I do see some use for it.

Here's a page of Power BI with a typical line graph comparing multiple countries in one graph on the upper left-hand corner, the multiples version on the right-hand side, and a table of numbers in the lower left.

By the way, the data comes from Wikipedia covering the world's coronavirus data. See the box at the bottom of this post.

 

The main graph on the upper left shows the top ten countries based on the current day's moving average. I have some blue dashed horizontal lines to mark out 2020's summer peak and December 2020/January 2021 peak for the US just to see if summer 2021 would reach those levels, even with vaccination. As you can see, the US's 2021 summer peak was much higher than in summer of 2020. It's quite possible that the Delta drove the higher peaks, but it could also be because people (certain people?) are getting tired of the pandemic and don't want to social distance or wear masks anymore and thus are not as careful as they maybe should be.

In that graph, most of those 10 countries could cluster very tightly such that it would be difficult to differentiate those lines (the US is such an outlier that I've had no difficulty distinguishing its line from the others). Sometimes, to see the individual lines, I would click on the country in the legend to kind of bring that country's line into focus (the other countries' line would fade away). I would go through each country in the legend and click on it to look at that country's line.

The small multiple, found on the right, breaks out each country into its own graphs that are sized the same. They even include the two horizontal blue dashed lines. I copied the typical graph on the upper left, pasted the copy to the right, and then converted that graph into small multiples. To see the graphs for all of the countries, I would have to scroll down using the scroll bar found on the right. See the image below.

There are some visual issues with the small multiples: mainly I couldn't tell when one graph ended and another began. I tried adding in grids, which you will see as a dark black horizontal line, but it really didn't do the job. I finally succeeded by added a light gray background to the grid. The grids and the backgrounds for grid can be found in the formatting section.

So, the fact that I have to scroll to see other graphs, the visualization issues of determining where one graph ended and the other began, and the same color blue line for all multiples are the reasons why I'm kind of meh on the small multiples.

But they will still be useful in breaking out the main graph.

The way to get the small multiples is in the visualizations pane, there is a section called "Small multiples", kind of in the middle, after values or secondary values.


What do you put in there? Well, whatever you would put in the Legend field, you can put in the Small multiples field. So, things like states, countries, products, etc. Small multiples in a sense replaces the Legend.

Sources of Data

WORLD : Cases and deaths from Wikipedia website https://en.wikipedia.org/wiki/COVID-19_pandemic_by_country_and_territory

US and STATES : Five main sources of data are available – Wikipedia, COVID Tracking Project, CDC, JHU, and HHS

COVID Tracking Project: The COVID Tracking Project was a collaborative effort of free labor overseen by The Atlantic. This project ended on 3/7/2021. The Atlantic’s COVID Tracking Project was provided under Common Creative license “CC BY-NC-4.0” and covered cases, deaths, hospitalization, and positivity, amongst other data.
API: https://covidtracking.com/api/v1/states/daily.csv
Table: daily

CDC: CDC has become a replacement for the COVID Tracking Project for me although the data will often come in a few days later. Hospitalization comes in a week later. I’m tracking cases, deaths, hospitalization, and positivity.
Centers for Disease Control and Prevention, COVID-19 Response. COVID-19 Case Surveillance Public Data Access, Summary, and Limitations
Table: rows

API:
Cases and deaths: https://data.cdc.gov/api/views/9mfq-cb36/rows.csv
Hospitalization: https://beta.healthdata.gov/api/views/g62h-syeh/rows.csv (Good data doesn’t start until about 7/15/2020)
Testing: https://beta.healthdata.gov/api/views/j8mb-icvb/rows.csv
Positivity: https://beta.healthdata.gov/api/views/j8mb-icvb/rows.csv

John Hopkins University (JHU): I rarely show these sets of data; I mostly use Wikipedia or CDC but sometimes I like to reference the JHU.

Please cite our Lancet Article for any use of this data in a publication (link)
Provided by Johns Hopkins University
Center for Systems Science and Engineering (JHU CSSE):

https://systems.jhu.edu/

Terms of Use:

1. This data set is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0) by the Johns Hopkins University on behalf of its Center for Systems Science in Engineering. Copyright Johns Hopkins University 2020.

2. Attribute the data as the “COVID-19 Data Repository by the Center for Systems Science and Engineering (CSSE) at Johns Hopkins University” or “JHU CSSE COVID-19 Data” for short, and the

url: https://github.com/CSSEGISandData/COVID-19.

3. For publications that use the data, please cite the following publication: “Dong E, Du H, Gardner L. An interactive web-based dashboard to track COVID-19 in real time. Lancet Inf Dis. 20(5):533-534. doi: 10.1016/S1473-3099(20)30120-1”

Website https://github.com/CSSEGISandData/COVID-19

HHS: Hospitalization data for US – can be US level, state level or county level

url: https://healthdata.gov/api/views/anag-cw7u/rows.csv

Similar Posts