Ireland-A Country in Motion: 1.96 Million Commutes

I was inspired by Alasdair Rae’s excellent work here, here and here to attempt something similar for Ireland. Below is the fruit of my labour over the last number of weeks. It shows 1.96 million individual commutes from every electoral division in Ireland. Commutes within a single electoral division are excluded. The data comes from the Irish Central Statistics Office, OpenStreetMap and OSI opendata. I will post in detail in the coming days on the methodology I used for completing this. For now I hope you enjoy.

Here is a pdf with much higher resolution Ireland-A Country in Motion and the same pdf in Google drive.

I will also post a very high resolution PNG over the weekend that can be used to print a high quality image.

Ireland-A Country in Motion

Ireland-A Country in Motion

 

Global Human Settlement Layer-Cork

During the course of the last week I was reading the MacKinnon report (otherwise known by its succinct title of ‘Report of the Expert Advisory Group on Local Government Arrangements in Cork’). This is the report that address whether the administrative boundaries of Cork City Council should be changed. The report recommends a large expansion of the City Council’s boundary and I put together the below GIF to quickly illustrate why this is necessary. Hopefully the expansion goes ahead, at least the new proposed boundary makes ample provision for urban growth over the next number of decades.

Cork Urban Growth

Cork Urban Growth

 

Global Human Settlement Layer-Dublin

I’ve been taking a look recently at the Global Human Settlement Layer from the the European Commission. I’ve been working on a piece to do with the physical impact of the Celtic Tiger on Ireland, but in the meantime, I’ve put together a few fun GIFs using their built up data. This uses a combination of Landsat and Sentinel scenes for four epochs: 1975, 1990, 2000 and 2014. Below is a GIF showing the growth of Dublin during this time.

Dublin Urban Growth

Dublin Urban Growth

QGIS-Generating an Isochrone

Normally with somebody asks me to undertake a quick bit of analysis it usually involves, ‘Can I see all of x features that are with 2000m of this location?’. The other day I got asked: ‘Can you give me a spreadsheet showing all locations of x within a 12 minute drive of this location?’. I thought about it and I knew for a quick piece of analysis like this I didn’t need to/have time to setup pgRouting or ESRI’s ArcGIS API for Python.

I did a quick search and found the OSM Tools plugin for QGIS and after a quick visit to OpenRouteService to get an API key and I was in business. After I installed the plugin and entered by API key I only had to click a point on the map to generate my isochrone as shown below.

OpenRouteService QGIS Dialog

OpenRouteService QGIS Dialog

The results are shown below, they are temporary layers that can be permanently saved if necessary.

Lastly, in case QGIS is giving any hassle, the isochrone can be generated online and downloaded as a geojson, test shown below for a random location in Dublin.

Online Results

Online Results

Unpopulated Australia

I was looking at a map highlighted on Reddit the other day from the website mapsbynik. It showed the unpopulated areas of the United States. I was going to do a similar exercise for Ireland but when I examined the census data it quickly emerged that no ‘Small Area’ (the unit with the finest spatial resolution) was constructed to have a population of zero, even the Small Areas that formed part of large national parks were considerably larger than the average small area, one assumes this was a conscious decision taken by the Central Statistics Office.

Instead I decided to focus my attention on Australia, from perusing their website, their equivalent of the Irish Small Areas was the ‘Mesh Block’ which were ‘the smallest geographic region in the Australian Statistical Geography Standard (ASGS), and the smallest geographical unit for which Census data are available’ (more information here). In 2011 there were 347, 627 mesh blocks for the country. I created a map of the unpopulated mesh blocks but it wasn’t very informative, large sections of the country were showing as being populated when in fact they weren’t.

In an effort to improve my map I continued searching their website until I found the 2011 Population Grid. The methodology of how their created their population grid is here. I then downloaded 9 shapefiles and merged them together in QGIS. I then used a definition query to select all the cells with a population of zero and created a map from this. It is a vast improvement from my initial effort. I spent some time styling my map in QGIS’s print composer. The below is the finished product. Very stark contrast between the big cities and the outback.

Unpopulated Areas of Australia

