Skip to content

Instantly share code, notes, and snippets.

@matt-dray
Last active November 30, 2021 23:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matt-dray/e5284b776316d7e95a78efc8850e4526 to your computer and use it in GitHub Desktop.
Save matt-dray/e5284b776316d7e95a78efc8850e4526 to your computer and use it in GitHub Desktop.
Basic analysis of the 'ACNH Tinder' R Shiny app
# 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