knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(dodv)
is_travis <- ifelse(identical(Sys.getenv("TRAVIS"), "true"), TRUE, FALSE)
rs <- RSelenium::remoteDriver()
rs$open()
# With docker
#shell("docker pull selenium/standalone-firefox:3.141.59")
#shell("docker run -d -p 4445:4444 selenium/standalone-firefox:3.141.59")
#rs <- RSelenium::remoteDriver()
#rs$open()


# Without docker 
rs_serverclient <- RSelenium::rsDriver(browser = "firefox", geckover = "0.25.0")
rs <- rs_serverclient$client
rs$open()
dodv_ger_a <- get_dodv_ranklist(url = "https://segler-rangliste.de/dodv/#/opti-a-ger", 
                                all_years = FALSE)


schwielochsee <- get_dodv_regatta_results("https://segler-rangliste.de/dodv/#/opti-a-em-wma/regatta/2019A062/info")
stanjek <- get_dodv_regatta_results("https://segler-rangliste.de/dodv/#/opti-a-year-ger/regatta/2019A026/info")
ahorn_cup <- get_dodv_regatta_results("https://segler-rangliste.de/dodv/#/opti-a-ger/regatta/2019A064/info")  
herbst18 <- get_dodv_regatta_results("https://segler-rangliste.de/dodv/#/opti-a-ger/regatta/2018A132/info")
herbst19_registiations <- manage2sail_registrations("https://www.manage2sail.com/de-DE/event/5b69e6bf-d50a-4536-a203-54e90bd8320d#!/entries?classId=ba596ce5-2827-4b97-8fa4-568ca20659cb")

dplyr::inner_join(schwielochsee[,"segel", drop=FALSE], dodv_ger_a) %>% summary()
dplyr::inner_join(stanjek[,"segel", drop=FALSE], dodv_ger_a) %>% summary()
dplyr::inner_join(ahorn_cup[,"segel", drop=FALSE], dodv_ger_a) %>% summary()
dplyr::inner_join(herbst18[,"segel", drop=FALSE], dodv_ger_a) %>% summary()
dplyr::inner_join(herbst19_registiations[,"segel", drop=FALSE], dodv_ger_a) %>% summary()

calculate_regatta_factor(c(56, 82.69, 67.75))


mrustl/dodv documentation built on July 10, 2021, 1:12 p.m.