Automated congratulatory tweet to Twitter Friends

On the front page of my premiersoccerstats site, I have a Player Milestones table which highlights players who have reached certain levels in the Premier League’s latest round of games e.g. 100 Appearances This requires comparing two datasets and subsetting the rows with differences in the variable of interest. To this end, I use the daff package which was the subject of a presentation at the recent R User 2017 conference

Read more

Share

User2017- padr package example

Of course, it is not the same as actually being there, but as a good fall-back the videos of the talks for the R User 2017 conference are now available on channel 9. I’ll be dipping into them over the next few weeks and reporting on any I find of interest. Let’s kick-off with the padr package from Edwin Thoen. It is on CRAN

Read more

Share

Weather plots for any US location

Over the past week or so, there has been quite the buzz about the ggjoy package from Claus Wilkie As he states

Joyplots are partially overlapping line plots that create the impression of a mountain range. They can be quite useful for visualizing changes in distributions over time or space. The name “joyplot” was proposed by Jenny Bryan on Twitter on April 24, 2017, in reference to the iconic cover art for Joy Division’s album Unknown Pleasures.

Read more

Share

Mapping Eurostat information Part 1

Keeping up with the theme of utilizing official government open data to map via an R package I will now turn to the eurostat package which accesses data - via an API - from the European Commission. First released in 2015, there is an article (wuth R code) by its authors in the most recent issue of the R Journal,91 which makes for an interesting read covering a variety of topics

Read more

Share

Useful links for mapping in R

Geography was not my favourite subject as a high-schooler: maybe having a teacher who smoked a pipe in the classroom had somethiing to do with that. In fact, I swiched to Ancient Greek as an option as soon as I could: it was that bad However, for some time I have loved early maps and have this one (regrettably not the original) on my wall at home

Recently I have been captivated at how modern ones can be used for socio-economic analyses with leading publications such as the Economist and 538 regularly producing maps using open data in their articles.

Read more

Share

First look at Tidycensus

The whole future of the US census has been coming under scrutiny recently, but, thankfully, we are getting more tools to scrutinise both its decennial data and that of its sister-source, the American Community service (ACS). Specifically, Kyle Walker’s tidycensus and tigris packages which return data-frames (including shape-files as list-columns, if required) from the census API and Edzer Pebesma’s sf, simple features, package

Read more

Share

Get me to the church on time

2017 seems to be the ‘Year of the Map’. The simple features, sf package is and will continue to have a great impact and the recent release of leaflet.extras adds some glitz to the leaflet package Added to this list can be rmapzen which is a client for the Mapzen API. Author, Tarak Shah has provided an introduction to his work-to-date and I have leant on that heavily in this post to create contour maps.

Read more

Share

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

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

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