binder-flowr

Binder files for flowR https://github.com/flowr-analysis/flowr/wiki

https://github.com/code-inspect/binder-flowr

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.3%) to scientific vocabulary

Keywords

binder-ready r reproducibility
Last synced: 6 months ago · JSON representation ·

Repository

Binder files for flowR https://github.com/flowr-analysis/flowr/wiki

Basic Info
  • Host: GitHub
  • Owner: Code-Inspect
  • License: other
  • Language: R
  • Default Branch: main
  • Homepage:
  • Size: 4.9 MB
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • Open Issues: 1
  • Releases: 5
Topics
binder-ready r reproducibility
Created 12 months ago · Last pushed 9 months ago
Metadata Files
Readme License Citation

README.md

binder + flowR

DOI

This repository demonstrates how a project from OSF can be containerized and tested using Binder. We facilitate a one-click launch of the OSF project, allowing anyone to browse, execute the code, and verify or compare the results from the associated research paper. This aligns with the objectives of the CodeInspector project, where we aim to enable browser-based reproducibility and evaluation of open science projects.

How It Works

1. Downloading the OSF Project

We use the OSF API to retrieve a project hosted on OSF. This is done using the Python package osfclient.

For demonstration purposes, we use the following OSF-hosted project:

Carnevali, L., Valori, I., Altoè, G., & Farroni, T. (2024, January 23). Interpersonal motor synchrony in Autism: systematic review and meta-analysis. Retrieved from osf.io/dqjyh
License: CC-By Attribution 4.0 International

This project is downloaded to a folder named after its OSF project ID, which in this case is dqjyh.


2. Extracting Dependencies Using flowR

We utilize flowR to extract dependencies from the R files contained in the OSF project.

What is flowR?

flowR is a sophisticated static dataflow analyzer for the R programming language. One of its core features is dependency analysis: - Identifies the libraries required by the project - Detects data files that are read by the scripts - Recognizes R scripts that are sourced - Lists the output files generated

These dependencies are crucial for ensuring reproducibility, and they are used to generate install.R file, which is necessary for installing dependencies in RStudio.

3. Setting Up Binder

To make flowR available inside the Binder environment, we integrate it using two key components:

postBuild

The postBuild script ensures that flowR is installed when launching the RStudio session: ```bash

!/bin/bash

Install remotes package in R

R -e "install.packages('remotes')"

Install FlowR from GitHub using remotes

R -e "remotes::install_github('flowr-analysis/rstudio-addin-flowr')" ```

.Rprofile

To automatically set up the flowR RStudio add-in, we include the following in .Rprofile: r rstudioaddinflowr:::install_node_addin()

4. Creating a Docker Image for Reproducibility

The project is containerized using My Binder to enable execution directly from a web browser. This allows researchers to: - Browse the OSF project’s code - Execute the analysis - Compare results with the original paper

Alternative: Using repo2docker

Instead of using MyBinder, you can manually build the Docker image using repo2docker:

Steps to Build and Run the Image

  1. Install repo2docker by following the guide here.
  2. Clone this repository: bash git clone https://github.com/Code-Inspect/binder-flowR.git
  3. Build and launch the container using: bash jupyter-repo2docker https://github.com/Code-Inspect/binder-flowR

One-Click Reproducibility

By leveraging Binder, we facilitate a one-click launch of the OSF project, making it accessible for anyone to explore, execute, and verify the analysis. This contributes to the broader goals of browser-based reproducibility and evaluation of open science projects, as pursued under the CodeInspector project.

🚀 Click below to launch the project on MyBinder:
Binder

🚀 Click below to launch the project on the NFDI JupyterHub:
NFDI


Example Usage

The GIF demonstrates launching the project on MyBinder with flowR installed. The user opens an R script, selects a variable for analysis using the flowR RStudio add-in, and applies the "flowR: Reconstruct for Cursor Position" feature. This reduces the script to only the lines relevant to the selected variable, providing a streamlined view. This process, known as program slicing, helps simplify code by retaining only the parts necessary for computing a specific point of interest, such as a plot visualization.


By integrating OSF, flowR, and Binder, we aim to enhance transparency and reproducibility in computational social science and beyond. This repository serves as an example of how research projects can be packaged and shared in a fully executable, browser-based environment.


This work was funded by the German Research Foundation (DFG) under project No. 504226141.

Owner

  • Name: Code-Inspect
  • Login: Code-Inspect
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this repository, please cite it using the following metadata."
title: "binder-flowR: Reproducible OSF Project Execution with Binder and flowR"
authors:
  - family-names: "Saju"
    given-names: "Lorraine"
    orcid: "https://orcid.org/0009-0003-3168-9672"

date-released: "2024-03-24"
version: "1.0.4"
doi: "10.5281/zenodo.15078687"
repository-code: "https://github.com/Code-Inspect/binder-flowR"
license: "CC0-1.0"
abstract: >-
  This repository demonstrates how to containerize and execute OSF projects using Binder,
  enabling browser-based reproducibility. It integrates flowR for dependency extraction,
  automates setup through RStudio configurations, and provides a one-click launch to
  MyBinder and NFDI JupyterHub, supporting open science and computational reproducibility.

keywords:
  - Reproducibility
  - Open Science
  - OSF
  - Binder
  - Jupyter4NFDI
  - R
  - flowR

GitHub Events

Total
  • Create event: 5
  • Release event: 8
  • Issues event: 2
  • Watch event: 5
  • Issue comment event: 2
  • Push event: 14
Last Year
  • Create event: 5
  • Release event: 8
  • Issues event: 2
  • Watch event: 5
  • Issue comment event: 2
  • Push event: 14