United4Surveillance / signal-detection-tool

A tool for detection of signals in infectious disease surveillance data.
Other
4 stars 0 forks source link

[BUG] Legend in the map visualisation not fully correct #202

Open tinneuro opened 3 months ago

tinneuro commented 3 months ago

Describe the Bug

bug_map_plot Somehow in the legend for the alarms in the map the "No alarms" has blue and white which is not so bad but the "At least 1 alarm" has a red and a blue line.

To Reproduce

Steps to reproduce the behavior:

  1. load the test data into the appp
  2. select county or community as stratum
  3. look at the map in the signals tab

Expected Behavior

For "No alarms" it should be only a blue line For "At least 1 alarm" it should be a red line

Screenshots / Code Snippets (if applicable)

If applicable, add screenshots, code snippets, or logs to help explain your problem.

Environment (please complete the following information):

Additional Context

Add any other context about the problem here.

tomasmartbert commented 3 months ago

IMHO, I actually think it is fairly good with the red/blue (border/area) coloring of the "At least 1 alarm" since it guides the viewer in what color contrasts to look for: The color legend is nicely guiding to both a line (border) color and an area color, and it is likely true the area color is having some darker shade of blue before at least one alarm is raised. For the "No alarm" legend symbol it might even be consistent and helpful to use black/blue (or black/lightblue) instead of blue/white, to indicate a black/blue (border/area) contrast.

tinneuro commented 2 months ago

Thanks @tomasmartbert for your feedback. When I look at it from that point of view then yes maybe it is a good legend. I was just confused when I looked at it for the first time. The only thing is that also for the "At least 1 alarm" it could sometimes be that the area color has a lighter color than that shown in the legend. In this plot it fits quite well. As you say black/blue for "No alarm" could be a good idea.

tomasmartbert commented 2 months ago

Thanks @tomasmartbert for your feedback. When I look at it from that point of view then yes maybe it is a good legend. I was just confused when I looked at it for the first time. The only thing is that also for the "At least 1 alarm" it could sometimes be that the area color has a lighter color than that shown in the legend. In this plot it fits quite well. As you say black/blue for "No alarm" could be a good idea.

"At least 1 alarm" would require some minimum number of cases by definition so I think it is likely the area color is fairly dark. But the same issue would then also be for "No alarm" even if using black/blue, as it could also be the area has no cases hence is white on the map.

It's probably not a good sign it confused when looking at it for the first time :-D Perhaps a better solution is to color the legend only according to the border color (the area color is already in the case legend), i.e. [black line] No alarm [red line] "At least 1 alarm"

What do you think?

tomasmartbert commented 1 month ago

Note, it looks good in the html report! The signal tab and report ought to be synchronized(?) image