2021 Week 10 | Power BI: Violin Plot Custom Visual

Introduction

Thanks for joining us for Week 10 of Workout Wednesday – Power BI Edition.  This week our challenge is to use the Violin Plot custom visual. There are no dependencies on prior weeks for this workout, so feel free to jump right in. 

Custom visuals are additional visuals created by Microsoft and Microsoft partners to extend the capabilities of a Power BI report. They can be added to a report by importing the visual from AppSource or by uploading the .pbiviz file. 

Please note that some Power BI tenants may be set to block the use of custom visuals, or they may only allow certified custom visuals. The Violin Plot is a certified custom visual. If you have trouble adding the visual from AppSource, you can download the .pbiviz file from Bitbucket (choose the file named violinPlot.1.3.0.4.pbiviz).

Violin plots are useful for showing both distribution and density of data. While violin plots typically combine a kernel density plot with a box plot, the Power BI custom visual offers a barcode (strip) plot and a column (range) plot as alternatives. We are going to use a violin plot to visualize average temperature in Denver, Colorado by month in 2020.

Requirements

  • We are using a new dataset this week. Please download the starter Power BI file here.
  • Create a violin plot that displays average temperature grouped by month name. The average temperature value is provided in both Fahrenheit (the field named Avg Temp F) and Celsius (the field named Avg Temp C). You can use either field according to your preference. The example and solution video use the Avg Temp F field. 
  • Use the barcode (strip) plot to show the individual temperature values. 
  • Use the Epanechnikov (default) kernel and a high sampling resolution for the violin shape. 
  • Show lines in the plot for the first and third quartiles and the median.
  • Use a text size of at least 12 points for the x-axis and y-axis labels.
  • Format the tooltip so that the measures display as integers (show zero decimal places). 
  • Title the chart “2020 Daily Average Temperatures in Denver, Colorado”
  • You may choose your own colors, but you must ensure that you have a color contrast ratio of 3:1 between the bars for the individual data points and the kernel density background, between the reference lines for the quartiles and median and the kernel density background, and between the individual data points and the reference lines for the quartiles and median. The WebAIM Contrast Checker or Colour Contrast Analyser may be helpful for this requirement. 
  • Identify the months with the highest and lowest standard deviation.

Dataset

This week’s dataset uses temperature data from the NOAA’s Denver/Boulder Weather Forecast Office. It contains one row of data per date in the year 2020. 

We’ve already created the model for you. All you need to do is download the Power BI desktop file and start building visuals! 

When you open the file, you may notice that there is a second report page containing resources. Please take a look for details on the source data as well as how to import custom visuals and use the Violin Plot visual. 

Share

After you finish your workout, share on Twitter using the hashtags #WOW2021 and #PowerBI, and tag @JSBaucke@MMarie, @shan_gsd and @dataveld. Also make sure to fill out the Submission Tracker so that we can count you as a participant this week in order to track our participation throughout the year. 

Solution

5 thoughts on “2021 Week 10 | Power BI: Violin Plot Custom Visual”

  1. Has the dataset been moved somewhere? I couldn’t find a pbix file for the week10 data set anywhere in the linked file. For some reason, it includes the Week 5 and 7 data though.

  2. Meagan Longoria

    The file is still there. If you click the words “This week’s dataset” in the Dataset section, it will take you to the file in OneDrive. I just checked and it’s still there.

Comments are closed.

Scroll to Top