A webapp to make wikipedia "Comparison of…" pages better
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
665B

  1. library(tidyverse)
  2. library(httr)
  3. library(rvest)
  4. library(DT)
  5. options(DT.options = list(paging = F,
  6. searching = T,
  7. info = F,
  8. dom = "Bfrtip",
  9. buttons = c("copy", "excel")))
  10. ui <- fluidPage(
  11. inputPanel(
  12. textInput("wiki_url", "Wikipedia comparison page"),
  13. actionButton("go", "Load tables")
  14. )
  15. )
  16. server <- function(input, output, session)
  17. {
  18. tables <- eventReactive(input$go,{
  19. GET(url) %>%
  20. content %>%
  21. html_table(fill = T)
  22. })
  23. }
  24. reduce(inner_join) %>%
  25. mutate_if(is.character, factor) %>%
  26. datatable(filter = "top")