GIS Blog

Waffling On

This is a guest post from Lincoln grad Jennifer Tregurtha.  She covers how to create waffle charts to display multivariate data.  Thanks Jen!  (All images by Jennifer unless noted otherwise.)

Learning GIS skills isn’t only useful for passing your uni courses, or being able to make some cool maps to impress your friends; it turns out they’re quite handy to have in the workplace, too. I graduated from Lincoln in 2019 and immediately went to work at Environment Canterbury as a summer student in a GIS-based role with the Groundwater Science team,  A few extended contracts later and I’m still here, now as a science technician, and I get to use GIS a lot in my role, helping to improve our understanding of Canterbury’s groundwater resources.

Recently I was given the task of preparing our Annual Groundwater Quality report. Every year we sample just over 300 wells (322 this time) around the whole region for a whole lot of different contaminants, all those goodies we hear about in the news like nitrates, E. coli and arsenic. We then have to make those data available in a way that makes sense to the public: enter GIS and maps.

I had the previous years report to work from, and could see that they had made a waffle chart map, but they had to use PowerPoint to create it. I thought, “hmm, I like it, but surely ArcGIS Pro would be able to do the same thing, and faster?”

What is a waffle chart map, you may ask? Well, unfortunately it isn’t like the image below.

https://www.facebook.com/fanmaps1/posts/united-states-waffle-maplike-what-i-share-curating-this-page-demands-a-huge-effo/2434034206890648/

Rather, a waffle chart is a way of summarising data in a bivariate symbol, where each zone has its own waffle made up of individual cells, each representing a certain amount of data in a category. Different categories are shown as different colours, and the overall size of the waffle/number of cells represents the amount of data in that zone.

In the image above, each colour represents a different category of nitrate values.  Each waffle represents one Canterbury Water Management Strategy Zone, and each cell within a waffle represents one well. It allows you to see at a glance that there are not many wells sampled in the Kaikoura zone compared to the Selwyn – Waihora and Ashburton Zones, based on the size of the waffles. It also enables you to see at a glance that nitrate is generally at higher concentrations (at least in the wells we sampled) in the Ashburton zone than the Upper Waitaki zone, looking at the colours in the waffles.

Anyway, enough, ahem, waffling… So, how did I make these waffles? A little bit of hunting around on Google and I found this post by Kenneth Field with a link to a script for producing exactly what I wanted. Downloading it meant it was now available in my toolbox to use like any other tool.

However, as always, it’s important to first have your data formatted in a way that GIS can consume. In this case, the table that you feed to the Waffle Grids tool needs to be formatted in a way that each row forms one ‘waffle’, and the columns correspond to the different colours within that waffle. Each cell gets filled with the number of features in that category, in this case how many wells were in each range of nitrate values. If you are working with data with hundreds of features, you may not want to include a cell for every single one in your waffles – to get around this, you can easily divide the numbers by 10 or 100, and then just make a note on your map that each box represents 10 schools, or 100 people, or whatever you may be mapping.

For my map, I manually entered the data into the table below.

I then imported this into Pro using the Excel to Table tool. Because the data need a spatial ‘home’ so that it knows where to place the waffles, I used the Join Field tool on a polygon layer I had of the Canterbury Water Management Strategy Zones, making sure to include all my data columns in the transfer:

And now, finally, it’s time to actually use the Waffle Grids tool!

Simply choose your polygon layer containing the data, choose the columns you want to include in the input fields (bearing in mind the option you select first will be drawn at the bottom of the waffles, and vice versa), choose the size, and give it an output name and location.

For the size, I chose the length of each little square to be 7000 m, which I felt was about right for a small scale map like this.

(Side note – a great tip I read for how to remember if a map is small scale or large is imagine a picture of a fish. If you zoom out really far, the scales look really small – hence it’s a small scale map, and vice versa.) (Ed. Nice tip!)

 

Once the software has chugged away and done its thing, you’re left with some very plain looking grey waffles – but not to worry!

Simply head into the symbology, style it by Unique Values, give it some colours, and like magic you will have created a unique, colourful way of presenting your data in a way that may be easier for your map reader to understand at a glance than displaying each data point in its true location.

Using the Select and Move tools, it is possible to move the waffles around, so have a play around with that until you get something you are happy with.

Once I had made the waffles and manoeuvred them into position, it was then time to focus on the legend. I wasn’t all that happy with the default legend Pro gave me, so I changed some of the defaults, and then I clicked this magic button that changed my life when I found it – Convert to Graphics.

(N.B. You need to be in the Layout view to do this – look for “Legend” in the layout Contents, right-click and there it is.)

This then gives me full control over each aspect of the legend. The first thing I did was change the rectangle coloured boxes to be squares, to match the squares in the waffles.

I then decided that instead of just using one of the preset options for the symbol for my ‘Areas of Potential Groundwater Use’ layer (shown at the right),

 

I would dig right down into the symbology and make a custom symbol. Because aquifers don’t have clean, straight edges, I wanted a symbol that would more realistically represent these highly variable shapes.

To do so I went into the structure of the symbol, created two fill layers, and added a wave effect to both of them. I then played around with the wave effect until I was happy with how it looked, replicated the same values on the grey layer so that they matched, and gave the grey layer a slight offset so that it would function as my outline – using a stroke layer and giving it the same wave values would have worked too.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

When creating a report like this, it’s useful to have variety in the way data are presented. Presenting some maps with all the wells represented individually, such as the one below which is at the start of the report, is helpful:

While this is useful (however, note the issues with occlusion of some of the symbols in the higher density areas), having some maps like the waffle maps is also useful to keep the reader engaged. As well as this, it is easier to make conclusions about the overall situation in each zone when the map maker has already grouped together the data, rather than making the readers summarise it in their head. The waffle chart technique could also be useful if the actual locations of data can’t be shown due to confidentiality or privacy reasons.

Jen

(Ed. Thanks heaps Jen! Great stuff.  [the editor said as he wiped away a tear])

• 29/07/2021


Previous Post

Next Post

Leave a Reply

Your email address will not be published / Required fields are marked *