The SuperpowerUI is a GUI created to empower researchers to use the Superpower R package without coming into contact with the package code. The SuperpowerUI application is based in a Jupyter Notebook. It uses Jupyter Widgets to create a single-cell, tabbed application to walk a user through setting function parameters, running the funciton, and viewing the results.
The choice to create the app in a Jupyter Notebook makes it very portable because there are a number of platforms for hosting user-based notebooks. Many platforms like MyGeoHub.org, are built for hosting notebooks as a standalone app. Alternatively, JupyterHub can me used to serve the app to multiple users. A JupyterHub instance can be deployed on any cluster or cloud. The number of servers (nodes) can be conveniently scaled to accomidate the size of the user-base.
It is important that the application is designed in such a way that it is easy to change, fix, or add to the functionality of the software. When code is modular, code is broken down into organized, reusable components that reduce repetition throughout the code and makes it easier to understand and maintain. SuperpowerUI achieves this in two ways:
- Object-Oriented Programming
- Model-View-Controller Design
Code is also more maintainable and extensibile when it is well-documented for future use. There are notebooks that simplify on-boarding to the project that cater a wide ranch of skill sets. The code is also well commented.
rOpenSci is responsible for setting comprehensive standards for best practices in R packages. Section 1.3.3 Interactive/Graphical Interfaces establishs the importance of reproducibility:
"If providing graphical user interface (GUI) (such as a Shiny app), to facilitate workflow, include a mechanism to automatically reproduce steps taken in the GUI. This could include auto-generation of code to reproduce the same outcomes, output of intermediate values produced in the interactive tool, or simply clear and well-documented mapping between GUI actions and scripted functions."
Because SuperpowerUI is organized into MVC components, the Model contains a clear record of all parameters used to run the R code. This data is recorded and downloadable for future reference. As long as historical R package versions are maintained, the code could be easily re-run from R to reproduce the same results.