Baby Names in the UK and USA

Lost in the realms of time when reshape2 and ggvis were flavour of the month (i.e 20 months ago), I apparantly created a shiny app built around Hadley Wickham’s babynames data package With the recent release of a UK equivalent from Thomas Leeper and an intriguing plot on tennis world ranked number ones, I have decided to play around with the data both old and new

Read more

Share Comments

Ages by England & Wales constituency

There is are a lot of opportunities for data visualizations in journalism and R is beginning to get a toehold in this arena I recently came across a for-loop tutorial from the R for journalists blog and decided to reprocess it using tidyverse packages whilst adding a plot and map The article uses some GB office of National Statistics data to calculate the estimated mean age of the population of each of the England and Wales parliamentary constituencies

Read more

Share Comments

Theme Update

Yow will have noticed a new look to the site, now based on the Hugo Icarus theme The major reason for introducing this is that the previous theme I used was unable to render certain htmlwidgets I wanted to use to illustrate my code. The code may also be a bit more legible For those of you interested in creating a similar styled blog, please refer to Yihui Xie & Amber Thomas’s detailed documentation and a useful blog post by Ed Borasky on setting up a similar-themed site

Read more

Share Comments

Integrating dplyr with Remote databases

A recent RViews article covers the use of the dplyr package to interact with SQL databases All the code can be written in R, which dplyr then translates into SQL queries to harness the power of a database You will probably want to read the article if interested in extending the process to your own data but here is a taster from some of mine

Read more

Share Comments

RcppRoll package for swift moving averages

Bob Rudis always keeps his pulse on the best packages and recently bemoaned the fact that Kevin Ushey’s RcppRoll package which Provides Routines for the efficient computation of windowed mean, median, sum, product, minimum, maximum, standard deviation and variance are provided. has not had enough praise One reason is probably the lack of examples available - even in the vignette I have therefore done a swift illustration using just one of the functions, roll_sum()

Read more

Share Comments

What's News?

newsflash package Polymath, Bob Rudis (aka hrbrmstr) has recently released the newsflash package which is a “set of tools to Work with the Internet Archive and GDELT Television Explorer”" In a recent blog post, based on a gdelt project creator article, he details the coverage of Hillary Clinton’s email server woes, with the, unsurprising, fact that FOX News spent more time on the issue than other broadcasters

Read more

Share Comments

UK 2015 Election Mapped

Just providing a quick update to the previous post. Since that was done a few weeks ago, Evan Odell has been doing some great work on enhancing his Hansard package details of which you can view here. I plan to do some more work on this incredible resource in the future but for now am just looking at some mapping. This entails using the sf package for the first time - one which the experts are saying is going to have big impact on R development and a spot more purrr (which is part of the tidyverse environment)

Read more

Share Comments

Twitter Followers Collage

A relatively new, but extremely welcome, additon to the R blogosphere is Maëlle Salmon She recently posted Faces of #rstats Twitter, which describes how to get a collage of 50x50px images of tweeters with ‘rstats’ in their profile Here is the end-product

There are around 450 images, which happens to match my current number of followers so I thought I would adapt her code accordingly I have set the code to eval=FALSE to obviate a yet-to-be-resolved error when I remove a file

Read more

Share Comments

Spotify - all 20 million tracks

I have consistently been interested in assessing music information in R, for example my - somewhat dormant -charts dashboard A recent, excellent, blog post by RCharlie featuring the Spotify and Genius APIs to determine a ‘Gloom Index’ for Radiohead tracks piqued my interest. It also incorporates some illuminating code using the purrr package The Spotify, i.e. musical section of his work returns data swiftly and thus makes a Shiny app feasible allowing the full catalogue of 20 million tracks to be accessed.

Read more

Share Comments

Wikipedia Page Views

This is the first in a category of retreads where I look again at past work which could do with some loving care. This might be as they are broken, could do with some updating or be usefully enhanced One of my first shiny projects was using the wikipediatrend package to monitor daily page views on Wikipedia. Plotted in ggvis - which at the time seemed to be the future of interactive charts - it was also set up so that specific days could be clicked and links to articles in the Guardian newspaper were made available via the GuardianR package

Read more

Share Comments