• Stars
    star
    249
  • Rank 162,987 (Top 4 %)
  • Language
    R
  • License
    Other
  • Created almost 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Make your R project Binder ready

Hole punch

R build status

Coveralls test coverage Lifecycle: maturing CRAN status

What this package does

holepunch will read the contents of your R project on GitHub, create a DESCRIPTION file with all dependencies, write a Dockerfile, add a badge to your README, and build a Docker image. Once these 4 steps are complete, any reader can click the badge and within minutes, be dropped into a free, live, RStudio server. Here they can run your scripts and notebooks and see how everything works.

Motivation

Binder is an open source project that can take any most GitHub repos of notebooks (R or Jupyter) and turn them into a free, live instance that not only has all dependencies ready to go but also provides Jupyter or Rstudio server to run the code on. The instances are small and should not be used to demonstrate resource intensive computation. However they are ideal for reproducing papers/figures/examples and make a great addition to any public analysis project that is being hosted on GitHub.

binder-bam

Why this is awesome

  • You can launch a free instance of Rstudio server from any of your projects on GitHub. The instance will have all of your dependencies and version of R installed and ready to go!
  • Easily allow anyone (up to 100 simultaneous users) to replicate or modify your analysis
  • Free

Limitations

  • The server has limited memory so you cannot load large datasets or run big computations
  • Binder is meant for interactive and ephemeral interactive coding so an instance will die after 10 minutes of inactivity.
  • An instance cannot be kept alive for more than 12 hours

Installation

remotes::install_github("karthik/holepunch")
# Please report any installation problems in the issues

Setting up your project as a compendium (recommended)

If you are unfamiliar with the idea of research compendia, I highly recommend reading this paper by Marwick et al:

Marwick B, Boettiger C, Mullen L. 2018. Packaging data analytical work reproducibly using R (and friends) PeerJ Preprints 6:e3192v2 https://doi.org/10.7287/peerj.preprints.3192v2

and also looking through my presentation at RStudio::conf 2019 where I talk about this in detail.

library(holepunch)
write_compendium_description(package = "Your compendium name", 
                             description = "Your compendium description")
# to write a description, with dependencies. Be sure to fill in placeholder text

write_dockerfile(maintainer = "your_name") 
# To write a Dockerfile. It will automatically pick the date of the last 
# modified file, match it to that version of R and add it here. You can 
# override this by passing r_date to some arbitrary date
# (but one for which a R version exists).

generate_badge() # This generates a badge for your readme.

# ----------------------------------------------
# At this time πŸ™Œ push the code to GitHub πŸ™Œ
# ----------------------------------------------

# And click on the badge or use the function below to get the build 
# ready ahead of time.
build_binder()
# πŸ€žπŸš€

Alternate setup method

If for some reason you really don't want to set up your project as a compendium, then set it up by creating runtime.txt and install.R. This build will take a very long time.

# Note that this particular approach will be super slow.
# And take just as long everytime you edit your code
library(holepunch)
write_install() # Writes install.R with all your dependencies
write_runtime() # Writes the date your code was last modified. Can be overridden.
generate_badge() # Generates a badge you can add to your README. Clicking badge will launch the Binder.
# ----------------------------------------------
# At this time πŸ™Œ push the code to GitHub πŸ™Œ
# ----------------------------------------------
# Then click the badge on your README or run
build_binder() # to kick off the build process
# πŸ€žπŸš€

Testing this package

An easy way to test this package without writing any code is to visit the binder-test repo and follow the instructions.

Roadmap

The ETA for the first release of this package is fall 2019 (after renv goes to CRAN). Comments, suggestions for improving the workflow or any other comments welcome in the issues. Other planned features include:

  • Full support for GitHub packages
  • Support for Bioconductor packages
  • Reference Binders to separate environment from code (still in early planning)

Code of conduct

Please note that the 'holepunch' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

More Repositories

1

wesanderson

A Wes Anderson color palette for R
R
1,766
star
2

markdown_science

Learn how to use markdown for science
TeX
300
star
3

rdrop2

Dropbox Interface from R
R
248
star
4

rstudio2019

