Think about little pre-attentive features in tables too

Britain’s Met Office had a makeover to the web forecasts recently. I saw this little subtle but eye-catching highlight (see the 30% chance of rain at 17:00 below) and I really like it.

Screen Shot 2017-08-31 at 17.56.24

It’s a table of data, basically. We tend not to do much in those apart from maybe shading in a cell background or making a font bold, but we could do a lot more. I don’t mean making it mind-blowingly complicated and rainbow-coloured, I mean effective highlights that are subtle but draw readers’ attention to the important stuff. In the dataviz world, we talk about pre-attentive attributes, which you can google but basically they are things that your visual cortex directs attention to before it get to the prefrontal thinking bits. (With apologies for cod neuroscience.) This saved your ancestors and mine from getting eaten by lions. We should make more of these. I went to Inspect in Chrome and you can see that all it is is a ‘sig’ class that gets applied to textover a certain % chance of rain. That brings in a bold font and a nice little shadow. Not a default shadow but one that somebody chose to look good.

Screen Shot 2017-08-31 at 17.57.37.png

The shadow looks like a real-life thing, like one of the cells has text hovering above the page and you can tell by the shadow. Your brain spots real-life stuff. It doesn’t spot the difference between italic and regular type, and it doesn’t really do underline or bold very well either. But it does spot colour quite well, and it will spot boundaries enclosing adjacent text. All of this is a good reason to use HTML for your statistical reports and not your favourite word processing package. Oh happy users of R or Stata, you have many options for making HTML easily, and once you have the .html file, you can tweak it manually to look just the way you like. I shall direct you now to the following in Stata:

  • dyndoc: a new command in v15. Nice but doesn’t do much styling, so you have to go in and work it up in a text editor.
  • webdoc: Comprehensive in output options, but harder to learn, and you end up typing a lot of the html
  • Roger Newson’s htmlutil, Llorenç Quintó & colleagues’ ht, or my html-reports
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s