Publications by HighlandR

Iterating over multiple database tables with R

27.04.2022

You want to run a query over multiple tables in your database / warehouse and then process and visualise the combined results of those queries. You need to be able to switch between servers, databases, schemas and tables, selecting different columns and applying different conditions in the WHERE clause. You don’t have permsissions to write co...

4342 sym R (3633 sym/12 pcs)

Exploring your database with shiny

13.06.2022

Several of my recent blog posts have been focussed on using {purrr} and {glue} to programatically query a database. This is something I’d been wanting to achieve for some time, but my efforts got put on hold when COVID-19 came along. The general approach is to use a config file to denote the relevant tables and columns, along with the server an...

2561 sym

SIMD Revisited

16.07.2020

The Scottish Index of Multiple Deprivation updated for 2020 I have blogged about the SIMD previously. The last time was using data from 2016. Earlier this year, the data was refreshed, and my friend David Henderson was hot off the press with some very nice plots indeed. Even better, he’d shared his code, so I was tempted to quickly hop onto my...

3676 sym 20 img

ggExtra is Extra useful

03.04.2016

Amending plots with easy to remember syntax – I love ggplot2, but I struggle to remember some of the specific syntax I need to get my plots looking the way I want, especially those relating to making tweaks in the theme settings. Two of my most common changes are to rotate x axis labels, (so every date point is labeled), and removing ...

1614 sym R (228 sym/6 pcs)

ggExtra is Extra useful

03.04.2016

Amending plots with easy to remember syntax – I love ggplot2, but I struggle to remember some of the specific syntax I need to get my plots looking the way I want, especially those relating to making tweaks in the theme settings. Two of my most common changes are to rotate x axis labels, (so every date point is labeled), and removing ...

1832 sym

Chart MakeoveR

22.05.2016

Working out with (geom) dumbbells – The following chart appeared on my Twitter feed last week: There is quite a lot of information on there, but bar charts are not perhaps the best choice for visualising data over time. This is not to be critical – it gets a lot of data across in one plot, but I thought it would be interesting to ha...

5102 sym R (635 sym/3 pcs) 6 img

Chart MakeoveR

22.05.2016

Working out with (geom) dumbbells – The following chart appeared on my Twitter feed last week: There is quite a lot of information on there, but bar charts are not perhaps the best choice for visualising data over time. This is not to be critical – it gets a lot of data across in one plot, but I thought it would be interesting to ha...

5105 sym R (635 sym/3 pcs) 6 img

Intro to ggplot2

25.05.2016

Here is the link to a ggplot2 demo I presented at the InveRness RUG last week : intro to ggplot2 It’s in ioslides (html) format, for best viewing press F on your keyboard for full screen, and toggle widescreen on/off with the W key. It’s for beginners / those new to ggplot2. This is just scratching the surface of this amazing package. Hope t...

763 sym

Intro to ggplot2

25.05.2016

Here is the link to a ggplot2 demo I presented at the InveRness RUG last week : intro to ggplot2 It’s in ioslides (html) format, for best viewing press F on your keyboard for full screen, and toggle widescreen on/off with the W key. It’s for beginners / those new to ggplot2. This is just scratching the surface of this amazing package. Hope t...

763 sym

F is for Forecast

13.11.2016

First steps with time series and prediction in R – At the August meeting of the Inverness R User Group, one of the members gave an introductory presentation on times series in R. One of the data sets we looked at were the weekly CO2 levels from the Mauna Loa Observatory, Hawaii. This data is provided by the Scripps CO2 Program. At the...

12653 sym 52 img