Category Archive: Computing

Many reports from 1 RMarkdown file

I was at the EdinbR talk this week by the RStudio community lead – Curtis Kephart. It was really interesting, but I disagree with his suggestion to point and click different parameters when… Continue reading

dplyr, (mc)lapply, for-loop and speed

Want to know whether lapply is quicker than a for-loop? Is there a faster solution? This is the place!

Getting started with spatial data in R – EdinbR talk

Slides from January 2018 EdinbR session on spatial data in R.

Network analysis video – 7th Scottish QGIS user group

Network analysis presentation from the 7th Scottish QGIS user group. Featuring Ordnance Survey open data, QGIS, GRASS and R.

Spatial networks – case study St James centre, Edinburgh (2/3)

This is part two in a series I’m writing on network analysis. The first part is here. In this section I’m going to cover allocating resources, again using the St James’ development in Edinburgh as an example. Most excitingly (for me) the end of this post covers the impact of changes in resource allocation.

Celebrating 20 years of CRAN

In April I spoke for the Royal Statistical Society (Glasgow branch) at their event celebrating 20 years of CRAN. The other speakers were Charis Chanialidis and Colin Gillespie. Like most people I find… Continue reading

RPostgreSQL and schemas

The database PostgreSQL can have different schemas. These work like a window for users, where they get to see specific things within a database, e.g. tables. In this post we’ll look at how… Continue reading

R with GRASS GIS – easiest Munros

I’ve been having a more sustained play with R and GRASS together. I’ve previously used them, in tandem, for processing satellite images, but haven’t been much further. In this post I’ll look at… Continue reading

R – iteratively changing column classes

When you write an ESRI Shapefile from R, writeOGR assumes your numeric fields are real numbers and so you get a lot of redundant zeros appended. This is misleading and distracting when you… Continue reading

R – Change columns names in a spatial dataframe

Ordnance Survey have a great OpenRoads dataset, but unfortunately it contains a column called ‘primary’, which is a keyword in SQL. This makes it challenging/impossible to import the OpenRoads dataset into a SQL… Continue reading