tRiviascoRe: a package to score teams during the useR2021 tRivia event

To install and load the package use:

remotes::install_github("saramortara/tRiviascoRe")
library(tRiviascoRe)
devtools::load_all()
library(tidyr)
library(dplyr)
library(readr)
library(gsheet)

What do you need?

  1. A Google form with multiple choice questions. All questions must have unique names

  2. A reference data frame with two or three columns: question_name, correct_answer and round (optional)

  3. The answers from the google form

How we run the code

Reference table

ref_url <- "https://docs.google.com/spreadsheets/d/1uCPz4XFWUGd20-fVgXjIo59eWp31AREzTlXCuEN8Vn0/edit#gid=0"
ref <- read_csv(construct_download_url(ref_url))

# Score points vector
score <- c(2, 3, 5, 10)

Round 1

url1 <- "https://docs.google.com/spreadsheets/d/1JqthtHHCFat1NdUUzM-9kyS-Vi789GFHywPu0eJ_5UE/edit#gid=1753062260"

r1 <- read_csv(construct_download_url(url1))

res1 <- score_trivia(r1, n_round = 1, score = score[1], ref)

res1

Round 2

url2 <- "https://docs.google.com/spreadsheets/d/1H3V2DpZHbtY-TtOmyTVLWJXUEiPgMVdDisJGTQ2deB4/edit#gid=464947112"

r2 <- read_csv(construct_download_url(url2))

res2 <- score_trivia(r2, n_round = 2, score = score[2], ref)

res2

Round 3

url3 <- "https://docs.google.com/spreadsheets/d/1blvK5r3WGHQbatNeqFt3H0nIVXPXYpaS_CYY6IiMRsU/edit?usp=sharing"

r3 <- read_csv(construct_download_url(url3))


res3 <- score_trivia(r3, n_round = 3, score = score[3], ref)

res3

Round 4

url4 <- "https://docs.google.com/spreadsheets/d/1FavTAbTzBqDXnBJTIjeKMY8bhLzUF8Kx9NSIgMczCuI/edit?usp=sharing"

r4 <- read_csv(construct_download_url(url4))

res4 <- score_trivia(r4, n_round = 4, score = score[4], ref)

res4

Final Score ------------------------------------------------------------------

score_list <- list(res1, res2, res3, res4)

res <- bind_rows(score_list)

rank_teams(res)


saramortara/tRiviascoRe documentation built on Dec. 22, 2021, 10:17 p.m.