Skip to content
An R package that teaches drake
Branch: master
Clone or download
Latest commit 2f5c173 Jul 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Public release Jun 11, 2019
R Add a save_slides() function Jul 12, 2019
inst Slight tweak Jul 22, 2019
man Add a save_slides() function Jul 12, 2019
tests Add a save_slides() function Jul 12, 2019
.Rbuildignore Merge .Rbuildignore Jul 22, 2019
.gitignore Merge .Rbuildignore Jul 22, 2019
.lintr Public release Jun 11, 2019
.travis.yml Try to auto deploy to binder Jul 3, 2019
CODE_OF_CONDUCT.md Public release Jun 11, 2019
CONTRIBUTING.md Edit meta file Jul 3, 2019
DESCRIPTION Add a comma Jun 27, 2019
LICENSE Public release Jun 11, 2019
NAMESPACE Add a save_slides() function Jul 12, 2019
README.Rmd Add a save_slides() function Jul 12, 2019
README.md Add a save_slides() function Jul 12, 2019
deploy.sh Change commit flag Jul 5, 2019
learndrake.Rproj Public release Jun 11, 2019

README.md

Travis build status Codecov test coverage Launch RStudio Binder

Reproducible workflows at scale with drake

Ambitious workflows in R, such as machine learning analyses, can be difficult to manage. A single round of computation can take several hours to complete, and routine updates to the code and data tend to invalidate hard-earned results. You can enhance the maintainability, hygiene, speed, scale, and reproducibility of such projects with the drake R package. drake resolves the dependency structure of your analysis pipeline, skips tasks that are already up to date, executes the rest with optional distributed computing, and organizes the output so you rarely have to think about data files. This workshop will teach you how to create and maintain machine learning projects with drake-powered automation.

Installation

To obtain the workshop materials, install the learndrake package, TensorFlow, and Keras.

install.packages("remotes")
remotes::install_github("wlandau/learndrake")
tensorflow::install_tensorflow()
keras::install_keras()

Usage: browser

Just click this badge: Launch RStudio Binder. Your browser will open the materials in a free RStudio Server instance. The exercises are in the notebooks (1-churn/1-churn.Rmd, 2-setup/2-setup.Rmd, etc.).

Usage: local

The functions in learndrake help navigate and deploy the workshop materials. If you installed the package and dependencies as above, you can take the workshop locally without an internet connection. Start with the introductory slides, then move on to the notebooks. Launch apps along the way as directed.

Function Purpose
launch_app() Launch a Shiny app that accompanies a tutorial.
save_app() Save the app files so you can deploy to shinyapps.io or Shiny Server.
save_notebooks() Save the tutorials to your computer: R notebooks and supporting files.
save_slides() Save the introductory slides to your computer.
view_slides() Open the introductory slides in a web browser.

Introductory slides

The workshop begins with an introductory presentation on drake. View the slides at https://wlandau.github.io/learndrake/index.html or open them yourself in a browser with view_slides().

Tutorials

After the introductory presentation, students work through a sequence of R notebooks in order. Use save_notebooks() to save the notebooks and supporting files to your computer.

Notebook Topic
1-churn.Rmd Deep learning case study
2-setup.Rmd Convert the case study to a new drake project.
3-flow.Rmd Develop, work, and iterate on the project.
4-plans A deep dive into drake plans.
5-files Custom input and output data files.
6-reports Special considerations of knitr and R Markdown reports.
7-hpc High-performance computing

Apps

Notebooks 3-flow.Rmd and 4-plans.Rmd come with supporting Shiny apps to conduct the learning exercises.

App Notebook Deploy locally Public URL
Iterate on a drake workflow 3-flow.Rmd launch_app("flow") http://wlandau.shinyapps.io/learndrakeflow
Exercises on drake plans 4-plans.Rmd launch_app("plans") http://wlandau.shinyapps.io/learndrakeplans
Visualize drake projects 4-plans.Rmd launch_app("drakeplanner") http://wlandau.shinyapps.io/drakeplanner

Thanks

Thanks to For
Edgar Ruiz Uniting drake and keras at https://github.com/sol-eng/tensorflow-w-r and providing valuable advice on the construction of the workshop.
Matt Dancho Publishing the original blog post with the workshop’s underlying case study.
Eric Nantz Reviewing and providing feedback on this workshop.
You can’t perform that action at this time.