Measure vs. Measure Scatterplots (3.28+)

  • 27 August 2015
  • 65 replies
  • 2715 views

Userlevel 5
Badge

As of version 3.28, you can now plot measure vs. measure scatterplots. This can be done by hiding the dimension(s) in the data table from the visualization.


For example, say you have this data table:



In order to chart Orders Count vs. Order Items Total Sale Price, you will want to hide Users Age from the visualization by selecting Hide from Visualization from that column’s gear dropdown:



After selecting scatter from the chart icon options, you should see a chart like this!



65 replies

Userlevel 1

Is it possible to show the hidden field in the tooltip? or to colour each dot in the plot by category?

Userlevel 2

Hey Paul,


This is not currently possible but I have passed the idea along to product and engineering for consideration!


Best,

Nicole

+1 for this. Also, the ability to have a dimension vs. dimension scatter plot, and include a 3rd/4th/etc dimension in the tooltip.

Userlevel 2

+1 for the dimension vs. dimension scatter plot and tooltips.

Userlevel 2

+1 to Paulb’s request. Having the ability to color and affect size would be really helpful in conveying a clear, but complex data story in a single chart.

+1 to paulbp’s request to see the hidden dimension as a tooltip.

+1 to this. I have to revert to R at the moment to do decent scatter plots. In R you can use dimensions/measures to set the size, color and shape of marker - I really miss this in looker. I especially miss not being able to plot dimension v dimension with measure dictating the size of the point.

+1 to this, dimensions as tooltip is a must have

It would also be useful to pivot a measure/measure scatter plot by a dimension

Userlevel 4

Is the pivot desire in order to facet the result set by something like color? Just trying to understand what you are trying to do so we can incorporate it.


[For others above:] Tooltips work is currently in progress.

Yes, pivoting for color was my attempted use case.

Userlevel 4

Makes sense, we have some plans to tackle that via color faceting row-by-row rather than forcing a pivot, so hoping the tooltip work, et al tackles this use case as well. Will update here as work is completed.

+1 for this. The scatterplot visualizations for measure vs measure are very difficult to use without useful info in the tooltip.

+1 the ability to pivot when comparing measures, e.g. a color key for different dimension values of the plotted items.

+1 for the color coding, tooltip usage (that should accommodate for more than one hidden series) and size control! 😎

Userlevel 2

@weitzenfeld and @herdrick: You can convert any dimension to a computed measure by including a measure in the computation. For example, if you have a measure count and a dimension year, you can make a computed measure by adding and subtracting count to/from year. Effectively you’ve added 0, so you wind up with the same value as year itself, but, because you included a measure, Looker views the computed field as a measure and you can do with it whatever you can do with measures. Then you hide the original dimension year from the visualization and you’re done.


When doing this, make sure the measure you’re adding and subtracting is never null (or use coalesce), else your result will be null.

Userlevel 1

I just came across another use-case where this would be extremely helpful. +1 to having the ability to pivot a measure/measure scatterplot in order to shade by color, etc.

+9000 for this!

+1 to paulbp’s request to see the hidden dimension as a tooltip.

+1 for having the dimension name in the tooltip. Otherwise, I can see the outliers but don’t know what they are! Plus I would want to be able to drill from that dimension from the scatter plot in order to get more information about it!


My scenario is - I am looking at communications sent by the marketing team, and wondering on which device they are getting read - would like to scatter the number read on the mobile v. desktop then hover over the data point and see which email it is. Obviously, if more people are reading it on mobile I want to know that. And then click on the data point to see more information about this communication.


Thanks!

Userlevel 2

Hi @Mark_Goodwin,


I’ll let the product team know that you’d like to have the dimension name in the tooltip. As for drilling down by clicking a data point, that option is available! You’ll want to use the drill_fields parameter in the dimension that uniquely identifies your emails: https://docs.looker.com/reference/field-params/drill_fields


Best,

Chris

+1 for this! Hugely useful to know what dimensions the plotted points correspond to in a measure vs measure scatterplot.

Userlevel 2

Thanks for the upvote @Avocet! I’ll pass that on to the product team 🙂

Userlevel 4

Some custom html and Liquid might help with some of the tooltip requests:


Here’s a simple example but could be expanded and made more fancy:


  measure: order_count {
description: "A count of unique orders"
label: "{% if users.age._is_selected %} Details {% else %} Order Count {% endif %}"
type: count_distinct
sql: ${order_id} ;;
html: {% if users.age._is_selected %}
<font color=red>Age:{{ users.age._rendered_value }}</font>, <font color=yellow>Order Count:{{ order_count._rendered_value }}</font>
{% else %}
{{ order_count._rendered_value }}
{% endif %};;
}

When Age is selected:


VS when it is not:

Userlevel 2

Great add here @shiggins! This is another good post as well to show other fields in the tooltip using our rendered_value type liquid reference.



Here it is used to concatenate a percent of total value and the string “of total” to show a nice additional data point in the hover without affecting the ability to plot the original Total Gross Margin measure values

Reply