Shiny Applications

All applications linked to on this page are the intellectual property of Richard C. Gayle and the ideas contained therein may not be used for any commercial purpose without his explicit written consent.

Statistical Applications: A collection of statistical applications for use in an elementary statistics course written using the Shiny package in R. There is an 'expert-system/decision tree' for the applications here which is intended to guide users, particularly students unsure of what they're doing (T-test? Z-test? Data? Statistics?), to the correct application by making a sequence of fairly simple selections or answering simple questions.

Number Theory: I was helping a friend with the mathematics portion of a cryptography course s/he was taking when it occurred to me that many of the tasks required in the course (e.g. modular arithmetic, RSA en/decryption, factoring, arithmetic of modular curves) could be rendered effectively as Shiny apps. Here are the apps which I developed in order to help my friend.

Fun with Words/Shapes/Colors/Etc.: In developing the statistical applications as well as the application for demonstrating the geometric arithmetic of elliptical curves, I had to write a lot of graphical functions to get the plots/pictures I wanted (as well as to get R to use some Python modules I had written earlier for numerical zero-finding - cf. 'R reticulate'). None of the developed R packages (eg. ggplot and its relatives) did what I wanted. These few apps are just time-wasters I wrote merely as exercises to see if I could produce some interesting colored shapes as R plots and deliver the results as Shiny apps. Just recently I wrote an app to produce possible (but not necessarily acceptable) solutions to the NYT Spelling Bee puzzle. It is a bit slow (MUCH faster than it was, though) but will produce a list of words to try for the frustrated solver as well as words known to be unacceptable. Another includes the Spelling Bee search along with two other, more general word search applications. Here is an odd little application which I use to track my 'resource' use. Dental floss is a resource, by the way.

File Data/Manipulation: A friend had two Google Sheets. In one were participants at a large dinner as rows. In the second were 'table' columns to which each participant from the first was assigned. The task was to produced a column in the first sheet consisting of the table assignment for each participant from the second. I didn't know how but knew how to do this easily in R using data frames. This app uses spreadsheets converted to .csv files to do the task in R and produce a downloadable .csv as a result.

Just as an exercise, I produced two apps which allow one to filter data through a visual interface. Unbeknownst to me was that a number of the 'filtering functions' which I built in the process already existed as built-in shiny functions in slightly different forms. Oh well. The first, here, allows one to upload a csv file into an R data frame, make a scatterplot out two of its quantitative variables, and then select cases from the scatter plot using brushing (mouse generated rectangle). The second, here, does a similar thing except that the case selection is achieved through mouse clicks and, more importantly, it also accommodates non-numeric data. Specifically, if a numeric and categorical variable are selected, it makes something like a scatterplot from which cases can be selected by clicking. If two categorical variables are selected, a contigency table for the two appears. Cases from the data frame are then culled by clicking on cells in the table. If multiple cells are clicked, since cells correspond to mutually exclusive subsets of the data frame, 'Save Clicked Cases' effects the union of all these subsets. As with numeric data, 'Clear Clicked Cases' voids the subsetted data frame. I originally deployed this second app to my own shiny server (Ubuntu, Digital Ocean) where it ran fine. After modification and redeployment, it would not run (would immediately disconnect when data columns were selected). So I have temporarily deployed it on my shinyappsio account while I suss out the issues. TMI?

Math Games/Demos: At this link you can find further links to a variety of 'games' which I've created for students of calculus or elementary algebra to explore concepts and/or practice skills. They're organized by topic, vaguely. Eventually, I'll expand these to embrace topics from other areas of elementary mathematics, perhaps.

Miscellanea: An app written in answer to a spec task as a tryout as an R/Shiny developer (which I evidently am not): Ships. The point was to take a largish (483MB) .csv file with a variety of data about ships in the Baltic (the outfit is in Poland) and related waterways and turn it into an app which would locate a specific kind of movement for each ship and display it visually use the leaflet R package. The request was that I write the app using modules to create and control the UI and use a specific formatting package (apparently created by one of the firm's founders) to control the 'look' of the UI. I (1) had never used leaflet, (2) had very limited exposure to writing modular apps, and (3) had never used the particular formatting package requested. I managed to come up with something that seems to work...but needless to say won't get me a job.

Questions? Email me here.