VEuPathDB / plot.data

1 stars 0 forks source link

EDA - histogram app constraints allow an integer ordinal but back end only allows continuous #254

Open bobular opened 5 months ago

bobular commented 5 months ago

production site and dev GEMS 1 visualisation histogram x = Study year

image

Rserve log

2024-03-22 11:37:35.852115 Value is set to `count`. Resulting histogram object will represent counts of unique x-axis bins per group.
Error in validateHistogramPD(.histo, verbose) : 
  The independent axis must be continuous for a histogram.

Variable metadata. (type=integer, shape=ordinal)

image

apps constraints for pass->histogram

{
    "0": {
        "name": "histogram",
        "displayName": "Histogram",
        "description": "Visualize the distribution of a continuous variable",
        "projects": [
            "ClinEpiDB",
            "MicrobiomeDB"
        ],
        "maxPanels": 1,
        "dataElementConstraints": [
            {
                "xAxisVariable": {
                    "isRequired": true,
                    "minNumVars": 1,
                    "maxNumVars": 1,
                    "allowedTypes": [
                        "number",
                        "date",
                        "integer"
                    ],
                    "description": "Variable must be a number or date."
                },
                "facetVariable": {
                    "isRequired": false,
                    "minNumVars": 1,
                    "maxNumVars": 2,
                    "maxNumValues": 10,
                    "description": "Variable(s) must have 10 or fewer unique values and be of the same or a parent entity as the Overlay variable."
                },
                "overlayVariable": {
                    "isRequired": false,
                    "minNumVars": 1,
                    "maxNumVars": 1,
                    "maxNumValues": 8,
                    "description": "Variable must have 8 or fewer unique values and be of the same or a parent entity as the X-axis variable."
                }
            }
        ],
        "dataElementDependencyOrder": [
            [
                "xAxisVariable"
            ],
            [
                "overlayVariable",
                "facetVariable"
            ]
        ]
    }
}

Seems that it should also be allowedShapes: [ 'continuous' ], ?

bobular commented 5 months ago

I think this would affect the map supporting histograms too. I have not been able to find an integer ordinal variable for a mappable study, however.

bobular commented 3 months ago

Shouldn't we just change the histogram constraints in service-eda to only allow shape=continuous, @d-callan ?