Welcome
Hi.
I’m an NHS data analyst based in Scotland.
I’ve been using R for 10 years, and authored an introductory SQL course that had over 100K students during my time on the platform.
Why write about R?
Because I like it, there is a lot to learn, and there are plenty of SQL and Excel blogs out there already.
Topics covered in this blog
- tidyverse
- data.table
- data wrangling and manipulation
- parameterised SQL
- data visualisation
- text mining and sentiment analysis
- package development
- R programming
- mapping & working with spatial data

cusumcharter
An R package for CUSUM control charts, now available on CRAN. Continue reading cusumcharter

runcharter
An R package for quality improvement analysis, now available on CRAN. Continue reading runcharter

patientcounter
Track patient movements with ease. Continue reading patientcounter
See Projects for more
Why should I listen to you?
Because I’ll help you learn.
I know what it is to struggle to understand something, and how good it feels when you finally get it, and can move on with your work.
I am always delighted to hear that my posts are helping others.
I am told that I’m good at simplifying and explaining things - I think that is a useful quality.
I am self taught - I don’t have a background in computing or statistics, so if I can do this, you can too.

Iterating over multiple database tables with the tidyverse
Extracting data from multiple database tables with dplyr and purrr. Continue reading Iterating over multiple database tables with the tidyverse

Exploring your database with shiny
Programatically querying a database with flexible SQL queries and visualising the results with shiny. Continue reading Exploring your database with shiny

On target
A beginners introduction to getting started with the targets package in R Continue reading On target

simpler SQL with dplyr
comparing dplyr with SQL nested queries - and there is only one winner Continue reading simpler SQL with dplyr

The hourly heatmap with ggplot2
How I made the 24/7 heatmap from my previous post with ggplot2, dplyr and lubridate Continue reading The hourly heatmap with ggplot2

demystifying the coalesce function
coalesce is a one of those functions that might not strike you as being very useful, mainly because it doesn’t sound very exciting. But it IS useful, and might save you some time and complexity Continue reading demystifying the coalesce function

Mapping to a 't'(map)
the tmap package <- beautiful static and interactive maps with R Continue reading Mapping to a 't'(map)

Let it flow, let it flow, let it flow......
Animating dot plots to demonstrate patient flow Continue reading Let it flow, let it flow, let it flow......

It's a dirty job, but someone's got to do it..
A tidytext analysis of Faith No More lyrics Continue reading It's a dirty job, but someone's got to do it..
See Data by John for more