Last active
November 30, 2021 23:24
-
-
Save matt-dray/e5284b776316d7e95a78efc8850e4526 to your computer and use it in GitHub Desktop.
Basic analysis of the 'ACNH Tinder' R Shiny app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Blogpost: | |
# https://www.rostrum.blog/2020/06/06/acnh-swipe/ | |
# | |
# App: | |
# https://mattdray.shinyapps.io/acnh-swipe/ | |
x <- readr::read_csv("~/Desktop/acnh-swipe_results - Sheet1.csv") | |
x %>% | |
filter(swipe %in% c("left", "right"), name != "TEST") %>% | |
nrow() | |
y <- x %>% | |
filter(swipe %in% c("left", "right"), name != "TEST") %>% | |
count(name, swipe) %>% | |
pivot_wider(names_from = swipe, values_from = n) %>% | |
mutate( | |
across(c(left, right), ~replace_na(., 0)), | |
total = left + right, | |
difference = right - left, | |
pc_right = 100 * round(right / (right + left), 2) | |
) | |
nrow(y) | |
y %>% arrange(desc(right)) | |
y %>% arrange(desc(pc_right), desc(right)) | |
y %>% arrange(pc_right, desc(left)) | |
y %>% arrange(desc(difference)) | |
y %>% filter(left == right) %>% arrange(desc(total)) | |
hist(y$pc_right) | |
hist(y$total) | |
mean(y$total) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment