The raw data behind the story "Can You Rule Riddler Nation?" https://fivethirtyeight.com/features/can-you-rule-riddler-nation/. Analysis of the submitted solutions can be found at: https://fivethirtyeight.com/features/can-you-save-the-drowning-swimmer/
riddler_castles
A data frame with 1387 rows representing submissions and 11 variables:
Number of troops out of 100 send to castle 1
Number of troops out of 100 send to castle 2
Number of troops out of 100 send to castle 3
Number of troops out of 100 send to castle 4
Number of troops out of 100 send to castle 5
Number of troops out of 100 send to castle 6
Number of troops out of 100 send to castle 7
Number of troops out of 100 send to castle 8
Number of troops out of 100 send to castle 9
Number of troops out of 100 send to castle 10
Why did you choose your troop deployment?
# NOT RUN {
# To convert data frame to tidy data (long) format, run
library(dplyr)
library(tidyr)
library(stringr)
riddler_castles_tidy<-riddler_castles %>%
gather(key = castle , value = soldiers, castle1:castle10) %>%
mutate(castle = as.numeric(str_replace(castle, "castle","")))
# }
Run the code above in your browser using DataLab