How much is that meeting in the window?

Read more →

Making aRt

One of my 2021 resolutions was to engage with Tidy Tuesday more often. I’ve dabbled in the past but never recorded my work or published it. This week’s data was a catalogue of the Tate collection, and there have been some rather fantastic visualisations1, no doubt inspired by the fact the subject matter is art. The other week I saw a tweet by Ijeamaka Anyene showcasing some fabulous artistic plots made in R by using the coord_polar() function within {ggplot2}.
Read more →

Planning our Twitter walk

Let’s just acknowledge upfront that this is a very strange week to be writing about Twitter posting strategies1. This is the second blog about my coastalwalkr project, you can read the first here. The last post introduced a conceptual evolutionary jump for the mapbotverse — walking — and we’ve seen how in R we might be able to programmatically take a walk along the coast of Great Britain. For humans the walk in and of itself can be the sole purpose of the activity, but a mapbot probably needs something more to keep itself occupied and entertained?
Read more →

Let’s go for a walk

Back in October I developed a twitter bot based on Matt Dray’s londonmapbot. I’ve recently been thinking about other projects that might make good opportunities for learning, and thus blog posts. One idea was for a new addition to the mapbotverse1, which started as just tweeting a random location along the British coastline with maybe some of the same features as the narrowbotR but as I thought about it I wondered whether to make this a slightly more sophisticated bot.
Read more →

Prompt-moting a custom R prompt

The default prompt in the R console merely indicates it’s awaiting input. A single less than sign to signify R has nothing to do and wants you to give it a task. Back in October there was a mild buzz on #Rstats twitter about customising your R prompt after Romain Francois gave a talk at the R Addicts Paris Meetup. As documented in this RTask blog Romain’s prompt informs him of the active git branch and how much memory R is using.
Read more →

Virtual Gongoozling

gongoozler [n] a person who enjoys watching boats and activities on canals I’m sure I’m not the first person, and won’t be the last, to remark that 2020 is a very strange year. October 2020 marks five years since I last went on a canal boat holiday. An anniversary that at the outset of this year I had hoped I might have managed to avoid by taking to the water sometime over the summer.
Read more →

The interplanetary birthday express

Hello Humans, we cake in peace. We here at the Interplanetary Cake Union have noticed that you are missing out on the opportunity of celebrating your birthday more often by not knowing about your birthdays on other planets, and thus are potentially depriving yourself of more cake eating opportunities. Please use our birthday planets tool to review your age on other planets in the solar system, when your next birthday is and then use our Interplanetary Birthday Express service to order yourself a galactic collection of cake1.
Read more →

The Tidyvision Song Contest: Part Deux

My last post explored using the {tidymodels} package with data about the Eurovision Song Contest1. One of the best things to do when exploring a dataset is to visualise it, so let’s also use this dataset to learn about the {gganimate} package that provides ways to create animated charts. We’ll reuse the eurovision_scores dataset produced from the code in my last post. First let’s take a look at UK performance over time, we also need to filter out data from 1991 where Sweden and France both gained 146 points (but due to the complex rules in place at the time Sweden won, however under the current rules France would have won).
Read more →

The Tidyvision Song Contest

Last Saturday, Saturday 16th May 2020 was scheduled to be the 65th Eurovision Song Contest, but due to the ongoing COVID19 pandemic the contest was cancelled. Eurovision is very special to me, and I’ve been lucky to attend a couple of the finals and semi-finals – and, if you were watching the second semi-final of the 2015 contest you may have even seen me on TV! I’ve recently watched some of Julia Silge’s TidyTuesday webcasts using the {tidymodels} framework, and so instead of watching the EBU’s tribute show and getting rather sad about the contest not happening and Daði Freyr not winning and giving me an even better excuse to go back to Iceland1 I decided to play with {tidymodels} and the Datagraver’s Eurovision points dataset on Kaggle.
Read more →

When’s the case for case_when() ?

Last week I was taking some colleagues through the code for my COVID19 PDF scraping and afterwards one sent me a message asking about a chunk of code that used the dplyr::case_when() function. In particular they wanted to know why case_when() uses the tilde (~)1, which led to a bit more of a generalised conversation about case_when() and how it works. In your script, when you assign the values to the entity and position columns inside your case_when() call why do you use ~ rather than = or <-?
Read more →