VEuPathDB / EdaSubsettingService

A REST service to provide data and subsetting in the Exploratory Data Analysis Workspace
Apache License 2.0
0 stars 0 forks source link

Bug in Browse & subset histogram binning #80

Open danicahelb opened 2 years ago

danicahelb commented 2 years ago

Bug was found in Browse & subset tab histograms. The bin slider allows for selection of bin widths that are not appropriate based on the range of the data

For example: Histogram of Female anopheles count (LLINEUP) → change range to 0-200

The range should not change from the selections the user has made. Instead, the bin width should be auto-adjusted to fit the current range, and a warning message should pop up.

See related ticket for the warning messages: https://github.com/VEuPathDB/web-eda/issues/1274

chowington commented 1 year ago

Looks like this is a backend issue. The distribution request that's being sent is asking for 0-200 range with a bin width of 100:

{
  "valueSpec":"count",
  "filters":[],
  "binSpec":{
    "displayRangeMin": 0,
    "displayRangeMax": 200,
    "binWidth":100
  }
}

but the response contains 3 bins ranging from 0-300:

{
  "histogram":[
    {
      "value":4135,
      "binStart":"0",
      "binEnd":"100",
      "binLabel":"[0,100)"
    },
    {
      "value":4,
      "binStart":"100",
      "binEnd":"200",
      "binLabel":"[100,200)"
    },
    {
      "value":3,
      "binStart":"200",
      "binEnd":"300",
      "binLabel":"[200,300)"
    }
  ],
  "statistics":{
    "subsetSize":20792,
    "subsetMin":0,
    "subsetMax":401,
    "subsetMean":1.7888003861935795,
    "numVarValues":4143,
    "numDistinctValues":73,
    "numDistinctEntityRecords":4143,
    "numMissingCases":16649
  }
}

@d-callan Can you take a look or tag someone else to look into it?

d-callan commented 1 year ago

@ryanrdoherty think this is for you