Resources from my Rstudio::conf 2019 talk
220
star
5

testdat

A package to run unit tests on tabular data
R
141
star
6

life-hacks

Some life hacks documented
97
star
7

smb_git

A review paper describing how git can be used to improve reproducibility in science
Shell
85
star
8

rDrop

Programmatic interface to Dropbox
R
64
star
9

dashboard

A R package dashboard generator
CSS
44
star
10

rdat

An R interface to data Dat
R
43
star
11

ddd

data, data, data paper
TeX
43
star
12

ggplot-lecture

My lecture on ggplot at Cal (spring 2013)
TeX
41
star
13

Rtools

Sublime text package for R
Python
33
star
14

zenodo

Deposit data (or any research object) into Zenodo
R
17
star
15

woRstfigures

woRst R figures
12
star
16

fujifilm

Just a collection of my notes on the Fujifilm X-T2 and X-mount ecosystem
12
star
17

randNames

Random username (+other useful info) generator
R
11
star
18

binder-test

R
11
star
19

git_intro

A quick introduction to git
CSS
10
star
20

sheetseeR

A quick and easy interface to Google Docs + SheetSee.js
R
9
star
21

dcTemplate

Data Carpentry R lesson template
HTML
7
star
22

mozfest-data-lessons

Repo for the data carpentry session at Mozfest
5
star
23

dlab-advanced-r

Repo with material on learning testing, documentation, and package development in R.
5
star
24

mapboxer

Mapbox from R
HTML
5
star
25

ggit

Git visualization tools for git2r
R
5
star
26

software-mapping-workshop

Slides, notes, and resources for the CZI Essentials of Open Source grantee meeting, December 9th, 2020
4
star
27

colorPalette

A colorPalette API for R
4
star
28

webnativesci

OKFestival session on tools and skills for web native science
JavaScript
4
star
29

sevilla15

Repo for workshop at Sevilla, February 2015
CSS
3
star
30

coyote

Functions from my .rprofile now moved to a package
R
3
star
31

esa_data_viz

ESA 2013, Data Visualization in R workshop
R
3
star
32

Rtools3

R tools for Sublime text 3
Python
3
star
33

stat290

R
2
star
34

bmc_post

Set of files for BMC blog post
2
star
35

rProvenance

A prototype for a provenance library implementation in R
R
2
star
36

gigadb

R
2
star
37

RRR

The reproducibility lexicon project at BIDS
Python
2
star
38

commcall

R
2
star
39

rthings

Provides short lists of fake data for use in examples and demos
R
2
star
40

tradeoff

revisiting classic life-history tradeoffs with realistic assumptions.
R
2
star
41

api-best-practices

plos comp bio paper draft
2
star
42

almviz

ALM Visualization from the PLOS Hackathon
CSS
2
star
43

badge-test

1
star
44

ecotools

Find out what tools other scientists use to stay productive
1
star
45

roweb-test

HTML
1
star
46

distill

HTML
1
star
47

2014-02-13-UNSW

Repository for the UNSW Software Carpentry Bootcamp
Python
1
star
48

karthikram.github.com

My Jekyll-Bootstrap github page
JavaScript
1
star
49

binder-test-docker-tidyverse

R
1
star
50

misc-scripts

Python
1
star
51

nick_dates

R
1
star
52

dygraph-test

R
1
star
53

themegray4lyfe

HTML
1
star
54

2014-10-31-nw

Repository for the NorthWestern University bootcamp
Perl
1
star
55

urssi_figures

Repository accompanying "A Survey of the State of the Practice for Research Software in the United States"
HTML
1
star
56

species_interactions

1
star
57

eeguide

A guide to using the ecoengine
CSS
1
star
58

R-Icon

An alternative icon for R.
1
star
59

demo

R
1
star
60

antweb_paper

Paper on AntWeb
TeX
1
star
61

sparse

TeX
1
star
62

write-with-make

A quick repo with an example of how to write with Makefiles
TeX
1
star
63

ucsf19

Notes and slides from my workshop on open code at UCSF
1
star
64

shiny

Short Shiny tutorial
R
1
star
65

DataCabin

1
star