Updated map for the 25th of March 2020.
Author: Donal
Covid-19 Cases Ireland
I’ve been creating daily maps of Covid-19 cases in Ireland using the official Government source. I think proportional symbols and proper labelling lead to the best outcome.
Peatlands of Ireland
I was thinking the other week about the amount of bogs around Europe after the collapse of a trial against turf cutters in Galway. I put the below map and tweet together in a few minutes that shows the peatlands of Europe. The outlines of Iceland, Ireland, Northern England, Scandinavia and Scotland are visible from their peat cover alone. The data comes from the European Commission’s CORINE land cover dataset.
The peatlands of Europe #gis #cartography #europe pic.twitter.com/fiyMEyia6R
— Dónal Casey (@Pearoid) February 8, 2020
After completing the above I thought I’d put together a map showing the peat cover in Ireland. Besides from the CORINE land cover dataset I used a DEM from the European Space Agency to create the hillshade and the administrative data comes from Ordnance Survey Ireland and OpenDataNI. The dataset doesn’t differentiate between raised and blanket bogs but for my purposes that’s okay.
Below is the finished map. I tried something new and used abbreviated county name labels à la various maps for the USA where the state names are abbreviated. I think it works well.

I was thinking since I posted this that there’s a bit of work involved to figure out the order of peat per county so I created a graph. For any GIS folks out there, I quickly unioned the county layer and the peat layer and then calculated the area in square kilometres for the peat and exported this as a CSV. I then used Matplotlib to create the below graph. If you’d like to know more about simple workflows like these just reach out to me on Twitter (@pearoid).
Airbnbs in Ireland
I was reading this Guardian article the other day where they produced maps showing the number of Airbnb listings per 100 dwellings. I thought it was really interesting and I hadn’t seen Airbnb data mapped like that before. I had a few hours to spare yesterday so I set about replicating their method for Ireland. I used the 2016 census electoral divisions (to get the household numbers) and data for Ireland from Inside Airbnb. I think at best this data is questionable because from the reading I’ve undertaken it seems to still list properties that were briefly on Airbnb a number of years ago and have long since been removed however this is the only data available so I went with it.
Below is the map, it was made with a combination of Bash, GDAL, QGIS, LibreOffice Calc and Illustrator.
Irish Census 2016 & Privacy
I’ve been looking at the 2016 census results with the last few years and there is a great deal of suppression of values for relevant Small Areas. The CSO suppress results or aggregate them depending on the number of people living in a Small Area. If the population is too small and could lead to individuals being identified, the data is suppressed. They are legally required to undertake this exercise under s33 of the Statistics Act, 1993.
I’ve been looking at a selection of variables and after reading this piece on the traveller accommodation crisis by RTÉ I decided to map the percentage travellers per Small Area. I have all this data in a PostGIS database but I’ll quickly run through how to do it without having to use PostGIS. I downloaded the Small Areas shapefile (generalised to 50m) and the CSV of all of the Small Area values from the CSO here. Instead of having to use a spreadsheet or QGIS to manually delete the 802 fields I didn’t need I used the pandas library, the python code below that took 0.3 seconds to run. It opens the relevant CSV and only selects the columns that I need and then strips the first 7 characters from the ‘GEOGID’ string as these are not needed for the join I’ll do in QGIS later.
import pandas as pd, time start = time.time() df = pd.read_csv('SAPS2016_SA2017.csv', usecols=['GUID', 'GEOGID', 'GEOGDESC', 'T1_1AGETT','T2_2WIT']) df.GEOGID.apply(str) df['GEOGID'] = df['GEOGID'].str[7:] df.to_csv('SAPS2016_SA2017_New_GEOGID.csv') end = time.time() print(end - start)
I then opened the shapefile in QGIS, imported the CSV and joined them. This was subsequently exported to a GeoPackage and I used GDAL’s ogr2ogr library to convert it to a GeoJSON in order to upload it to Carto.

Below is the resultant map with some formatting of headings undertaken to make it more legible. You can make it full screen using the button on the left. What struck me about this was how with a small amount of work it was very easy to visualise accurately the resident locations of one of the most vulnerable groups of society. Obviously this information is useful to local governments, state government agencies, NGOs and so forth but I question whether this data should been available to the general public regardless of it being aggregated to the Small Area geography.
Ireland’s Social Housing
Housing and all its intricacies have come to dominate the media discourse at home over the last few years. We’ve truly come out the other side of the recession and now the conversation is around the shortage of housing and where that has lead us. I’ve been thinking about this recently and in particular social housing. I think that most people assume that we built the majority of our social housing in the 1950s and 1960s. Collectively I think we assume we know when social housing was built but not where. This is where the census data can come in. Part 2 of question H3 in census 2016 asks ‘If renting, who is your landlord?’.
I have all of the census 2016 returns for each geographical unit in a PostGIS database so it was a simple exercise to add the households that rent from a local authority or voluntary/co-operative housing body and divide by the total number of houses. One inherent weakness to this method is that it doesn’t capture the social housing tenants that rent from a private landlord.

