The second rOpenSci OzUnConf was held in Melbourne Australia a few weeks ago. A diverse range of scientists, developers and general good-eggs came together to make some R-magic happen and also learn a lot along the way. Before the conference began, a huge stack of projects were suggested on the unconf GitHub repo. For six data-visualisation enthusiasts, one issue in particular caught their eye, and the ochRe package was born.
The ochRe package contains colour palettes influenced by the Australian landscape, iconic Australian artists and images. OchRe is originally the brain-child of Di Cook, who was inspired by Karthik Ram’s wesanderson package.
Why “ochre”?
Naming our package was the “most important” task facing us after all jumping on board the project. Fuelled by a selection of pastries we opened the discussions, fully expecting this to take some time. Fortunately, we all agreed on the name in less than 5 minutes, which meant plenty of pastries were left for the serious business of package building.
Ochre is naturally occuring, brownish-yellow pigment found in many parts of Australia, so frequently in fact, that Australia is sometimes referred to as the “land of ochre soil”. Additionally, ochre pigment has been used for thousands of years by Aboriginal people in Australia, with many culturally important uses from artwork to the preservation of animal skins.
Building ochRe
We started our package building journey by each picking an iconic Australian artwork (this took longer than you might think). Once we had selected our images, we used the online Image Color Extract PHP demo tool to extract the hex code for the main colours within each image. Some images required a more selective approach, so where needed the colour code extraction was done using the eyedropper tool (in macOS) or the Google Chrome colourPick extension.
Once we were happy with the colours, codes and order for each palette we loaded this information into ochRe as lists of hex codes associated with the palette name. We adopted scales to improve the fucntionality of the packages when using ggplot, in particular to allow manipulation of colour ramping and transparency. The package also contains a few simple functions for displaying the different palettes.
Below are some examples of original art work and their associated palettes:
namatjira_qual and namatjira_div are both inspired by the watercolour painting “Twin Ghosts”, by Aboriginal artist Albert Namatjira. namatjira_div is ordered for plotting divergent datasets.
The nolan_ned palette is inspired by the famous paintings of the outlaw Ned Kelly by Sidney Nolan.
olsen_seq has been designed for plotting sequential data, such as a heat map or landscape layers. The colours come from the abstract piece “Sydney Sun”, 1965, by John Olsen.
There was a high proportion of ecologists at the #ozunconf, which inspired the somewhat pessimistic healthy_reef and dead_reef palettes, with the colours taken from recent underwater photgraphs of the Great Barrier Reef.
Introducing: ochRe
Our package currently contains 16 colour palettes, each one inspired by either an Australian landscape, an artwork or image by an Australian artist, or an Australian animal. Some of the palettes are more suited to displaying continuous data (such as in the Australian elevation maps above). Other palettes will perform best plotting discrete data (as in the parliament example below).
ochRe can be currently be installed from GitHub:
# You need to install the 'devtools' package first
devtools::install_github(&quot;ropenscilabs/ochRe&quot;)
You can visualise all 16 palettes using the following code snippet:
pal_names