rakeR v0.2.1 patched

I’ve patched rakeR on CRAN to v0.2.1 to fix a couple of problems in the examples and tests, which were using old labels and failing on some machines (thanks to Derek Atherton for the feedback). I’ve also updated the documentation website to use the new pkgdown template to be consistent with other R packages, most notably the tidyverse. And, that’s about it. If you’re using v0.2.0 and are happy there are no changes to the API to worry about. [Read More]

rakeR v0.2.0 on CRAN

I am absolutely delighted to announce that the latest version of rakeR, version 0.2.0, is on CRAN. You can install it in R or RStudio with: install.packages("rakeR") DOI rakeR now has a DOI. This is probably more useful for me than it is for you but nevertheless, if you use rakeR please be sure to cite it and use the DOI: https://doi.org/10.5281/zenodo.821506 Changes and improvements Speed improvements in integerise() The most noticeable change is that the integerise() step, which previously took hours on a reasonable–sized data set, now takes minutes. [Read More]

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): Alternatively you can download the presentation as a standard html file to open in your browser. 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. [Read More]

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. [Read More]

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. [Read More]

townsendr interactive map

This week I updated my Townsend Material Deprivation Score project. The update makes townsendr an interactive online map of deprivation that users can simply view in their browser, rather than having to download and run the R code or view only static maps. I think the result is much more intuitive and useful. Making the map interactive is achieved by using Shiny, a technology for R to make interactive charts and plots. [Read More]

Formal informal testing of research code

When writing research code I do test my code and results, but until recently I’ve only been doing this informally and not in any systematic way. I decided it was time to change my testing habits when I noticed I had recoded a variable incorrectly despite my informal tests suggesting nothing was wrong. When I went back and corrected this error this made a small, but noticeable, difference to my model. [Read More]

Automate Hyperlinks in LibreOffice Calc

I’m in the middle of obtaining articles I’ve identified as part of literature review search. I have a large LibreOffice Calc table with bibliographic details of all the articles I’ve considered (plus a marker for whether I have excluded the article manually or not). Having to copy and paste article titles or DOIs into Google is a bit of a chore, if I’m honest, as there are nearly 100 of them, so to automate the Google search somewhat I carried out the following steps: [Read More]

Using Git and Github

Git is a powerful way to manage your code. It’s main advantage for working with code of any kind are: You can commit (or bookmark) your code as you go along. That way, you can easily undo any mistakes you may make. You can track your code changes locally on your computer, and upload these changes to a server (like Github) to keep a backup. This is especially useful, for example, if you work without an internet connection on a laptop: you can make and track changes and then upload them when you’re back online without fear of losing anything. [Read More]

Managing your Git Fork

In the post forking with github I described how to fork a repository and have it point back to the original. In this post I describe how I manage my fork and ultimately how I suggest changes to the original author that they may (or may not) make in their original. Tracking Changes in Your Forked Version Your fork behaves like a normal repository, so you can make changes to your code as often as you like, commit changes, and then push these commits to the server version of your repository. [Read More]