Testing functionality of importing live Google Forms responses into a Shiny app
- Made a Google Form to test with here
- Linked responses to get automatically sent here
- Used this page to guide development
- When I first ran the app, had to authenticate with OAuth and approve tidyverse API to access Google
- Access issues persisted, with access denied received
- Tried making the Sheet public with link, access issues persist
- Used
gs4_auth()to try to re-authorize; had to check a box to approve access, then it worked from RStudio (locally)
- When loaded, the app currently just imports the data in the Sheet and displays it in the app
- Tried submitting a new response to the survey and re-running the app; all records displayed
- Used
rsconnect::writeManifest()to capture app dependencies - Tried deploying to Posit Connect Cloud from GitHub here
- As expected, errors persisted due to authentication issues
- Used the
gs4_deauth()function inglobal.Rto specify no authentication needed for sheet access- Works after setting the Google Sheet to public access with the link
- App is now live on Posit Connect Cloud: https://0194aaac-8a80-73ac-40c1-e3c77b2dd524.share.connect.posit.cloud/
- Now the (live) app imports the updated Google Sheets dataset, allows filtering by question, and displays the results in a bar plot + a table
- Need to work on updating results (e.g., with a "refresh" button)
- Added a dependency for
bslibto facilitate dashboard appearance - Added an
actionButtonthat can be clicked to refresh the most recent data on demand
- Added a dependency on
tidyranddplyrto facilitate data manipulation - Added dependency on
forcatsfor nicer plot display - Added the following components:
- Card to tabulate to responses
- Plot to view response times
- Interactive bar plot to show distribution of responses for the selected question
- Collapsible table to view tabular data
- Changed Google Sheet source link to Marvin's example survey
- Used
validateto ensure there are responses before trying to graph results
- Changed app title
- Add
selectInputto choose a course to view survey from - Made function in
global.Rto retrieve sheet based on course selected - Updated
server.Rto dynamically change the questions displayed with course selection - Add a
dateRangeInputto select responses based on the timestamp
- Added additional surveys for 313, 315, and 318
- Changed
server.Rbehavior to dynamically update everything when you change the course