Tag Archives: development

ColorBrewer: Utilizing cartography software for color coding

It seems that I am getting a reputation for being a teensy-weensy bit doryphoric [1] and that may have some truth in it insofar as I hate – with a passion – the tendency for people to use the word “utilize” rather than “use” simply because the former sounds more erudite. It’s not, in fact, erudite; it’s just plain wrong. As I’ve said in previous posts, “utilize” means “to use something in a manner for which it was not intended.” So I can “use” a paper clip to hold a set of pages together; but I can “utilize” it to scoop wax out of my ears or stab a cocktail olive in my vodka martini (shaken, not stirred).

Colorado beetle

Doryphoric

So when I titled this post with “utilizing cartography software” I really do mean that and I’m not trying to sound clever by using a four-syllable word (utilizing) over the simpler two-syllable using. No siree, I say what I mean and I mean what I say: utilize. The software in question is online at ColorBrewer: Color Advice for Cartography and its original purpose was to help map makers choose colors that provide maximum contrast. Let’s create an example. Suppose you have a map of the US and you want to use colors to show the average temperatures as three data sets; below 50F, 51F-65F, and above 65F. You can use three colors in one of three different ways:

  • (a) Sequential: Three shades of a chosen color from light to dark to indicate low to high values. e.g. Sequential color
  • (b) Diverging: Three colors that split the data equally in terms of the difference between the colors, but with the mid-range being related to a degree of difference between the extremes. Divergent color coding
  • (c) Qualitative: Three colors that split the data into three distinct groups, such as apples/oranges/bananas or trains/boats/planes – or for the statisticians out there, any nominal level data. Color coding qualitative

For a map of temperature averages, you’d choose the sequential coding so as to show the degree of change. Here’s what such a map might look like:

Three data point colors

Three data point colors

Compare this with a version whereby we chose to have six data points rather than three i.e. less that 45F; 46F-50F; 51F-55F; 56F-60F; 60F-65F; above 65F.

Six data points colors

Six data points colors

What the software does that is interesting is that it automatically generates the colors such that they are split into “chromatic chunks” that are equally different. The lowest and highest color values for each map are the same but the shades of the intermediate colors are changed. If you were to choose a set of 10 data points, the software would split those up equally.

Of course, as the number of data points increases, the perceptual difference between them decreases i.e. it becomes harder to see a difference. This is one of the limitations of any color-coding system; the more data differentials you want to show, the less useful colors become. You then have to introduce another way of differentiating – such as shapes. So if you had 20 shades of gray, it’s hard to see difference, but with 20 shades of gray and squares, triangles, rectangles and circles, you now have only 5 color points for each shape.

One of the areas where color coding is used in Speech and Language Pathology is AAC and symbols. In the system of which I am an author [2] color coding is used to mark parts of speech. But suppose you were going to invent a new AAC system and wanted to work out a color coding scheme, how might you utilize the ColorBrewer website?

If you’re going to design your system using a syntactic approach (and I highly recommend you do that because that’s how language works!) you could first identify a color set for the traditional parts of speech; VERB, NOUN, ADJECTIVE, ADVERB, PRONOUN, CONJUNCTION, PREPOSITION, and INTERJECTION [3]. This looks suspiciously like a nominal data set, which corresponds to the Qualitative coding method mentioned at (c) above. So you go to the ColorBrewer site and take a look at the panel in the top left:

ColorBrewer Panel

ColorBrewer Panel

You can set the Number of data classes to 8, the Nature of your data to qualitative, and then pick yourself a color scheme. If you chose the one in the graphic above, you see the following set recommended:

Eight color data setFor the sake of completeness, here are all the other options:

ColorDataQualSet2You can now choose one of these sets knowing that the individual colors have been generated to optimize chromatic differences.

So let’s assume we go for that very first one that starts with the green with the HTML color code #7FC97F [4]. I’m going to suggest that we then use this for the VERB group and that any graphics related to verbs will be green. Now I can move to step 2 in the process.

Verbs can actually be graded in relation to morphological inflection. There are a limited number of endings; -s, -ing, -ed, and -en. Knowing this, I can go back to the ColorBrewer site and use the sequential setting to get a selection of possible greens. This time I changed the Number of data classes to 5 and the Nature of your data to Sequential. Here’s what then see as a suggested set of equally chromatically spaced greens:


ColorDataQualPanel2

This now gives me the option to code not just verbs but verb inflections, while chromatically signaling “verbiness” by green. Here’s a symbol set for walk and write that uses the sequential – or graded – color coding:

Color-coded symbols

Color-coded symbols

If you want an exercise in AAC system design, knowing that ADJECTIVES also inflect like verbs using two inflectional suffixes, -er and -est, you can try using the ColorBrewer to create color codes [5].

There are probably many other ways to utilize the site for generating color codes. For example, you might want to create colors for Place of Articulation when using pictures for artic/phonology work, and seeing as there are a discrete number of places, it should be easy enough. Why not grab yourself a coffee and hop on over the ColorBrewer now and play. But only use it if you’re creating a map. Please!

Notes
[1] A doryphore is defined by the OED as “A person who draws attention to the minor errors made by others, esp. in a pestering manner; a pedantic gadfly.” It comes from the Greek δορυϕόρος, which means “spear carrier,” and it was originally used in the US as a name for the Colorado beetle – a notable pest. This beetle was known as “the ten-striped spearman,” hence the allusion to a spear carrier.  To then take the noun and turn it into an adjective by adding the -ic suffix meaning “to have the nature of” was a piece of cake – and a great example of using affixation to change a word’s part of speech. As always, you leave a Speech Dudes’ post far smarter than you entered it!

[2] Way back in 1993 I was invited to join the Prentke Romich Company’s R&D department as one of a team of six who were tasked with developing what became the Unity language program. The same basic program is still used in PRC devices and the language structure has been maintained such that anyone who used it in 1996 could still use it in 2014 on the latest, greatest hardware. The vocabulary also uses color coding to mark out Parts-of-Speech but not exactly like I have suggested in this article. Maybe next time…?

[3] The notion of 8 Parts-of-Speech (POS) is common in language teaching but as with many aspects of English, it’s not 100% perfect. For example, words like the, a, and an can be categorized under Adjectives or added to a class of their own called Articles or – by adding a few more – Determiners. So you might see some sources talking about 9 Parts-of-Speech, and I like to treat these as separate from adjectives if only because they seem to behave significantly differently from a “typical” adjective. Another confounding factor is that some words can skip happily between the POS and create minor havoc; light is a great example of this. The take-away from this is that sometimes, words don’t always fit into neat little slots and you need to think about where best to put them and how best to teach them.

[4] In the world of web sites, colors are handled in code by giving them a value in hexadecimal numbers – that’s numbers using base 16 rather than the familiar base 10 of regular numbers. Black is #000000 and white is #FFFFFF. When you’re working on designing web pages, it’s sometimes useful to be able to tell a programmer that you want a specific color, and if you can give them the precise hex code – such as #FF0000 for red and #0000FF for blue – then it makes their job easier and you get exactly what you need. You can also something called RGB codes to described colors, based on the way in which the colors (R)ed, (G)reen and (B)lue are mixed on a screen. Purple, for example, is (128,0,128) and yellow is (255, 255, 0). Take a look at this Color Codes page for more details and the chance to play with a color picker.

[5] I suppose I should toss in a disclaimer here that I’m not suggesting that creating an AAC system is “simply” a matter of collecting a lot of pictures with colored outlines and then dropping them into a piece of technology. There is much more to it than that (ask me about navigation next time you see me at a conference) so consider this article just one slice of a huge pie.