I added a new column in PostGIS for the percentage social housing and I then symbolised this in QGIS. I used QGIS’s powerful Atlas generation tool. You’ll have to excuse the basemap, I’m aware that it’s a bit difficult to discern but in the interest of producing this entirely with opensource software I used OpenStreetMap as the basemap.
The next step will be to take the top-ten counties and use the Global Human Settlement Layer as a base to give an approximate indication of what epoch they were built in.































North Atlantic Sea Surface Temperature
This week I was trying to recreate Joshua Steven’s Commanding Cartography. He presented this at NACIS 2018 and I was keen to give it a go. As I use Windows 10, the first step for me was to install Windows Subsystem for Linux and then install GDAL. I then used Wget to download the month of April from the United States’ National Oceanic and Atmospheric Administration’s Coral Reef Watch as NetCDF4 files. Earlier in the week I ran through his presentation again to see if I encountered any problems trying to run through the steps on a single NetCDF4 file. The steps were as follows:
- Convert the NetCDF4 files to tifs.
- Crop the tifs to the area of interest (North Atlantic Ocean).
- Reproject to Albers Equal Area.
- Apply a colour palette to the image.
The only problems I encountered was trying to find the same data that Joshua used, and getting the projection type right for GDAL. I think I found the right download source by going to the daily NetCDF4 data (as below) and downloading the ‘SST’ data.

After some research, trial and error I reprojected the data to the Albers Equal Area projection with help from the brilliant Projection Wizard website. I selected the area of interest and copied the relevant proj4 string.

I created the first image of the sea surface temperature for April and posted it on Twitter during the week:
Next, I wanted to create a GIF for the entire month of April. I followed Joshua’s presentation again, and used a series of bash for-loops. Following his example I used ImageMagick through the command line to resize my final tifs, convert and resize them, and then create the GIF. This is shown below along with my for-loop that worked to reproject all 30 daily temperature tifs to Albers.
My planned next step will be to use the gravity setting in ImageMagick to annotate each of the individual tifs with their date taken as a variable from the filename. This is so the GIF will show each date as it cycles through. I’m not 100% sure once I resize etc. whether this will actually work but I’m hoping to find out.
for f in *.tif; do gdalwarp -t_srs "+proj=aea +lat_1=5.101266605156489 +lat_2=56.35029964751531 +lon_0=-28.125" $f "${f%.*}_Projected.tif" done

Australia-Durack Electoral Division
Like a lot of people, I spent a great deal of time following the 2019 federal election results. I was (and still am) very impressed with the Australian Electoral Commission’s Tally Room where results are easily available and downloadable. It was while I was browsing their site that I came across the Western Australian federal seat of Durack, what piqued my interest is that the stated area is 1,629,858km², I looked at its wiki page which states that it’s the largest electoral division in the world that practices compulsory voting. The Guardian have a good article about it which contains a graph that compares it in size to different countries in the world.
I decided to spend some of my weekend making a map of it, I downloaded the dataset from the the Australian Electoral Commission’s website and the country admin data and hillshade from the brilliant Natural Earth. Below is the result, free free to use as you’d like.

New Cork City Boundary
On the 1st of June Cork City’s boundary will change and the official city area will become almost five times larger, it will encompass Ballincollig, Blarney, Douglas, Glanmire and Rochestown. Its population will increase by 85,000 people. To put that in perspective, it’s 4,796 more people than the population of Ireland’s two largest towns, Drogheda (Census ’16 population was 40,956) and Swords (Census ’16 population was 39,248) combined. The council has launched an interactive web-map to show the new boundary that will come into force. It can be found here. The council have also produced a PDF of the new boundary which is shown below and the original can be accessed here.
Ireland-Census 2016
I’ve had to work recently on an older Linux based machine and as such most of my usual routes to edit and display data aren’t available to me. I needed to preform a join between the Small Areas geometry and the Small Areas table, both of which are available from the CSO’s website here. Even though the csv only has ~18,000 rows, the field calculator in QGIS 3.2 Bonn couldn’t cope and kept crashing.
Enter python to the rescue, I downloaded the Geany python IDE which I find to be nice and lightweight for older computers. I needed to remove the first 7 characters from the ‘GEOGID’ field. All of the values in this column started with ‘SA2017_’. The following is a quick few lines in python 2 to remove the first 7 characters using python’s built in csv module. For reference, on this very average laptop from 2011 it took 3 seconds to run.
import csv with open('SAPS2016_SA2017.csv', 'rb') as input_file, open('output.csv', 'w') as output_file: reader, writer = csv.reader(input_file), csv.writer(output_file) first_row = reader.next() first_row.append("Strp_GeogID") writer.writerow(first_row) for row in reader: item_to_change = row[1] modified_item = item_to_change[7:] row.append(modified_item) writer.writerow(row)