{"id":13857478,"url":"https://github.com/herbps10/reactor","last_synced_at":"2025-10-25T07:57:26.953Z","repository":{"id":138436510,"uuid":"195075428","full_name":"herbps10/reactor","owner":"herbps10","description":"Interactive notebooks for R ","archived":false,"fork":false,"pushed_at":"2021-05-10T21:04:59.000Z","size":3963,"stargazers_count":104,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-13T21:40:15.770Z","etag":null,"topics":["interactive","notebook","notebook-interface","r","reactive","statistics"],"latest_commit_sha":null,"homepage":"http://herbsusmann.com/reactor","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/herbps10.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-07-03T14:53:59.000Z","updated_at":"2025-04-10T02:50:57.000Z","dependencies_parsed_at":"2024-02-09T02:06:49.195Z","dependency_job_id":null,"html_url":"https://github.com/herbps10/reactor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/herbps10/reactor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbps10%2Freactor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbps10%2Freactor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbps10%2Freactor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbps10%2Freactor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/herbps10","download_url":"https://codeload.github.com/herbps10/reactor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/herbps10%2Freactor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280923456,"owners_count":26414234,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["interactive","notebook","notebook-interface","r","reactive","statistics"],"created_at":"2024-08-05T03:01:38.366Z","updated_at":"2025-10-25T07:57:26.938Z","avatar_url":"https://github.com/herbps10.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"# Reactor\n_Reactive notebooks for R_\n\n\u003c!-- badges: start --\u003e\n  [![Travis build status](https://travis-ci.org/herbps10/Reactor.svg?branch=master)](https://travis-ci.org/herbps10/Reactor)\n\u003c!-- badges: end --\u003e\n\n**This is experimental software**. There are bugs, and the API is liable to change without maintaining backwards compatibility.\n\n## What is it?\nReactor notebooks are collections of cells containing R code. When you update a cell, all of the cells that reference it are automatically updated, like how a spreadsheet works. Reactor notebooks integrate R code, plots, HTML, and markdown into one document.\n\nReactor notebooks are useful for prototyping code and exploring subjects through interactive visualizations.\n\n\u003ca href='https://hsusmann.shinyapps.io/gaussian_processes/'\u003e\u003cimg src='https://i.imgur.com/2Los4zE.png' width='75%' /\u003e\u003c/a\u003e\n\nReactor notebooks can be shared online as [Shiny](https://shiny.rstudio.com) applications. You can play with an [example notebook](https://hsusmann.shinyapps.io/gaussian_processes/) which is available online through Shiny.\n\n## Demo video\nThe [demo video](https://www.youtube.com/watch?v=2GViKLqthZo\u0026feature=youtu.be) on YouTube shows how to use Reactor to build a simple interactive notebook:\n\n\u003ca href=\"http://www.youtube.com/watch?feature=player_embedded\u0026v=2GViKLqthZo\n\" target=\"_blank\"\u003e\u003cimg src=\"https://img.youtube.com/vi/2GViKLqthZo/mqdefault.jpg\" \nalt=\"Reactor demo: interactive notebooks for R\" width=\"320\" height=\"180\" border=\"10\" /\u003e\u003c/a\u003e\n\n## Getting started\nInstall and load `reactor`:\n```r\ndevtools::install_github(\"herbps10/reactor\")\n\nlibrary(reactor)\n```\n\nCreate a new notebook and launch the Reactor server:\n```r\n# Create new Reactor notebook\nnotebook \u003c- ReactorNotebook$new()\n\n# Launch server at http://localhost:5000\nserver \u003c- start_reactor(notebook)\n```\n\nSave progress and stop the server:\n```r\n# Save progress\nnotebook$save(\"./notebook.rds\")\n\n# Stop server\nstop_reactor(server)\n```\n\nLoad the notebook later to start where you left off:\n```r\n# Load notebook\nnotebook \u003c- ReactorNotebook$load(\"./notebook.rds\")\n```\n\nReactor includes an example notebook:\n```r\n# Load Gaussian Process example notebook\nnotebook \u003c- reactor_example(\"gaussian_processes.Rmd\")\n\nserver \u003c- start_reactor(notebook)\n```\n\nYou can also see and interact with the example notebook running as a [Shiny application](https://hsusmann.shinyapps.io/gaussian_processes/).\n\n## Features\n\n### Reactive execution\nIf a cell is used to define a variable, Reactor keeps track of all the other cells that depend on it. If you update the variable, all the dependent cells are rerun.\n\n\u003cimg src=\"https://thumbs.gfycat.com/HarmoniousGroundedEquestrian-size_restricted.gif\" width=\"100%\" alt=\"Example of reactive execution\" /\u003e\n\n### Interactivity\nInteractive inputs can be used to set the value of an R variable.\n\n\u003cimg src=\"https://thumbs.gfycat.com/SickCircularLeonberger-size_restricted.gif\" width=\"100%\" alt=\"Example of interactive inputs\" /\u003e\n\n### Plotting\nReactor supports base plots and ggplot2.\n\n\u003cimg src=\"https://thumbs.gfycat.com/ParchedMedicalAardvark-size_restricted.gif\" width=\"100%\" alt=\"Example of interactive HTML widgets\" /\u003e\n\n### Widgets\nAny R variable with the class \"htmlwidget\" will be rendered as HTML. \n\n\u003cimg src=\"https://thumbs.gfycat.com/GrizzledSlowLacewing-size_restricted.gif\" width=\"100%\" alt=\"Example of interactive HTML widgets\" /\u003e\n\n### Saves to Rmd\nReactor notebooks are saved as [R markdown](https://rmarkdown.rstudio.com/articles_intro.html) files, which you can open and edit like any other Rmd file. You can see examples of notebook files in the [`inst/examples`](https://github.com/herbps10/reactor/tree/master/inst/examples) folder.\n\n### Run as Shiny\nReactor notebooks can be run as Shiny applications, making it easy to deploy notebooks online for sharing with others. See `vignette(\"shiny_deployment\")` for an example of deploying a notebook to [shinyapps.io](https://www.shinyapps.io).\n\n## And more\n\n- View documentation in a side panel by calling it up from a cell (e.g. `?lm`) or the shortcut Ctrl-Shift-?.\n- Export notebooks to R scripts, with the cells rearranged to run from top to bottom.\n\n## Comparison to existing tools\n\nReactor is inspired by [Observable](http://observablehq.com), which provides a similar notebook interface for Javascript. I've been very happy with the Observable workflow, and wanted to be able to use a similar interface with R so I could access more heavy duty statistical tools. In R, the package [Shiny](https://shiny.rstudio.com) is similar, in that it supports reactive execution for R, but it doesn't currently provide the ability to author code (a new package, [shinymeta](https://rstudio.github.io/shinymeta), does allow for exporting R code that Shiny generated reactively.) [Jupyter](https://jupyter.com) notebooks are a very popular notebook interface for various backend languages, but it generally does not enforce any execution order for its cells. The [dfkernel](https://github.com/dataflownb/dfkernel/) project extends Jupyter notebooks for Python to enable a reactive execution flow. \n\n|                                      | Language   | Authoring | Reactive |\n|--------------------------------------|------------|-----------|----------|\n| Reactor                              | R          | ✔         | ✔        |\n| [Pluto.jl](https://github.com/fonsp/Pluto.jl)    | Julia      | ✔         | ✔        |\n| [Shiny](https://shiny.rstudio.com/)   | R          |           | ✔        |\n| [Observable](https://observablehq.com)| Javascript | ✔         | ✔        |\n| [Jupyter](https://jupyter.com)               | Various    | ✔         | For Python with [dfkernel](https://github.com/dataflownb/dfkernel/)        |\n| Spreadsheets                         | Various    | ✔          | ✔ |\n\n## Todo list\n\n- [x] export to R script \n- [ ] export to HTML\n- [x] run in shiny\n- renderers\n  - [x] markdown\n  - [x] LaTeX\n  - [x] HTML\n  - [x] matrix\n  - [x] function\n  - [ ] data.frame/tibble\n  - [ ] vectors\n- HTML inputs:\n  - [x] range/slider\n  - [x] number\n  - [x] checkbox\n  - [ ] radiobox\n  - [x] text\n  - [ ] textarea\n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherbps10%2Freactor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fherbps10%2Freactor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fherbps10%2Freactor/lists"}