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

Subsetting: No stats and no message in histograms where there is no data available #40

Closed d-callan closed 2 years ago

d-callan commented 2 years ago

see veupathdb/edasubsettingservice#39 for details on how to reproduce.

previously if there was no data to calculate stats over itd give a 500. that is now resolved, but it now just silently doesnt return any stats. i could imagine a user being confused as to why they arent present, and think we should consider displaying some sort of message for this case.

ryanrdoherty commented 2 years ago

Currently the distribution response for the subset contains, e.g. {"histogram":[],"statistics":{"subsetSize":1,"numVarValues":0,"numDistinctValues":0,"numDistinctEntityRecords":0,"numMissingCases":1}} I feel like maybe the UI should be able to detect this case (no pink bars) and add a message describing why grey bars show but pink bars do not. @dmfalke Is there any reason this is not enough information?

d-callan commented 2 years ago

Not objecting to this becoming a web-eda issue, just pointing out the particularly confusing part for users is likely to be that the stats are missing, more than the pink bars.

dmfalke commented 2 years ago

Perhaps the front end should display something like NA for the stats in this case?

ryanrdoherty commented 2 years ago

I see. Hadn't noticed that we are omitting these values. Dave, since string is an option here (though maybe you require number for number types?), I could just put "N/A" for this case?

  subsetMin?: any # number | string
  subsetMax?: any # number | string
  subsetMean?: any # number | string
ryanrdoherty commented 2 years ago

Talked to Dave about sending JSON null values for min/max/mean props if the subset yields no rows, but this is a pain because of the RAML -> Java code generation. By default, across the APIs we are omitting properties from JSON responses when their values are null; it's hard to turn it back on for just these 3. @dmfalke, can you simply infer that missing = no data for continuous (binned) distributions, and add "N/A" or other message? I think these props (min/max/mean) are already omitted for categorical distributions. Not sure what the UI is there.

ryanrdoherty commented 2 years ago

Dave confirms that the client code can infer no data if these stats are not provided. Closing this issue.

aaronwlsong commented 2 years ago

Checked beta.website, replicated the issue of #39, seems the issue still exists.

image

image

ryanrdoherty commented 2 years ago

@aaronwlsong That's why it's beta :). Please see qa.clinepidb.org

dmfalke commented 2 years ago

These changes haven't been deployed to qa yet. I made an issue for the client side work: https://github.com/VEuPathDB/web-eda/issues/638

aaronwlsong commented 2 years ago

Looks good now on qa. website. Closing ticket.

image

image