James C. Birk
February 16, 2020
For the Developing Data Products final project, I created a Shiny App that displays my childrens’ grades.
All you need to do is put the grades into a csv. Here’s the code I used:
library(shiny)
Grades <- read.csv("C:/Users/James/Documents/R/BirkGrades.csv")
colnames(Grades)<-(c("Subject","Grade","Senior","Junior","7th Grade","6th Grade"))That got the grades ready for display.
Here’s the original table
## Subject Grade Senior Junior 7th Grade 6th Grade
## 1 Overall Andrew Victoria Matthew Steven
## 2 English 95.5 96 95 93 98
## 3 Math 92.75 89 92 97 93
## 4 History 91.75 93 94 90 90
## 5 Science 94.75 95 94 97 93
## 6 Driver's Ed 95.5 95 96 N/A N/A
## 7 Chorus 98 N/A 98 N/A N/A
## 8 Orchestra 96.33333333 96 N/A 97 96
## 9 Latin 95 N/A 95 97 93
## 10 Spanish 95 95 N/A N/A N/A
## 11
## 12 Average 94.9537037 94.14285714 94.85714286 95.16666667 93.83333333
fluidPage(
# Application title
titlePanel("My Kids' Grades"),
checkboxGroupInput("variable", "By Category:",
c("Overall" = "Grade",
"Andy Results" = "Senior",
"Vicki Results" = "Junior",
"Matthew Results" = "7th Grade",
"Steven Results" ="6th Grade")),
tableOutput("data")
)-Make a selection
-Compare any or all of the kids’ grades to the average
-Check out their total averages in the bottom row
The app uses radio button inputs to display columns of data from a .csv file. It is very easy to use. Here is the code from the server.R file
library(shiny)
function(input, output, session) {
output$data <- renderTable({
Grades[, c("Subject", input$variable), drop = FALSE]
}, rownames = TRUE)
}## function(input, output, session) {
## output$data <- renderTable({
## Grades[, c("Subject", input$variable), drop = FALSE]
## }, rownames = TRUE)
## }
My files for this app can be found on github under the username JamesRedLeg and the Developing Data Products Repo.