Group figures for faster review

         ·      · · ·

I recently had to review figures from nearly 50 countries for a project I’m working on. Each country had three figures that needed comparing. Anyone who knows me will know that I had had enough after loading figures for just the first few countries. Apart from being tedious it was also error–prone; double–click the wrong file by mistake and it’s not immediately obvious you’ve got the wrong figure. Instead of doing it manually and risking making mistakes I wrote the following small python script using the pillow library.

Spatial packages and Travis

         · ·      · · ·

A number of R spatial libraries have been updated in the last couple of weeks, and this has played havoc with my Travis-CI build. I had still been using Ubuntu Trusty with Travis which uses old versions of libraries like rgdal and rgeos, so I needed to move to updated versions of these. In addition sf has now become a dependency for a number of spatial packages like tmap, and this uses libudunits2-dev which isn’t installed by default.

Spatial microsimulation 101

         · ·      · · ·

I recently gave a presentation for analysts and data modellers at the Department for Work and Pensions (DWP) introducing the spatial microsimulation technique (specifically the IPF flavour), and below are the slides I used (use spacebar to navigate through the slides): Much of the content is based on material from Spatial Microsimulation with R by Robin Lovelace and Morgane Dumont (online content | physical book) and my own rakeR package for R.

Simplify polygons without creating slithers

         · ·      · · ·

When simplifying polygons it’s almost inevitable that you will generate some slither polygons or gaps between the correct polygons. For example, the following image shows two adjoining complex polygons, representing two adjoining administrative areas. Note there are no gaps between the polygons; they are contiguous (the border is between Sheffield and Barnsley LADs, by the way).Original geometries without simplification Now if we simplify these polygons to reduce their complexity using simplify geometries in QGIS, gaps appear between the original two polygons and they are no longer contiguous.

House prices 3d visualisation

         · ·      · · · ·

On Saturday (24th September) I participated in the UK Data Service’s Open Data Dive Hackathon. The goal was to use open data to create an artefact or visualisation with the grand prize being the opportunity to have your artefact printed on one of MMU’s industrial 3D printers. I wanted to explore using a QGIS plugin called qgis2threejs to create 3D visualisations using the three.js javascript framework that allows you to render your visualisation in a WebGL-capable browser.

rakeR v0.1.1 released on CRAN

         · ·      · · · ·

I’m proud to announce the initial release of rakeR, v0.1.1, has been published on CRAN! It’s licensed under the GPLv3 so you can use it for any projects you wish. Purpose The goal behind rakeR is to make performing spatial microsimulation in R as easy as possible. R is a succinct and expressive language, but previously performing spatial microsimulation required multiple stages, including weighting, integerising, expanding, and subsetting. This doesn’t even include testing inputs and outputs, and validation of the results.