World Cup 2018 predictions league

During the world cup I ran a competition to see who on the team was the best at predicting the results of world cup. Unlike everyone else in my company my competition used R Shiny as an interface and was hosted on an Amazon virtual machine.

I wanted to make the competition as simple as possible for me to run while making it easy for everyone to update the results so I settled on this format:

  1. I provided a csv template of al of the group stage games containing 4 columns
    1. Team A name
    2. Team B name
    3. Team A score
    4. Team B score
  2. Everyone had to fill that score sheet in and save their entry in a given folder
  3. The then had to add the name of their predictions to an entry form sheet
  4. Then I ran my R code to upload and score all of the predictions.

This was the initial format, and it worked. But it did involve me having to email out a table of results every day which didn’t quite feel right. So I made an alteration

  1. All of the predictions were uploaded to the internet
  2. An AWS machine was set up to run R and R shiny
    1. The machine was set up using this guide by Louis Aslett
    2. I did read lots of other guides and they were all good and had best practice info like put all of your code in github…etc. I didn’t do any of that. I got the code to work and stopped there.
    3. The code for running the league is here
  3. The R code mas modified to work in shiny

Now all I needed to do was change the actuals.csv with the new results and upload this and then everything just updated itself. This worked much better.

I did try to get Rstudio to read the predictions from my Dropbox but that only worked once then the link broke down so I stuck with the csv method. The shiny league had a league table and then a chart of the predictions. The chart was made using plotly.

 

Leave a Reply

Your email address will not be published. Required fields are marked *