diff --git a/DESCRIPTION b/DESCRIPTION index 7e81c3c..f3a4425 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,13 +1,13 @@ Package: rfutbin Type: Package Title: Searchs FIFA Ultimate Team players to get stats and prices in Futbin -Version: 1.0.1 +Version: 1.0.2 Authors@R: person("Daniel", "Redondo-Sanchez", email = "danielredondosanchez@hotmail.com", role = c("aut", "cre")) Maintainer: Daniel Redondo Sánchez Description: This package provides an R interface to Futbin, obtaining the live prices of FIFA Ultimate Team players, as well as - other interesting information (stats, versions and positions, popularity, ...). + other interesting information (stats, version, position, popularity, nation...). It also provides interactive radar plots to easily visualize the main stats of the players. License: MIT + file LICENSE @@ -18,4 +18,4 @@ Imports: dplyr, rvest, httr, magrittr, xml2, radarchart Suggests: URL: https://github.com/danielredondo/rfutbin/ BugReports: https://github.com/danielredondo/rfutbin/issues -RoxygenNote: 7.1.1 +RoxygenNote: 7.1.2 diff --git a/LICENSE b/LICENSE index 926900f..0ddc9ee 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 Daniel Redondo +Copyright (c) 2021 Daniel Redondo Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/R/futbin_scrap.R b/R/futbin_scrap.R index da72bd6..9f83d7e 100644 --- a/R/futbin_scrap.R +++ b/R/futbin_scrap.R @@ -35,23 +35,63 @@ futbin_scrap <- function(url, platform = "ps4", sleep_time = 5, verbose = TRUE) if (verbose == T) print(paste0("Reading... ", url_to_scrap)) # Web scraping + web <- httr::GET(url_to_scrap, + httr::set_cookies(platform = platform)) + data_page <- web %>% + httr::content() %>% + rvest::html_nodes(xpath = "//table") %>% + magrittr::extract(1) %>% + rvest::html_table() %>% + magrittr::extract2(1) + if (i == 1) { - tabla <- httr::GET(url_to_scrap, - httr::set_cookies(platform = platform)) %>% + tabla <- data_page + + # Add team, nation and league of each player + web %>% httr::content() %>% rvest::html_nodes(xpath = "//table") %>% magrittr::extract(1) %>% - rvest::html_table() %>% - magrittr::extract2(1) + rvest::html_elements(".players_club_nation") %>% + xml2::xml_contents() %>% + xml2::xml_attr("data-original-title") %>% + stats::na.omit() %>% + as.vector() -> table_team_nation_league + + tabla$team <- NA + tabla$nation <- NA + tabla$league <- NA + + for(j in 1:nrow(tabla)){ + tabla$team[j] <- table_team_nation_league[3 * j - 2] + tabla$nation[j] <- table_team_nation_league[3 * j - 1] + tabla$league[j] <- table_team_nation_league[3 * j] + } } else { Sys.sleep(sleep_time) - tabla.i <- httr::GET(url_to_scrap, - httr::set_cookies(platform = platform)) %>% + tabla.i <- data_page + + # Add team, nation and league of each player + web %>% httr::content() %>% rvest::html_nodes(xpath = "//table") %>% magrittr::extract(1) %>% - rvest::html_table() %>% - magrittr::extract2(1) + rvest::html_elements(".players_club_nation") %>% + xml2::xml_contents() %>% + xml2::xml_attr("data-original-title") %>% + stats::na.omit() %>% + as.vector() -> table_team_nation_league + + tabla.i$team <- NA + tabla.i$nation <- NA + tabla.i$league <- NA + + for(j in 1:nrow(tabla.i)){ + tabla.i$team[j] <- table_team_nation_league[3 * j - 2] + tabla.i$nation[j] <- table_team_nation_league[3 * j - 1] + tabla.i$league[j] <- table_team_nation_league[3 * j] + } + if(tabla.i[1, 1] != "No Results") tabla <- rbind(tabla, tabla.i) } @@ -64,7 +104,7 @@ futbin_scrap <- function(url, platform = "ps4", sleep_time = 5, verbose = TRUE) colnames(tabla) <- c( "name", "rating", "position", "version", "price", "skills", "weak_foot", "work_rate", "pac", "sho", "pas", "dri", "def", "phy", - "hei", "popularity", "base_stats", "in_game_stats" + "hei", "popularity", "base_stats", "in_game_stats", "team", "nation", "league" ) # Work rates (attack and defense) @@ -88,6 +128,15 @@ futbin_scrap <- function(url, platform = "ps4", sleep_time = 5, verbose = TRUE) if (aux_M[i] != -1) tabla$price[i] <- tabla$price[i] * 1000000 } + # Reorder variables + tabla <- tabla %>% + dplyr::select("name", "rating", "position", "version", "price", "skills", "weak_foot", + "pac", "sho", "pas", "dri", "def", "phy", + "hei", "popularity", "base_stats", "in_game_stats", "wr_attack", "wr_defense", + "wei", "team", "nation", "league" + ) + return(tabla) } + diff --git a/R/futbin_search.R b/R/futbin_search.R index 63aed74..a31629e 100644 --- a/R/futbin_search.R +++ b/R/futbin_search.R @@ -48,7 +48,8 @@ futbin_search <- function(name = "", platform = "ps4", version = NULL,verbose = url <- paste0("https://www.futbin.com/21/players?page=1&search=", name) # Web scraping - tabla <- httr::GET(url, httr::set_cookies(platform = platform)) %>% + web <- httr::GET(url, httr::set_cookies(platform = platform)) # To download only once + tabla <- web %>% httr::content() %>% rvest::html_nodes(xpath = "//table") %>% magrittr::extract(1) %>% @@ -83,6 +84,27 @@ futbin_search <- function(name = "", platform = "ps4", version = NULL,verbose = if (aux_M[i] != -1) tabla$price[i] <- tabla$price[i] * 1000000 } + # Add team, nation and league of each player + web %>% + httr::content() %>% + rvest::html_nodes(xpath = "//table") %>% + magrittr::extract(1) %>% + rvest::html_elements(".players_club_nation") %>% + xml2::xml_contents() %>% + xml2::xml_attr("data-original-title") %>% + stats::na.omit() %>% + as.vector() -> table_team_nation_league + + tabla$team <- NA + tabla$nation <- NA + tabla$league <- NA + + for(i in 1:nrow(tabla)){ + tabla$team[i] <- table_team_nation_league[3 * i - 2] + tabla$nation[i] <- table_team_nation_league[3 * i - 1] + tabla$league[i] <- table_team_nation_league[3 * i] + } + # Filter version of the player if (is.null(version) == FALSE){ version_selected <- version diff --git a/README.Rmd b/README.Rmd index 110d5db..929babf 100644 --- a/README.Rmd +++ b/README.Rmd @@ -185,5 +185,5 @@ If you use this package, you can cite it as: ``` -Redondo-Sanchez, Daniel (2021). rfutbin (v1.0.1): R package to get price and stats of FIFA Ultimate Team players in Futbin. https://github.com/danielredondo/rfutbin +Redondo-Sanchez, Daniel (2021). rfutbin (v1.0.2): R package to get price and stats of FIFA Ultimate Team players in Futbin. https://github.com/danielredondo/rfutbin ``` diff --git a/README.md b/README.md index a34db78..169218a 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,3 @@ -- [rfutbin](#rfutbin) - - [Installation](#installation) - - [Examples](#examples) - - [Functions](#functions) - - [Citation](#citation) - # rfutbin @@ -35,79 +29,89 @@ library(rfutbin) ``` r futbin_search(name = "Lionel Messi") -#> # A tibble: 7 x 20 +#> # A tibble: 9 x 23 #> name rating position version price skills weak_foot pac sho pas dri #> -#> 1 Lione~ 98 RW TOTY 2.68e6 4 4 93 98 97 99 -#> 2 Lione~ 98 ST TOTS 3 e6 4 4 91 99 96 99 -#> 3 Lione~ 96 CF LaLiga~ 1.71e6 4 4 90 96 95 98 -#> 4 Lione~ 95 CF TOTGS 6.58e5 4 4 88 95 94 97 -#> 5 Lione~ 94 CF IF 4.15e5 4 4 86 94 93 96 -#> 6 Lione~ 93 RW Rare 8.8 e4 4 4 85 92 91 95 -#> 7 Lione~ 93 RW CL 9 e4 4 4 85 92 91 95 -#> # ... with 9 more variables: def , phy , hei , popularity , -#> # base_stats , in_game_stats , wr_attack , wr_defense , -#> # wei +#> 1 Lione~ 99 RW Summer~ 8.53e5 4 4 96 99 98 99 +#> 2 Lione~ 99 CAM Futtie~ 6.85e5 5 4 98 99 99 99 +#> 3 Lione~ 98 RW TOTY 7.06e5 4 4 93 98 97 99 +#> 4 Lione~ 98 ST TOTS 2.9 e5 4 4 91 99 96 99 +#> 5 Lione~ 96 CF LaLiga~ 1.71e6 4 4 90 96 95 98 +#> 6 Lione~ 95 CF TOTGS 9.05e4 4 4 88 95 94 97 +#> 7 Lione~ 94 CF IF 1.1 e5 4 4 86 94 93 96 +#> 8 Lione~ 93 RW Rare 4.58e4 4 4 85 92 91 95 +#> 9 Lione~ 93 RW CL 5.2 e4 4 4 85 92 91 95 +#> # ... with 12 more variables: def , phy , hei , +#> # popularity , base_stats , in_game_stats , wr_attack , +#> # wr_defense , wei , team , nation , league ``` #### The default platform is PS4, but you can get the price in other platforms (XBox One/PC) ``` r futbin_search(name = "Lionel Messi", platform = "xone") -#> # A tibble: 7 x 20 +#> # A tibble: 9 x 23 #> name rating position version price skills weak_foot pac sho pas dri #> -#> 1 Lione~ 98 RW TOTY 2.8 e6 4 4 93 98 97 99 -#> 2 Lione~ 98 ST TOTS 3.02e6 4 4 91 99 96 99 -#> 3 Lione~ 96 CF LaLiga~ 1.59e6 4 4 90 96 95 98 -#> 4 Lione~ 95 CF TOTGS 6.14e5 4 4 88 95 94 97 -#> 5 Lione~ 94 CF IF 4.04e5 4 4 86 94 93 96 -#> 6 Lione~ 93 RW Rare 9 e4 4 4 85 92 91 95 -#> 7 Lione~ 93 RW CL 9.15e4 4 4 85 92 91 95 -#> # ... with 9 more variables: def , phy , hei , popularity , -#> # base_stats , in_game_stats , wr_attack , wr_defense , -#> # wei +#> 1 Lione~ 99 RW Summer~ 8.97e5 4 4 96 99 98 99 +#> 2 Lione~ 99 CAM Futtie~ 7.34e5 5 4 98 99 99 99 +#> 3 Lione~ 98 RW TOTY 6.45e5 4 4 93 98 97 99 +#> 4 Lione~ 98 ST TOTS 3.1 e5 4 4 91 99 96 99 +#> 5 Lione~ 96 CF LaLiga~ 1.59e6 4 4 90 96 95 98 +#> 6 Lione~ 95 CF TOTGS 1.19e5 4 4 88 95 94 97 +#> 7 Lione~ 94 CF IF 1.81e5 4 4 86 94 93 96 +#> 8 Lione~ 93 RW Rare 5.1 e4 4 4 85 92 91 95 +#> 9 Lione~ 93 RW CL 6.3 e4 4 4 85 92 91 95 +#> # ... with 12 more variables: def , phy , hei , +#> # popularity , base_stats , in_game_stats , wr_attack , +#> # wr_defense , wei , team , nation , league futbin_search(name = "Lionel Messi", platform = "pc") -#> # A tibble: 7 x 20 +#> # A tibble: 9 x 23 #> name rating position version price skills weak_foot pac sho pas dri #> -#> 1 Lione~ 98 RW TOTY 3.75e6 4 4 93 98 97 99 -#> 2 Lione~ 98 ST TOTS 3.8 e6 4 4 91 99 96 99 -#> 3 Lione~ 96 CF LaLiga~ 1.93e6 4 4 90 96 95 98 -#> 4 Lione~ 95 CF TOTGS 9.8 e5 4 4 88 95 94 97 -#> 5 Lione~ 94 CF IF 7.49e5 4 4 86 94 93 96 -#> 6 Lione~ 93 RW Rare 1.46e5 4 4 85 92 91 95 -#> 7 Lione~ 93 RW CL 1.45e5 4 4 85 92 91 95 -#> # ... with 9 more variables: def , phy , hei , popularity , -#> # base_stats , in_game_stats , wr_attack , wr_defense , -#> # wei +#> 1 Lione~ 99 RW Summer~ 1.5 e6 4 4 96 99 98 99 +#> 2 Lione~ 99 CAM Futtie~ 7.67e5 5 4 98 99 99 99 +#> 3 Lione~ 98 RW TOTY 1.24e6 4 4 93 98 97 99 +#> 4 Lione~ 98 ST TOTS 3.3 e5 4 4 91 99 96 99 +#> 5 Lione~ 96 CF LaLiga~ 1.93e6 4 4 90 96 95 98 +#> 6 Lione~ 95 CF TOTGS 1.43e5 4 4 88 95 94 97 +#> 7 Lione~ 94 CF IF 1.8 e5 4 4 86 94 93 96 +#> 8 Lione~ 93 RW Rare 7.35e4 4 4 85 92 91 95 +#> 9 Lione~ 93 RW CL 8.4 e4 4 4 85 92 91 95 +#> # ... with 12 more variables: def , phy , hei , +#> # popularity , base_stats , in_game_stats , wr_attack , +#> # wr_defense , wei , team , nation , league ``` #### Search for more than one player ``` r futbin_search(name = c("Lionel Messi", "Cristiano Ronaldo")) -#> # A tibble: 15 x 20 +#> # A tibble: 19 x 23 #> name rating position version price skills weak_foot pac sho pas dri #> -#> 1 Lion~ 98 RW TOTY 2.68e6 4 4 93 98 97 99 -#> 2 Lion~ 98 ST TOTS 3 e6 4 4 91 99 96 99 -#> 3 Lion~ 96 CF LaLiga~ 1.71e6 4 4 90 96 95 98 -#> 4 Lion~ 95 CF TOTGS 6.58e5 4 4 88 95 94 97 -#> 5 Lion~ 94 CF IF 4.15e5 4 4 86 94 93 96 -#> 6 Lion~ 93 RW Rare 8.8 e4 4 4 85 92 91 95 -#> 7 Lion~ 93 RW CL 9 e4 4 4 85 92 91 95 -#> 8 Cris~ 98 ST TOTY 6.83e6 5 4 96 98 89 96 -#> 9 Cris~ 98 ST TOTS 6.95e6 5 4 95 99 90 95 -#> 10 Cris~ 95 ST TIF 3.4 e6 5 4 92 96 87 93 -#> 11 Cris~ 94 ST SIF 2.3 e6 5 4 91 95 85 92 -#> 12 Cris~ 93 ST IF 1.2 e6 5 4 90 94 83 91 -#> 13 Cris~ 92 ST Rare 1.7 e5 5 4 89 93 81 89 -#> 14 Cris~ 92 ST CL 1.71e5 5 4 89 93 81 89 -#> 15 Cris~ 87 RW Flashb~ 3.34e5 5 3 91 79 75 86 -#> # ... with 9 more variables: def , phy , hei , popularity , -#> # base_stats , in_game_stats , wr_attack , wr_defense , -#> # wei +#> 1 Lion~ 99 RW Summer~ 8.53e5 4 4 96 99 98 99 +#> 2 Lion~ 99 CAM Futtie~ 6.85e5 5 4 98 99 99 99 +#> 3 Lion~ 98 RW TOTY 7.06e5 4 4 93 98 97 99 +#> 4 Lion~ 98 ST TOTS 2.9 e5 4 4 91 99 96 99 +#> 5 Lion~ 96 CF LaLiga~ 1.71e6 4 4 90 96 95 98 +#> 6 Lion~ 95 CF TOTGS 9.05e4 4 4 88 95 94 97 +#> 7 Lion~ 94 CF IF 1.1 e5 4 4 86 94 93 96 +#> 8 Lion~ 93 RW Rare 4.58e4 4 4 85 92 91 95 +#> 9 Lion~ 93 RW CL 5.2 e4 4 4 85 92 91 95 +#> 10 Cris~ 99 ST Summer~ 7 e5 5 4 96 99 92 98 +#> 11 Cris~ 99 ST Premiu~ 1.01e6 5 5 98 99 95 99 +#> 12 Cris~ 98 ST TOTY 4.45e5 5 4 96 98 89 96 +#> 13 Cris~ 98 ST TOTS 4.15e5 5 4 95 99 90 95 +#> 14 Cris~ 95 ST TIF 3.1 e5 5 4 92 96 87 93 +#> 15 Cris~ 94 ST SIF 9.5 e5 5 4 91 95 85 92 +#> 16 Cris~ 93 ST IF 2.34e5 5 4 90 94 83 91 +#> 17 Cris~ 92 ST Rare 6.15e4 5 4 89 93 81 89 +#> 18 Cris~ 92 ST CL 5.9 e4 5 4 89 93 81 89 +#> 19 Cris~ 87 RW Flashb~ 3.34e5 5 3 91 79 75 86 +#> # ... with 12 more variables: def , phy , hei , +#> # popularity , base_stats , in_game_stats , wr_attack , +#> # wr_defense , wei , team , nation , league ``` #### Search for a specific version of a player @@ -115,25 +119,25 @@ futbin_search(name = c("Lionel Messi", "Cristiano Ronaldo")) ``` r # Lewandowski rare card futbin_search(name = "Lewandowski", version = "Rare") -#> # A tibble: 1 x 20 +#> # A tibble: 1 x 23 #> name rating position version price skills weak_foot pac sho pas dri #> -#> 1 Robert~ 91 ST Rare 50000 4 4 78 91 78 86 -#> # ... with 9 more variables: def , phy , hei , popularity , -#> # base_stats , in_game_stats , wr_attack , wr_defense , -#> # wei +#> 1 Robert~ 91 ST Rare 25250 4 4 78 91 78 86 +#> # ... with 12 more variables: def , phy , hei , +#> # popularity , base_stats , in_game_stats , wr_attack , +#> # wr_defense , wei , team , nation , league ``` ``` r # Luis Suarez One to watch (OTW) futbin_search(name = "Luis Suarez", version = "OTW") -#> # A tibble: 1 x 20 +#> # A tibble: 1 x 23 #> name rating position version price skills weak_foot pac sho pas dri #> -#> 1 Luis S~ 89 ST OTW 49500 3 4 73 92 86 86 -#> # ... with 9 more variables: def , phy , hei , popularity , -#> # base_stats , in_game_stats , wr_attack , wr_defense , -#> # wei +#> 1 Luis S~ 90 ST OTW 31000 3 4 75 94 87 88 +#> # ... with 12 more variables: def , phy , hei , +#> # popularity , base_stats , in_game_stats , wr_attack , +#> # wr_defense , wei , team , nation , league ``` ``` r @@ -141,13 +145,13 @@ futbin_search(name = "Luis Suarez", version = "OTW") futbin_search(name = "Grealish", version = "IF", verbose = TRUE) #> [1] "Reading... https://www.futbin.com/21/players?page=1&search=grealish" #> [1] "Player(s) found: 1" -#> # A tibble: 1 x 20 +#> # A tibble: 1 x 23 #> name rating position version price skills weak_foot pac sho pas dri #> -#> 1 Jack G~ 83 LM IF 28000 4 3 80 77 84 87 -#> # ... with 9 more variables: def , phy , hei , popularity , -#> # base_stats , in_game_stats , wr_attack , wr_defense , -#> # wei +#> 1 Jack G~ 83 LM IF 29750 4 3 80 77 84 87 +#> # ... with 12 more variables: def , phy , hei , +#> # popularity , base_stats , in_game_stats , wr_attack , +#> # wr_defense , wei , team , nation , league ``` #### Download all players from a Futbin webpage @@ -158,54 +162,54 @@ aston_villa <- futbin_scrap(url = "https://www.futbin.com/players?page=1&club=2" #> [1] "Reading... https://www.futbin.com/players?page=1&club=2" #> [1] "Player(s) found: 30" #> [1] "Reading... https://www.futbin.com/players?page=2&club=2" -#> [1] "Player(s) found: 41" +#> [1] "Player(s) found: 45" #> [1] "Reading... https://www.futbin.com/players?page=3&club=2" -#> [1] "Player(s) found: 41" - +#> [1] "Player(s) found: 45" head(aston_villa) -#> # A tibble: 6 x 20 +#> # A tibble: 6 x 23 #> name rating position version price skills weak_foot pac sho pas dri #> -#> 1 Jack ~ 87 CAM TOTY Ho~ 0 4 3 85 83 89 91 -#> 2 Ollie~ 84 ST SIF 22250 3 4 90 84 77 82 -#> 3 Emili~ 84 GK SIF 35500 1 3 85 86 84 86 -#> 4 Jack ~ 83 LM IF 28000 4 3 80 77 84 87 -#> 5 Emili~ 82 GK IF 29500 1 3 82 84 82 83 -#> 6 Ollie~ 81 ST IF 16750 3 4 88 79 73 78 -#> # ... with 9 more variables: def , phy , hei , popularity , -#> # base_stats , in_game_stats , wr_attack , wr_defense , -#> # wei +#> 1 Jack ~ 95 LW FOF PT~ 246500 4 3 97 94 97 99 +#> 2 Jack ~ 87 CAM TOTY H~ 0 4 3 85 83 89 91 +#> 3 Ollie~ 84 ST SIF 35000 3 4 90 84 77 82 +#> 4 Emili~ 84 GK SIF 136000 1 3 85 86 84 86 +#> 5 Jack ~ 83 LM IF 29750 4 3 80 77 84 87 +#> 6 Emili~ 82 GK IF 0 1 3 82 84 82 83 +#> # ... with 12 more variables: def , phy , hei , +#> # popularity , base_stats , in_game_stats , wr_attack , +#> # wr_defense , wei , team , nation , league ``` ``` r # All English players in Bundesliga -> To get the URL, go to futbin.com/players and filter futbin_scrap(url = "https://www.futbin.com/21/players?page=1&league=19&nation=14") #> [1] "Reading... https://www.futbin.com/21/players?page=1&league=19&nation=14" -#> [1] "Player(s) found: 16" +#> [1] "Player(s) found: 17" #> [1] "Reading... https://www.futbin.com/21/players?page=2&league=19&nation=14" -#> [1] "Player(s) found: 16" -#> # A tibble: 16 x 20 +#> [1] "Player(s) found: 17" +#> # A tibble: 17 x 23 #> name rating position version price skills weak_foot pac sho pas dri #> -#> 1 Jado~ 96 RM TOTS 2.84e6 5 4 96 94 93 98 -#> 2 Jado~ 92 RM What If 2.8 e5 5 3 91 87 86 95 -#> 3 Jude~ 91 CM TOTS M~ 2.20e5 4 4 88 87 89 89 -#> 4 Dema~ 90 LW ShowDo~ 2.00e5 4 4 96 89 86 96 -#> 5 Jado~ 89 LM Bundes~ 1.34e5 5 3 87 78 83 93 -#> 6 Jado~ 88 RM Record~ 7.3 e4 5 3 87 83 82 91 -#> 7 Jado~ 87 RM Rare 2.5 e4 5 3 83 74 81 91 -#> 8 Jado~ 87 RM CL 2.52e4 5 3 83 74 81 91 -#> 9 Ryan~ 87 LM Object~ 0 4 4 92 84 84 88 -#> 10 Ryan~ 75 LM non-ra~ 4.5 e2 4 3 86 67 69 75 -#> 11 Dema~ 75 LM non-ra~ 5 e2 4 3 87 68 67 80 -#> 12 Adem~ 74 RM Rare 0 3 4 82 72 66 80 -#> 13 Jude~ 69 CM Non-Ra~ 1.8 e3 3 4 77 65 64 73 -#> 14 Reec~ 66 CB Non-Ra~ 5 e2 2 3 67 33 52 56 -#> 15 Clin~ 66 LB Non-Ra~ 6 e2 2 3 68 40 63 64 -#> 16 Kean~ 63 LM Rare 0 2 4 75 59 58 66 -#> # ... with 9 more variables: def , phy , hei , popularity , -#> # base_stats , in_game_stats , wr_attack , wr_defense , -#> # wei +#> 1 Jado~ 96 RM TOTS 23500 5 4 96 94 93 98 +#> 2 Jado~ 92 RM What If 20000 5 3 91 87 86 95 +#> 3 Jude~ 91 CM TOTS M~ 219900 4 4 88 87 89 89 +#> 4 Dema~ 90 LW ShowDo~ 199850 4 4 96 89 86 96 +#> 5 Jado~ 89 LM Bundes~ 134500 5 3 87 78 83 93 +#> 6 Jado~ 88 RM Record~ 71000 5 3 87 83 82 91 +#> 7 Jado~ 87 RM Rare 23000 5 3 83 74 81 91 +#> 8 Jado~ 87 RM CL 24500 5 3 83 74 81 91 +#> 9 Ryan~ 87 LM Object~ 0 4 4 92 84 84 88 +#> 10 Ryan~ 75 LM non-ra~ 8800 4 3 86 67 69 75 +#> 11 Dema~ 75 LM non-ra~ 1300 4 3 87 68 67 80 +#> 12 Adem~ 74 RM Rare 5000 3 4 82 72 66 80 +#> 13 Omar~ 70 LB non-ra~ 8900 3 3 82 45 55 68 +#> 14 Jude~ 69 CM Non-Ra~ 2500 3 4 77 65 64 73 +#> 15 Reec~ 66 CB Non-Ra~ 700 2 3 67 33 52 56 +#> 16 Clin~ 66 LB Non-Ra~ 7400 2 3 68 40 63 64 +#> 17 Kean~ 63 LM Rare 4400 2 4 75 59 58 66 +#> # ... with 12 more variables: def , phy , hei , +#> # popularity , base_stats , in_game_stats , wr_attack , +#> # wr_defense , wei , team , nation , league ``` #### Radar plot comparing Van Dijk and Messi @@ -294,4 +298,4 @@ The output of the function is an interactive radar plot of the stats. If you use this package, you can cite it as: - Redondo-Sanchez, Daniel (2021). rfutbin (v1.0.1): R package to get price and stats of FIFA Ultimate Team players in Futbin. https://github.com/danielredondo/rfutbin + Redondo-Sanchez, Daniel (2021). rfutbin (v1.0.2): R package to get price and stats of FIFA Ultimate Team players in Futbin. https://github.com/danielredondo/rfutbin