Unpopulated Areas of Australia

Farthest McDonald’s-Ireland

In my last post I downloaded all the McDonald’s in Ireland using overpass-turbo. The problem I had when I exported these was that because GeoJSON is such a flexible format, I was getting both nodes and ways. These would have had to be imported into ArcMap separately and the centroids of the ways found and merged with the points, this would have taken some time. Instead I got a great suggestion “Mmd Osm” on Youtube, that was to use ‘out centre;’ instead of:

out body;
>;
out skel qt;

This worked as promised and the centroid of both the nodes and the ways was exported. I then used OGR2OGR to convert this to a shapefile:

ogr2ogr -nlt POINT -skipfailures McDonalds_Ireland.shp McDonalds.json

I had to rename the GeoJSON file to .json for the purposes of this conversion, the last step I undertook was to transform the shapefile from WGS84 to the Irish Transverse Mercator, EPSG 2157. This was completed using the following code in OGR:

ogr2ogr -t_srs EPSG:2157 McDonalds_1shp McDonalds_Ireland.shp

OSGeo4w is in my opinion the best place to start with all things related to open source geospatial software. Now that

Farthest McDonald’s-Ireland-Part II

I did a bit of quick work today to figure out what’s the farthest you can be from a McDonald’s in Ireland. I used the usual method that I’ve followed in a few previous posts, I calculated the euclidean distance from the existing McDonald’s, that was the OSM Overpass-turbo GeoJSON that I downloaded and used OGR2OGR to convert it to a shapefile. I had planned on using PostGIS for this and St_Distance to find this out but I went with the tried and tested method. The farthest you can be from a McDonald’s in Ireland is Co. Galway, more specifically in the townland of Ballinaleama. It is 75.3km from the nearest McDonald’s at the Westside Shopping Centre in Galway.

Farthest from McDonald's-Ireland

Farthest from McDonald’s-Ireland

 

Fishing in Australia

I spent a month over Christmas with my other half and her family in Western Australia, I had my trusty (albeit pushing on in years now) Garmin GPS 60CSX on me and used it to record a track of a day we spent on a chartered fishing excursion. I brought the .gpx into ArcMap and saved it as a shape which I then converted to a geojson file using ogr2ogr.

ogr2ogr -f GeoJSON fishing.geojson Fishing_1.shp

I then decided to a create a simple webmap of the trip using leaflet. After successfully creating the map I realised that the ocean basemap that I used for that part of Western Australia didn’t have enough detail so I redid the whole thing using ESRI leaflet. I loaded the geojson externally from a file and added a popup with the distance travelled.

The final webmap is here for those interested.

Australia-Most Remote Point

After my last post on the farthest distance you can be in Ireland from a road I got thinking on what the situation would be like for other countries. From what I’ve found in Europe, the situation appears to be quite similar, in England it’s 7.6km, (it’s a cached version of the site as it seems to be offline at the moment). So, logic would dictate that the larger the country, the more interesting the answer.

With this in mind I instantly thought of places like Alaska, Russia and Australia. For various reasons (least of which my other half is Australian) I picked Australia. The first problem that I had to overcome was where to acquire the data, there were two reliable sources that I found, the first was Geodata Topo 250k Series 3 data published by the Geoscience Australia, I had to be wary of this as it hasn’t been updated since 2006. This is the data set that is used to create the 1:250,000 scale topo maps of Australia, it was missing a lot of road details in urban areas.

The next data source was the ever dependable OpenStreetMap. The best source for this data is Geofabrik, a German company that has various data formats to choose. I’ve used their website numerous times in the past with great success but this time it would be different because I wouldn’t be dealing with a small country in Europe but the geographic data for an entire continent. As I wanted to reuse the methodology I had used last time for finding the most remote point in Ireland I had to add the Australia Road data from OSM to ArcMap. The easiest way to do this was to download the OSM data in osm.pbf format (Protocolbuffer Binary Format, intended as an alternative to XML). The free OSMconvert command line utility was then used to convert it to .osm format using the following code:

osmconvert -v australia-latest_1.osm.pbf --out-osm -o=australia-latest_1.osm_01.osm

