Blog Archives

R + D3, A powerful and beautiful combo

March 15, 2017
By

For a while now, I have been looking for ways to incorporate pretty D3 graphics into R markdown reports or shiny apps. Why? I like R for the ability to be able to do data handling, stats, ML all very easily with minimal code. But when you want to prese...

Read more »

Keith Matthews Exam Question…

December 14, 2016
By
Keith Matthews Exam Question…

Help? I set an exam question with 10 boxes to be filled from 13 possible answers. If randomly completed, what should be the average mark? - @KeithRMatthews, 12:13 PM - 15 Dec 2016 library(ggplot2) answers <- letters options <- letters[...

Read more »

Noob package development: job ads data in R with Adzuna

June 7, 2016
By

Part of our mission at The Data Lab is to create jobs in Data Science. This got us thinking that perhaps we should find a systematic way of quantifying the job market in Scotland and generally. We stumbled upon Adzuna, never heard of it? It’s quite cool, looks and feels like a jobs board but is actually a very...

Read more »

Does weather cause accidents – part 2

April 11, 2016
By
Does weather cause accidents – part 2

In part 1 I showed how to grab data from the forecast.io, now that we have all of that I want to use it to investigate the effects of weather on accidents. First, I realised after playing around a little that one possible way of doing this was as follows; In part 1 we grabbed weather data associated with...

Read more »

Does weather cause accidents – part 1

March 26, 2016
By

Blending weather data Scotland and other parts of the UK have some nicely curated open data on road traffic accidents. For individual cases, where and when they happened, how severe they were, the prevailing road conditions, which emergency services were involved and so on. It felt to me like this should be a very valuable resource and might help us...

Read more »

Language categorisation of Star Wars character names

January 5, 2016
By
Language categorisation of Star Wars character names

Last year in December, in time for the big release, myself and a colleague at The Data Lab were having some fun with an Star Wars character names that we had scraped from Wikipedia. Luckily for us a national outlet, The Scotsman picked up on this and put out an article on their website. We had the...

Read more »

Seasonal mortality trend decomposition

December 10, 2015
By
Seasonal mortality trend decomposition

I recently wrote a blog on trends and seasonal variation in fruit and veg wholesale prices provided by DEFRA. It was using a beatiful technique called ‘STL’ or seasonal-trend decomposition via loess. Just now I spotted a dataset from the Office for National Statistics on winter mortality. ONS highlight that: last winter was a particularly high winter...

Read more »

Extracting data from Salesforce

December 6, 2015
By

I have been asked to access and present some of our own internal data, stored on a CRM system called Salesforce. Luckily for me someone had already written a set of R bindings for it (phew). As always thank a million to the authors of RForcecom, details of which can be found here. A while ago, I was...

Read more »

Downloading your twitter feed in R

December 6, 2015
By

The twitteR library is one of the most comprehensive R bindings for an API that I have ever seen. Thanks a million to Jeff Gentry for authoring and maintaining it. It took me a while to get to know it and I thought I'd share a little trick here. I recently wanted to trace the generation of my...

Read more »

Geographic clustering of UK cities

November 23, 2015
By
Geographic clustering of UK cities

I know I am probably late to this party but I recently found out about DBSCAN or "A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise". In a nutshell, the algorithm visits successive data point and asks whether neighbouring points are density-reachable. In other words is it possible to connect two points with a chain of...

Read more »

Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)