library ("formr" )
library ("here" )
here() starts at /home/runner/work/version-control-survey/version-control-survey
library ("ggplot2" )
path_password <- here:: here ("code" , ".passwords.R" )
if ( file.exists (path_password) ) {
source (path_password)
} else {
credentials <- list ()
credentials$ email <- Sys.getenv ("FORMR_EMAIL" )
credentials$ password <- Sys.getenv ("FORMR_PASS" )
}
survey_name <- "surveytest"
formr:: formr_connect (credentials$ email, credentials$ password)
Warning in formr::formr_connect(credentials$email, credentials$password):
Please use the keyring package via the formr_store_keys() function instead of
specifying email and password in plaintext.
survey_items <- formr_items (survey_name = survey_name, host = "https://formr.org" )
survey_data <- formr:: formr_raw_results (survey_name = survey_name)
ggplot (data = survey_data, aes (x = version)) +
geom_bar (stat = "count" ) +
geom_text (stat = "count" , aes (label = after_stat (count)), vjust = - 1 ) +
xlab ("Responses" ) +
ylab ("Count" )