Once this was converted (one of the advantages of OSMconvert is how fast it is, it took 58 seconds) the OSM Toolbox was used in ArcMap (added from here) to add the .osm file to a file geodatabase. This geodatabase is 12.1GB in size. The roads layer was added (1,513,287 features); the roads that would form the basis of this selection were then selected from this and exported to a few feature class. The select statement is below:

highway = 'motorway' OR highway = 'motorway_link' OR highway = 'primary' OR highway = 'primary_link' OR highway = 'raceway' 
OR highway = 'ramp' OR highway = 'residential' OR highway = 'residential_link' OR highway = 'road' OR 
highway = 'secondary' OR highway = 'secondary_link' OR highway = 'tertiary' OR highway = 'tertiary_link' OR highway = 'trunk' 
OR highway = 'trunk_link' OR highway = 'turning_circle' OR highway = 'unclassified' OR highway = 'track'

I thought long and hard about whether to include or exclude the tracks, in the end I decided to include them because I ran a version of this without them and realised that it omitted public roads like the Canning Stock Route. This is classified as a track and it is located in the northern part of Western Australia and is 1850km long, to put that in European context, that’s about the distance between Dublin and Rome. I then projected the roads to GDA_1994_Australia_Albers (EPSG 3577). I’m no expert in Australian coordinate systems but this seems to be widely used for the country. I then used the Euclidean distance tool to calculate the Euclidean distance for the exported road network. Everything for this exercise was saved in a file geodatabase, this made running the tools faster. Below is an export of the Euclidean distance raster with the road network overlaid.

Euclidean distance raster with road network overlaid.

For the purposes of this exercise all of the islands (Tasmania included) were removed. The next step was to use the zonal statistics tool to calculate the max value of the raster. The following equation was then used to result in an output with only one cell value (the maximum distance to a road). This was then converted to a point using the ‘Raster to Point’ tool in ArcMap.

The maximum distance that you can be to a road in Australia is 156km.

Farthest Point from a road.

The point is located in the Great Sandy Desert. It is the second largest desert in Australia and encompasses an area of 284,993 square kilometres.

Great Sandy Desert

So there you have it, the farthest point you can be from a public road in Australia is almost the distance between Dublin and Galway. Obviously this was just a quick desktop based exercise and has flaws ranging from data quality to the coordinate system used but I think it is useful enough to be a semi-decent indicator of the distance.

Australian National Map and Postcodes

I have been watching a very interesting video on the FOSS4G NA’s YouTube channel by Steve Bennett a software engineer from a company called Data 61 all about their creation and implementation of an opensource website for all geospatial data in Australia. I wasn’t aware of this website and decided to take a look at it, it’s called http://nationalmap.gov.au/. When the interface loads uses Bing as its default basemap.

1

It has a very impressive range of datasets available to view. A very useful feature is that where available you can download the data directly. The National Map does not host any data directly but ‘provides a federated interface to the diverse servers already operated by the various government agencies, running Geoserver, THREDDS Data Server, ArcGIS Server, CKAN, Socrata, and many more’.

To create the National Map they created a new library called ‘TerriaJS’ that makes it straightforward to build 3D web-based geospatial data explorers. The crucial point to make with TerriaJS is that it is entirely opensource and is already being used by a host of different companies both inside and outside Australia. The road that Steve and his colleagues have traversed has been long with a screenshot of his YouTube video shown below to give the timeline.

Screenshot from FOSS4G NA' YouTube video

Screenshot from FOSS4G NA’ YouTube video

 

The search function works very well and is very responsive. I searched for and downloaded the Australian post code areas, it worked flawlessly. A screenshot of querying the post code layer is shown below.

Querying the post code layer

Querying the post code layer

Any query can be downloaded as either a CSV or JSON. One post code caught my attention for the sheer size of it at 1,203,979km². To put that in perspective that one post code is over twice the size of France or over 17 times the size of the Republic of Ireland.

The website has the ability to upload data. I uploaded a JSON file of Irish speed camera zones, it worked flawlessly as shown below.

Test of data upload functionality.

Test of data upload functionality.