Shiny is a package for the R programming environment that makes it possible to develop and run interactive web applications from within an active R session. Each of the Shiny apps archived here provides a focused introduction to a topic of importance to analytical chemistry, covering an amount of material equivalent to one section of a chapter or one figure found in a typical textbook. Applications are run in a browser either remotely using shinyapps.io as a hosting service, or locally using a computer with R installed; details on both methods are outlined below. Not included here are Shiny apps that are part of the Analytical Chemistry 3.0 project.
The easiest way to explore a Shiny app is to use the link, which runs the app remotely using the shinyapps.io server as this does not require a local installation of R or the Shiny package. Access to shinyapps.io is through an account that limits the amount of monthly usage of the apps; if you cannot access one of these apps at shinyapps.io, try running the app locally on a computer running R.
Introduction to Beer's Law. This Shiny app introduces students to Beer’s law with particular attention to the relationships between absorbance, transmittance, and power, and to the fundamental, instrumental, and chemical limitations inherent in the application of Beer’s law.
Designing an Acid-Base Titration. This Shiny app introduces students to acid-base titrimetry at a level suitable for an introductory course in analytical chemistry. The module assumes students are comfortable with stoichiometric calculations, particularly as they apply to acid-base reactions, that they are familiar with the general shape of a titration curve, and that they appreciate the difference between a titration’s equivalence point and its end point. This app relies on the titrations package, which provides functions to simulate acid-base titration curves.
Absorbance, Transmittance, and Power. This Shiny app demonstrates the mathematical relationships between absorbance, transmittance, and the source's radiant power that are central to Beer's law.
Introduction to Chromatography. This Shiny app provides an introduction to chromatography with an emphasis on understanding basic chromatographic terms and measurements, and understanding the factors that affect the quality of a separation. The treatment is independent of the form of chromatography and, although data from GC and HPLC experiments are used to illustrate topics presented in some investigations, no emphasis is placed on particular chromatographic techniques.
shinyCV. This Shiny app simulates cyclic voltammetry experiments using the computational method outlined in Gosser, D. K. Cyclic Voltammetry Simulation and Analysis of Reaction Mechanisms, VCH, New York, 1993 and in Brown, J. H., J. Chem. Educ., 2015, 92, 1490-1496 (DOI).
Running a Shiny App Locally
To run a Shiny app locally you must have R and the Shiny package installed on your computer. To install R, first go the website www.r-project.org and click on the link to CRAN on the left side of the page under the heading "Downloads." Scroll through the list of CRAN mirror sites and click on a link to a site located in your region. Select the link in the "Download and Install R" box at the top of the page that is appropriate for your operating system and follow the directions. To install the Shiny package, launch R and type install.packages("shiny") at the command prompt; this will download and install the Shiny package and other packages required by Shiny. Installing a package does not make the package immediately available to you; to make the package available any R session, type load("shiny") at the command prompt. Finally, to run the app, use the "run locally using code from github" link and follow the instructions in the app's readme file; in general, the command is shiny::runGitHub("name of app","dtharvey").
All Shiny apps are released under a GNU General Public License that provides users with four essential freedoms: (0) to run the program, (1) to study and change the program in source code form, (2) to redistribute exact copies, and (3) to distribute modified versions.