Blog Archives

Newcastle R course, a write-up

September 22, 2014
By

I recently attended a week-long R course in Newcastle, taught by Colin Gillespie. It went from “An Introduction to R” to “Advanced Graphics” via a day each on modelling, efficiency and programming. Suffice to say it was an intense 5 days! Overall it was the best R course I’ve been on so far. I’d recommend it to others,...

Read more »

ASDAR book Review

September 8, 2014
By
ASDAR book Review

I was recently invited to write a book review for Applied Spatial Analysis and Policy (ASAP). The book, I conclude, “is the authoritative resource on R’s spatial capabilities” and should be of interest to many R users. Below is a preprint of the full review, now published on ASAP’s website. As a geographer and heavy R user,...

Read more »

Clipping spatial data in R

July 28, 2014
By
Clipping spatial data in R

This miniature vignette shows how to clip spatial data based on different spatial objects in R and a ‘bounding box’. Spatial overlays are common in GIS applications and R users are fortunate that the clipping and spatial subsetting functions are mature and fairly fast. We’ll also write a new function called gClip(), that will make clipping by bounding boxes...

Read more »

Consistent naming conventions in R

July 15, 2014
By
Consistent naming conventions in R

Naming conventions in R are famously anarchic, with no clear winner and multiple conventions in use simultaneously in the same package. This has been written about before, in a lucid article in the R Journal, a detailed exploration of names in R source code hosted on CRAN and general discussion on stackoverflow. Basically, there are 5 naming...

Read more »

Cleaning up oversized github repositories for R and beyond

June 25, 2014
By
Cleaning up oversized github repositories for R and beyond

The version control system Git is an amazing piece of software for tracking every change that you make to a project and saving its entire history. It is incredibly useful, for users of R and other programming languages, leading it shoot from 0 market share in 2005 (when it was first released) to market domination in one short decade. However, Git can cause confusion....

Read more »

Regular expressions in R vs RStudio

April 14, 2014
By
Regular expressions in R vs RStudio

The 'regex' family of languages and commands is used for manipulating text strings. More specifically, regular expressions are typically used for finding specific patterns of characters and replacing them with others. These technique have a range of applications and R's base installation has powerful regex tools (not to mention add-on packages for string manipulation such as stringr). Yet regex in R is cause of...

Read more »

Regular expressions in R vs RStudio

April 14, 2014
By
Regular expressions in R vs RStudio

The 'regex' family of languages and commands is used for manipulating text strings. More specifically, regular expressions are typically used for finding specific patterns of characters and replacing them with others. These technique have a range of applications and R's base installation has powerful regex tools (not to mention add-on packages for string manipulation such as stringr). Yet regex in R is cause of...

Read more »

Aggregating spatial points by clusters

March 21, 2014
By
Aggregating spatial points by clusters

With ubiquitous collection devices (e.g. smartphones), having too much data may become an increasingly common problem for spatial analysts, even with increasingly powerful computers. This is ironic, because a few short decades ago, too little data was a primary constraint. This tutorial builds on the 'Attribute joins' section of the Creating maps in R tutorial to demonstrate how clusters can be...

Read more »

Aggregating spatial points by clusters

March 21, 2014
By
Aggregating spatial points by clusters

With ubiquitous collection devices (e.g. smartphones), having too much data may become an increasingly common problem for spatial analysts, even with increasingly powerful computers. This is ironic, because a few short decades ago, too little data was a primary constraint. This tutorial builds on the 'Attribute joins' section of the Creating maps in R tutorial to demonstrate how clusters can be...

Read more »

Aggregation of point data to polygons MKII – US states

March 14, 2014
By
Aggregation of point data to polygons MKII – US states

After a colleague of mine requested an illustration of the aggregation technique that was part of an introduction to spatial data in R, I decided to revisit aggregation. The first article I posted here on the subject used data from London; this one is slightly different, using Twitter data aggregated to the state level in the USA. All example code...

Read more »