rchallenge-package: rchallenge: A Simple Data Science Challenge System

Description Installation Getting started Next steps Automating the updates on Unix/OSX Automating the updates on Windows Examples Note Author(s) See Also

Description

A simple data science challenge system using R Markdown and 'Dropbox' <https://www.dropbox.com/>. It requires no network configuration, does not depend on external platforms like e.g. 'Kaggle' <https://www.kaggle.com/> and can be easily installed on a personal computer.

Installation

Install the R package from CRAN repositories

install.packages("rchallenge")

or install the latest development version from GitHub

# install.packages("devtools")

devtools::install_github("adrtod/rchallenge")

A recent version of pandoc (>= 1.12.3) is also required. See the pandoc installation instructions for details on installing pandoc for your platform.

Getting started

Install a new challenge in Dropbox/mychallenge:

setwd("~/Dropbox/mychallenge")

library(rchallenge)

new_challenge()

or for a french version:

new_challenge(template = "fr")

You will obtain a ready-to-use challenge in the folder Dropbox/mychallenge containing:

The default challenge provided is a binary classification problem on the South German Credit data set.

You can easily customize the challenge in two ways:

Next steps

To complete the installation:

  1. Create and share subdirectories in submissions for each team:

    new_team("team_foo", "team_bar")

  2. Render the HTML page: publish() Use the output_dir argument to change the output directory. Make sure the output HTML file is rendered, e.g. using GitHub Pages.

  3. Give the URL to your HTML file to the participants.

  4. Refresh the webpage by repeating step 2 on a regular basis. See below for automating this step.

From now on, a fully autonomous challenge system is set up requiring no further administration. With each update, the program automatically performs the following tasks using the functions available in our package:

Automating the updates on Unix/OSX

For the step 4, you can setup the following line to your crontab using crontab -e (mind the quotes):

0 * * * * Rscript -e 'rchallenge::publish("~/Dropbox/mychallenge/challenge.rmd")'

This will render a HTML webpage every hour. Use the output_dir argument to change the output directory.

If your challenge is hosted on a Github repository you can automate the push:

0 * * * * cd ~/Dropbox/mychallenge && Rscript -e 'rchallenge::publish()' && git commit -m "update html" index.html && git push

You might have to add the path to Rscript and pandoc at the beginning of your crontab:

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

Depending on your system or pandoc version you might also have to explicitly add the encoding option to the command:

0 * * * * Rscript -e 'rchallenge::publish("~/Dropbox/mychallenge/challenge.rmd", encoding = "utf8")'

Automating the updates on Windows

You can use the Task Scheduler to create a new task with a Start a program action with the settings (mind the quotes):

Examples

Please contact me to add yours.

Note

The rendering of HTML content provided by Dropbox will be discontinued from the 3rd October 2016 for Basic users and the 1st September 2017 for Pro and Business users. See https://help.dropbox.com/files-folders/share/public-folder. Alternatively, GitHub Pages provide an easy HTML publishing solution via a simple GitHub repository.

version 1.16 of pandoc fails to fetch font awesome css, see https://github.com/jgm/pandoc/issues/2737.

Author(s)

Maintainer: Adrien Todeschini adrien.todeschini@gmail.com

Other contributors:

See Also

Useful links:


rchallenge documentation built on March 9, 2021, 9:06 a.m.