The-Strategy-Unit / nhp_evidence_maps

Shiny app: NHP evidence map
https://connect.strategyunitwm.nhs.uk/nhp_evidence_map/
Other
1 stars 0 forks source link

Handle waffle production error given 'low' sample size #33

Closed matt-dray closed 6 months ago

matt-dray commented 7 months ago

Try to understand error message in the Summary Table tab when n is too small to produce a waffle chart.

Currently, the error message 'The sample size is too low for this dataset, it must be at least x' is printed, where the value of 'x' changes depending on the selections made in the dropdowns.

You can replicate this by e.g. selecting a single year from 'Select Year' and then click a cell in the table.

I'm not sure why a waffle can't be produced in these instances. Surely we should get a chart even if there's only one block in the waffle?

Either solve/prevent, or provide a nicer message.