VEuPathDB / EdaNewIssues

0 stars 0 forks source link

Map - no data-related back end data validation error for floating histogram visualizations #733

Closed bobular closed 2 months ago

bobular commented 7 months ago

This could either be solved front or back end. The back end visualization endpoints have two different behaviours when there is no plottable data:

  1. return a 500 with the message "did not contain any data" - the front end recognises this and deals appropriately
  2. return an empty array and empty metadata (counts, bin specs etc)

For some visualizations (e.g. boxplot IIRC) 2. is OK and the back end data validation passes, but in the case below with histogram there's a null where there shouldn't be.

Remember that floating plot requests are on the subset including a viewport filter.

The data scenario that leads to 1 is simple: there is no data at all in the subset in the filter.

For scenario 2 I think the explanation is that there is data in the subset but it contains no values for the overlay variable. So this is similar to an issue we solved for bubble markers recently.

How to reproduce

This one took a while to nail down a reliable reproduction recipe:

Problem: Unexpected backend type(s) encountered: Invalid valuenullsupplied to min (type: number) of binSlider for histogram floater

Study: megastudy Filters: none Mode: donut, bar or bubble Floater: Histogram, x variable = blood meal host prevalence

The error only occurs in certain map locations!

  1. No error in whole world
  2. Error in E. Europe + Asia + China and NO Vietnam

image

  1. No error if you scroll down a tiny bit to include Vietnam

image

  1. No error in Antarctica/Siberia etc

  2. What's different between viewports 2 and 3?

There is some data with blood meal host prevalence values (I added a catch-all filter for that)

image

  1. No error anywhere if the catch-all filter for blood meal host prevalence is applied

  2. What's special about Antarctica/Siberia?

There's no data whatsoever! image

bobular commented 2 months ago

This now seems fixed. Unable to reproduce any more.

Woo!

image

The "antarctica" behaviour is currently broken however, (see below), probably related to https://github.com/VEuPathDB/service-eda/issues/25

image