Bournemouth to bash on?

I have plans to hive off the soccer/football section off to a separate blog as many sports readers will not be interested in code but until then, here is my latest effort As the new season is now upon us it was time to post a new article. I have also been intending to pen something based around James Curley’s excellent engsoccerdata package which anyone interested in R and European football should definitely check out

Read more

Share Comments

Pimping the StatCan Blog

Statistics Canada make available masses of useful data from Censuses and Surveys. One way they communicate is via twitter e.g. library(blogdown) shortcode("tweet", "891757886011002883") In 2001, 31% of young adults (aged 20 to 34) were still living with their parents. Any change in 2016? Stay tuned! https://t.co/lUMBplYJWW pic.twitter.com/4CA3DvhuNw — Statistics Canada (@StatCan_eng) July 30, 2017 Since January 2013 have also issued monthly blog posts covering a wide range of social and economic matters of interest

Read more

Share Comments

When Babe Ruth met Kandinsky

When Babe Ruth first retired from baseball he found it tough. Without the protection of the Yankees PR department his various, and widespread, indiscretions were fodder for the yellow press and the reluctance of anyone to give him a managerial position was humiliating So he became a virtual recluse mainly fly-fishing, painting water-colours and studying the lives of contemporary artists. It was during the late 1930’s that he discovered that his favourite painter, Wassily Kandinsky, was alive and living in France.

Read more

Share Comments

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 Comments

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 Comments

Weather plots for any US location

There are issues with packages in this post. Here are author comments weatherData

“All, yes looks like WU is no longer making it easy to get CSV files without API’s. If anyone figures out a URL for directly fetching CSV’s, I will modify the package. But until then, we are stuck” ggjoy

“All code has been moved over to package ggridges. As of this version, ggjoy simply calls ggridges and re-exports relevant functions under the old name.


Read more

Share Comments

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 Comments

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 Comments

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 Comments

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