VEuPathDB / EdaLoadingIssues

0 stars 0 forks source link

Data: Back end `continuous-variable` endpoint having trouble with WWARN "publication year" #70

Closed bobular closed 1 year ago

bobular commented 1 year ago

https://qa.restricted.clinepidb.org/ce.restricted.qa/app/maps/DS_24899fbd90

Try selecting 'Publication year' as marker overlay.

/filter-aware-metadata/continuous-variable

{
    "config": {
        "metadata": [
            "binRanges"
        ],
        "variable": {
            "entityId": "EUPATH_0035127",
            "variableId": "MI_0886"
        }
    },
    "filters": [],
    "studyId": "WWARN-1"
}
d-callan commented 1 year ago

if this is very important for demo, ill move it up

asizemore commented 1 year ago

So far i know that this var gets read in, then class(x) = 'character'. The getDiscretizedBins function does not like characters. It's happy with dates but for it to do it's date things, class(x) must be 'Date'.

asizemore commented 1 year ago

var type and shape are right. My next wonder is - when we use other date vars wiht getDiscretizedBins, are we setting the class as date elsewhere? In the normal plot.data functions we have the var map tell us that the var is type=date. One fix could be just checking to see if it's a date and then assigning it's class to 'date'. But i want to make sure its truly just a product of this function being called without any var processing on the input.

asizemore commented 1 year ago

The other two "year" vars in this dataset are annotated as integer, continuous, whereas the publication year is date, continuous. That's why it seems as though two of three year vars are "working".

d-callan commented 1 year ago

I think we just ask data loading to make this an int too then. I don't see much benefit to them being dates if we only know the year..

steve-fischer-200 commented 1 year ago

Check with @jaycolin to see if he forced this variable to be a date. He should not

Add to the SOP that

jaycolin commented 1 year ago

publication year now loaded as integer

bobular commented 1 year ago

Looks solved - thanks Jay!

Image