Giter VIP home page Giter VIP logo

Comments (20)

seabbs avatar seabbs commented on June 8, 2024 4

Ideally any feedback on this tonight and going live in the morning.

from covid.

jhellewell14 avatar jhellewell14 commented on June 8, 2024 2

I agree that unsure should have a colour that distinguishes it from increasing/decreasing but I'm not sure if that colour is dark grey. When I see that I immediately think that the map is broken and it's in the same category as NA. But "unsure" isn't NA. Even if unsure is a lack of information on precisely whether R > 1, the fact that there is enough data for us to make an estimate yet we are still unsure is itself some information and that should be conveyed.

I personally think the blue / yellow divide is nice and fits with the overall theme of the site. Maybe we could go for white/very light grey for unsure and then dark grey for NA (my brain reads anything that is grey as NA anyhow)

from covid.

jhellewell14 avatar jhellewell14 commented on June 8, 2024 2

image (2)

How do people feel about this colour scheme as something we can all like? (I have artificially added in some decreasing countries)

  • Unsure is not visually linked to anything else

  • Keeps blue/yellow

  • Keeps NA light grey

  • No "danger" colours

Let me know what you guys think. @seabbs @kathsherratt @samclifford @pearsonca

from covid.

kathsherratt avatar kathsherratt commented on June 8, 2024 1

I had a quick look at ColorBrewer2 for suggestions for easy to read colour palettes.

Going off @seabbs last comment, we are looking for a 5-class diverging scheme (so that "unsure" is not part of a sequential trend), no red, ideally dark blues. These were the colorbrewer palettes that fit (though maybe neither perfect)

Scale: decreasing > likely decreasing != unsure != likely increasing < increasing
Palettes:

  • PRGn (dark green > light green != white != light purple < dark purple)
  • BrBG (dark green > light green != white != light brown < dark brown)

They don't always look great in reality though so maybe see what you think (when you have time!)

from covid.

samclifford avatar samclifford commented on June 8, 2024 1

I've had another look at the site now and there isn't a huge amount of contrast between unsure, likely increasing and increasing. Are you using a colour picker that accounts for contrast here? FWIW manual sampling of colours is a fool's errand.

In the above image unsure graphically looks like it should be between the two levels of increasing. This is a bad decision. Even though there are no yellows present, I suspect that they would be too noticeably different and stand out a lot.

I don't think you can get around the idea that you need something that's recognisable as being "bad" and "good".

Suggest orange as being "bad" and purple as "good" as they're not a traditional bad to good colour scale (i.e. neither are red or green). https://colorbrewer2.org/#type=diverging&scheme=PuOr&n=5 This one has a light grey in the middle for uncertain. I'd be very hesitant to give "Unsure" an actual colour because while it's not an absence of data it's an absence of direction and may accidentally visually lead someone to the wrong conclusion. NA as a dark enough grey to be distinct from "Unsure" but not so dark that it looks like a purple would help here.

from covid.

samclifford avatar samclifford commented on June 8, 2024 1

I can live with Joel's but I think we should probably come up with some guidelines on how to choose colours when we're doing mapping of things like risk or outbreak status. I'm clearly a little less gun-shy about using a colour to indicate "bad" and I think everyone's raised some valid points about what their aims are with their suggestions.

from covid.

samclifford avatar samclifford commented on June 8, 2024 1

Apart from reading all of Tufte's stuff, yes. I'll have a quick look at some references on color perception and using contrast to highlight changes.

from covid.

seabbs avatar seabbs commented on June 8, 2024

I can't find a theme that appropriately contains the fact that unsure should not be interpreted as informative/part of a trend which I think is what we want. Ideally this would be something like gradient on increasing, likely increasing, step change to unsure and then gradient on likely decreasing, decreasing. Currently sticking to original theme but happy to take concrete suggestions.

Additional complexity is that the colour theme needs to not be scary (so no red) and match the overall theme of the site (so ideally some sort of darker blue with no other dominant colours)

from covid.

pearsonca avatar pearsonca commented on June 8, 2024

One thing that seems at issue here is the orthogonal dimensions of +/neutral/- vs certain and uncertain.

Perhaps two visual distinctions are in order - color for increasing / neutral / decreasing, and then...alpha? cross hatching?...for certainty.

from covid.

seabbs avatar seabbs commented on June 8, 2024

So I think this is what we have settled on for now after much manual sampling.
Screenshot 2020-04-02 16 44 42

What do people think? NA are flagged as being based on lack of data in the fig captions

from covid.

seabbs avatar seabbs commented on June 8, 2024

Good suggestion @pearsonca might park for the next version as this is driving me a little mad! Thanks for the research @kathsherratt - agree the colourbrewer palettes are close but not quite there. The manual sample one above is effectively what we had before but with unsure sampled from a different palette.

from covid.

seabbs avatar seabbs commented on June 8, 2024

Okay, so my preferred palette is the original one. I think people hate Joel's suggestion the least so we will go with that unless anyone has any major objections when we release today.

Going to leave this open as still think there is room to change this and keen to hear suggestions.

from covid.

seabbs avatar seabbs commented on June 8, 2024

Sounds like a good idea Sam - are you aware of any resources discussing this sort of thing. I imagine it is something people have thought about before.

