Conor Neilson

Marine Biologist turned Data Scientist/Engineer.

Two new data packages

By Conor Neilson |  Oct 23, 2021  | r
I’ve recently released two new data packages for R - read on to learn more about them. I’ve spent some time recently building a couple of new data packages. I was inspired by coming across a dataset by tech magazine ‘The Hustle’. They collated a dataset called “The Hustle’s iPhone vs. Android Survey” which surveys peoples phone preferences. In analysing this data I found it had a field that reported the city the respondent was from.
Continue Reading...

Integrating blogdown and pkgdown

By Conor Neilson |  Sep 4, 2021  | blogdown, r, tutorial
Make your pkgdown websites be part of your blogdown website. Context I have websites set up using both blogdown and pkgdown. The reason for using both is they solve very different problems. For instance I have My main personal website, built with blogdown, and hosted by Netlify Individual websites for R packages, built with pkgdown, and hosted on Github Pages This is a case where it’s appropriate to be using both.
Continue Reading...

What I have in my .Rprofile

By Conor Neilson |  Aug 22, 2021  | r
The .Rprofile file is an extremely useful piece of R. For those who haven’t encountered .Rprofile before, it is a text file where you can put R code - this code is then source’d everytime R starts up. Thus, it makes a great place to set options you use frequently, create functions, or just to wish yourself a good morning. In this post I plan to run through the things I like to put in my .
Continue Reading...

A quieter scrobbler

By Conor Neilson |  Aug 15, 2021  | package-development, r
I just released a tiny update to scrobbler. Something you may have noticed is that scrobbler can sometimes be rather loud when you are using it. When downloading scrobbles it likes to print your username and api key periodically. This is both annoying and (in the case of the api key) rather unsafe. The new version of scrobbler will still print its progress indicators, but will no longer emit your authentication details.
Continue Reading...

Current dev project - spotty

By Conor Neilson |  Aug 15, 2021  | package-development, r
I started playing around with a new package today which I’ve titled spotty. spotty’s goal is to be a minimal wrapper around the spotify API. It intends to only do a small number of things but do them well. There is of course the very well done package spotifyr by Charlie Thompson. spotty is not indended to compete with this package at all, and will not come anywhere near the breadth of features offered by spotifyr
Continue Reading...

Generated plots are now working by default?

By Conor Neilson |  Aug 15, 2021  | r
In a previous post I described how plots generated via R code weren’t showing in my posts. The fix I ultimately found was to set a particular knitr chunk. I didn’t really understand it, but it seemed to work. This no longer seems to be the case. I tried generating some plots today to test, and they work out of the box now. Check the code below - there are no other knitr chunks in this document.
Continue Reading...

Scheduling scrobbler (properly this time)

By Conor Neilson |  Aug 14, 2021  | r, tutorial
I finally learn how Github Secrets work! My previous mistake In a previous post, I showed an example of how to use Github Actions to schedule scrobbler to run automatically and save the downloaded data into your github repo. This was a bit janky because you had to hardcode your API details into the script, and therefore it had to be a private repo in order to avoid leaking your details.
Continue Reading...

Scheduling scrobbler to run automatically

By R package build |  May 20, 2021  | r, tutorial
Using github to automatically schedule, run, and store dataframes of your scrobbles in a repository. One of the biggest issues you can run into when trying to analyse your scrobble data is waiting for it all to download when running download_scrobbles(). While the addition of update_scrobbles() partially helps this, it still relies on you having a relatively recent source of scrobbles available in a dataset. The idea behind this post is to setup a github repo where you can store scrobbled datasets.
Continue Reading...

Announcing 'words'; an R package containing scrabble allowed english words

By R package build |  May 16, 2021  | package-development, r, tutorial
I’m thrilled to announce the release of my new package words. words is an extremely simple package, but I’m excited to use it for my future projects. Recently I’ve been playing around with some word based puzzles in R. One of the examples of this is wordbuilder, which finds all valid words of from a given list of 5 letters. In an example like this, one of the challenges is finding a list of valid english words.
Continue Reading...

Generated plots not showing in blogdown

By Conor Neilson |  Apr 4, 2021  | r, blogdown
Debugging why my plots weren’t showing up in blogdown While writing my last post, I discovered that while using blogdown::serve_site(), any plots generated by R code weren’t showing up in the website. The first thing I did was remove the .gitignore file under my static directory. This unfortunately didn’t fix the issue (but I suspect was still a contributor to the final fix.) The second thing I did was add a setup R chunk that had the code knitr::opts_chunk$set(echo = TRUE, fig.
Continue Reading...