R

Hex Mapping

Mapping and convenient lies Size isn’t everything When thinking about maps, it is important to understand what we are trying to show. In the last tutorial “The largest constituency is Ross, Skye and Lochaber. It measures approximately 12,000 square kilometres. The smallest constituency is Islington North at 7.35 square kilometres.” [From the UK Parliament site](“https://www.parliament.uk/about/how/elections-and-voting/constituencies/#jump-link-2")

Pivot tables in R - looking at police data

Looking at police data using Tidyverse tools The Tidyverse tools are one of my favourite things and made my R coding experience much simpler. Most of the things I’ll be posting will use them in one way or another. We’re going to find out what happens when someone reports a stolen bicycle - a friend seems to believe the police do nothing, so let’s investigate what actually happens. Downloading the data I’ve downloaded a month’s worth of data for South Wales Police from data.

Mapping the article 50 petition in R and ggplot - part 2

Mapping in R - using ggplot2, part two In the previous tutorial we looked at getting data from web APIs in JSON and GeoJSON formats to create a simple map. This time we’ll be adapting code from Timo Grossenbacher to make our map more attractive. Getting started We need to reload the data again, so we’re going to get a different number of signatures than last time. I’m going to run this in one block and assume you can follow along, if not go back to the previous post.

Mapping the article 50 petition in R and ggplot

Mapping in R - using ggplot2 The Revoke Article 50 petition got my colleague and all-round codemeister Dr Martin Chorley and I talking. We started thinking about ways that we could see what the patterns for people signing were like. It was well into the millions when I started playing with ways of visualising where people who voted were located. The site can map all of the signatures (5,962,824 at the time of writing), but it also has an option to get the data in a machine-friendly json format.