from covid.

seabbs avatar seabbs commented on June 8, 2024

Awesome

from covid.

samclifford avatar samclifford commented on June 8, 2024

What attributes guide the deployment of visual attention and how do they do it? https://doi.org/10.1038/nrn1411 This one's a nice paper on what things can grab people's attention to highlight where something is most different.

ColorBrewer.org: An Online Tool for Selecting Colour Schemes for Maps https://doi.org/10.1179/000870403235002042 This is the paper outlining what ColorBrewer is and why it's been set up the way it has. If you've never really dug deep into the theory behind it and its options, this is worth a peek. It indicates that the website isn't just about getting pretty colours.

Color Design for the Color Vision Impaired https://doi.org/10.14714/CP58.270 This one is slightly more cartographic than what we're doing in its focus but shows some maps and how different colour scales end up being misinterpreted by people with deuteranomaly/deuteranopia, the more common type of colour vision impairment

How to Enhance Cartographic Visualisations of Natural Hazards Assessment Results https://doi.org/10.1179/1743277411Y.0000000001 This is a good review of the ways that maps are done and what we have control over when it comes to natural hazards (and I think perhaps a pandemic conceptually fits into this). I think in particular this is an important part of this paper:

Slocum et al. (2008) suggest using 5–7 classes. If the classes are spatially evenly distributed, more classes can be used because similar colours can be distinguished more easily if they are situated next to each other (Harrower and Brewer, 2003). The choice of a colour scheme that characterizes the nature of a process combined with a small number of data classes that are distinguished by varying colour value or saturation allows for an unambiguous and intuitive representation even in the case of symbolisation overlays.

In my mind, this means that having lots of dark shades is only really permissible when they're apart from the light shades. I don't think there's such an extreme geographical distribution of increasing and decreasing, so would caution against having colours that are in the same hue group and have similar lightness and saturation.

Tufte is pretty clear in his writing on colour that there's no "optimal" colour palette, and there's the need to consider cultural differences (red doesn't always mean danger) when coming up with colour palettes that are to be used around the world.

I think the broad principles for the map colours here are:

  • "Unsure" should be a neutral colour with respect to the increasing/decreasing colours but not easily confused with the countries where we have no data
  • The increasing colours should be in the same set of hues
  • The decreasing colours should be in their own set of hues in a way which shows that they are opposite in interpretation to the increasing colours
  • The colour for "no data" should not be in the colour palette of either increasing or decreasing
  • The "likely" increasing/decreasing should perceptually be between the "Unsure" colour and the respective most extreme colours
  • The palette should be interpretable by colour vision impaired people
  • The increasing colours should be interpretable as being "bad" without giving the impression that these countries are regions of extreme danger

from covid.

samclifford avatar samclifford commented on June 8, 2024
library(ggplot2)
library(sf)
library(ggspatial)
library(dplyr)
library(rnaturalearth)
library(rnaturalearthdata)
library(mapproj)

world <- ne_countries(scale = "small", returnclass = "sf") 
world <- filter(world, name != "Antarctica")

nw <- nrow(world)

plot_labels <- c("Increasing", "Likely increasing", "Unsure", 
                 "Likely decreasing", "Decreasing")

world$label <- factor(sample(plot_labels, size = nw, replace = T), levels = plot_labels)
world$label[sample(1:nw, size = floor(nw/4))] <- NA

world_mollweide = st_transform(world, crs = "+proj=moll")

ggplot(data = world_mollweide) +
    geom_sf(aes(fill = label)) +
    scale_fill_brewer(palette = "BrBG", na.value = "slategray1", 
                      name = paste("Direction of change of Rt")) +
    coord_sf() + theme_bw() + 
    theme(legend.position = "bottom") +
    guides(fill = guide_legend(nrow = 1, byrow = TRUE)) 

from covid.

seabbs avatar seabbs commented on June 8, 2024

had to revert your changes to global_map @samclifford it looks like not compatible with sf.

Will review notes above once had my daily walk - oooo how exciting.

from covid.

samclifford avatar samclifford commented on June 8, 2024

Ah right. Might have to add an intermediate step to project instead.

from covid.

gunnar-kaestle avatar gunnar-kaestle commented on June 8, 2024

In fact, it is a heat map which we are looking at.

Unsure means not that you are unsure about the quality of the data, it just means it is about R=1 or ln(R) = ~0. If you don't like red, then I would use yellow and orange when ln(R) > 0 (increasing or getting hotter), and light blue and velvet for ln(R)<0 (decreasing or cooling down).

Indifferent would be a (light) green, and grey is only used if no or not enough data is available to give an estimate for R eff.

dark blue/velvet (cooling down = decreasing)
light blue
light green (indifferent)
pale yellow
orange (heating up = increasing)

grey = unknown

"Unsure" is ambigous, and the label should be renamed. Basically what is done is an estimation and the mathematical formula gives a pretty good estimation about R, if the standard deviation bandwith is narrow. So the estimation algorithm is quite sure about the R value, but with R= ~1 (ln(R)=~0) the system's reaction is indifferent. That is a different message.

from covid.

seabbs avatar seabbs commented on June 8, 2024

I think we have settled on this (for now) so closing....

Thanks for the input all - super helpful

from covid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.