wlandau / Drake Examples
Programming Languages
Labels
Projects that are alternatives of or similar to Drake Examples
Consider targets
drake
is superseded. The targets
R package is the long-term successor of drake
, and it is more robust and easier to use. Please visit https://books.ropensci.org/targets/drake.html for full context and advice on transitioning.
drake examples
This repository is part of a community effort to collect, curate, and share publicly available examples of data analysis projects powered by the drake
R package. Each folder is its own example with a self-sufficient set of code and data files.
Run in a browser
Click this badge to open the examples in RStudio through your browser:
Run locally
You can download example files and run them locally with drake
itself.
# Install and load drake.
devtools::install_github("ropensci/drake")
library(drake)
# List the available examples.
drake_examples()
# Get an example
drake_example("main")
list.files() # See the new 'main' folder
Contributing
Please read the top-level CONTRIBUTING.md
and CONDUCT.md
for rules and instructions.
Introductory examples
-
customer-churn
: based on an RStudio Solutions Engineering example of how to use Keras with R. The motivation comes from a blog post by Matt Dancho, and the code is based on a notebook by Edgar Ruiz. -
stan
: validating a small Bayesian hierarchical model withrstan
. -
main
:drake
's main bare-bones introductory example, originally written by Kirill Müller and modified by Will Landau. Now based on R's built-inairquality
dataset. -
gsp
: A concrete example using real econometrics data. It explores the relationships between gross state product and other quantities, and it shows offdrake
's ability to generate lots of reproducibly-tracked tasks with ease. -
packages
: A concrete example using data on R package downloads. It demonstrates howdrake
can refresh a project based on new incoming data without restarting everything from scratch. -
mtcars
: An old legacy example with themtcars
dataset. Useload_mtcars_example()
to set up the project in your workspace.
High-performance computing examples
-
mlr-slurm
: an example machine learning workflow rigged to deploy to a SLURM cluster. -
Docker-psock
: demonstrates how to deploy targets to a Docker container using a specialized PSOCK cluster. -
sge
: usesdrake
's high-performance computing functionality to send work to a Grid Engine cluster. -
slurm
: similar tosge
, but for SLURM. -
torque
: similar tosge
, but for TORQUE.
drake
Example for developing -
hpc-profiling
: an example with a small number of medium-ish-sized datasets. The goal is to assess how long it takes (relatively speaking) to shuffle data around hpc workers. -
overhead
: an example explicitly designed to maximize strain ondrake
's internals. The purpose is to support profiling studies to speed updrake
.
Demonstrations of specific features
-
script-based-workflows
: demonstrates how to adaptdrake
to an imperative script-based project. -
code_to_plan
: questioning. Refer toscript-based-workflows
instead.
Real-world examples outside this repo
The official rOpenSci use cases and associated discussion threads describe applications of drake
in action. Here are some more real-world sightings of drake
in the wild.