22-01-2019, 01:01 PM
Por fin he tenido un poco de tiempo para mirar lo de conseguir los datos más actuales de los jugadores del FUT de FIFA (EA Sports). El código es el siguente:
el cual produce estos datos (a los que habría que transformar en formato PCFUTBOL):
Nota: Solo extraigo unos cuantos datos (y calculo la media) para enseñar cuanto podemos sacar de datos y no tener que hacerlo de forma manual
Código:
#!/usr/bin/env stack
{- stack
--resolver lts-12.0
--install-ghc
script
--ghc-options -Werror
--ghc-options -Wall
--package aeson
--package bytestring
--package http-client
--package http-client-tls
--package http-types
--package split
--package text
--
-}
--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
--------------------------------------------------------------------------------
module Main (main) where
--------------------------------------------------------------------------------
import Control.Monad
( mzero
)
import Data.Aeson
( FromJSON
, Value (Object, String)
, decode
, parseJSON
, (.:)
)
import qualified Data.ByteString.Lazy.Char8 as L8
import qualified Data.List.Split as Split
import Data.Maybe
( catMaybes
)
import Data.Text
( unpack
)
import Data.Word
( Word16
, Word8
)
import Network.HTTP.Client
( Manager
, httpLbs
, newManager
, parseRequest
, responseBody
)
import Network.HTTP.Client.TLS
( tlsManagerSettings
)
--------------------------------------------------------------------------------
-- JSON to DSL
data Irrelevant = Irrelevant deriving Show
data JSON
= JSON
{ page :: Word16
, totalPages :: Word16
, totalResults :: Word16
, type' :: Irrelevant
, count :: Word8
, items :: [ Item ]
}
deriving Show
data Item
= Item
{ commonName :: String
, firstName :: String
, lastName :: String
, name :: String
, height :: Word8
, weight :: Word8
, age :: Word8
, birthdate :: Birthdate
, foot :: Foot
, position :: Position
, nation :: Nation
, club :: Club
, headshot :: Headshot
, league :: Irrelevant
, isGK :: Irrelevant
, playStyle :: Irrelevant
, playStyleId :: Irrelevant
, skillMoves :: Irrelevant
, potential :: Irrelevant
, weakFoot :: Irrelevant
, traits :: Irrelevant
, specialities :: Irrelevant
, atkWorkRate :: Irrelevant
, defWorkRate :: Irrelevant
, playerType :: Irrelevant
, rarityId :: Irrelevant
, isIcon :: Irrelevant
, quality :: Irrelevant
, positionFull :: Irrelevant
, isSpecialType :: Irrelevant
, contracts :: Irrelevant
, fitness :: Irrelevant
, rawAttributeChemistryBonus :: Irrelevant
, isLoan :: Irrelevant
, squadPosition :: Irrelevant
, iconAttributes :: Irrelevant
, itemType :: Irrelevant
, discardValue :: Irrelevant
, id' :: Irrelevant
, modelName :: Irrelevant
, baseId :: Irrelevant
, attributes :: Irrelevant
{-
Calculate these values based on the average from below:
[ {"name":"fut.attribute.PAC","value":88,"chemistryBonus":[0]}
, {"name":"fut.attribute.SHO","value":91,"chemistryBonus":[0]}
, {"name":"fut.attribute.PAS","value":88,"chemistryBonus":[0]}
, {"name":"fut.attribute.DRI","value":96,"chemistryBonus":[0]}
, {"name":"fut.attribute.DEF","value":32,"chemistryBonus":[0]}
, {"name":"fut.attribute.PHY","value":61,"chemistryBonus":[0]}
]
-}
, rating :: Word8
-- PACE
, acceleration :: Word8
, sprintspeed :: Word8
-- DRIBBLING
, agility :: Word8
, balance :: Word8
, reactions :: Word8
, ballcontrol :: Word8
, dribbling :: Word8
, composure :: Word8
-- SHOOTING
, positioning :: Word8
, finishing :: Word8
, shotpower :: Word8
, longshots :: Word8
, volleys :: Word8
, penalties :: Word8
-- DEFENDING
, interceptions :: Word8
, headingaccuracy :: Word8
, marking :: Word8
, standingtackle :: Word8
, slidingtackle :: Word8
-- PASSING
, vision :: Word8
, crossing :: Word8
, freekickaccuracy :: Word8
, shortpassing :: Word8
, longpassing :: Word8
, curve :: Word8
-- PHYSICALITY
, jumping :: Word8
, stamina :: Word8
, strength :: Word8
, aggression :: Word8
-- GOALKEEPING
, gkdiving :: Word8
, gkhandling :: Word8
, gkkicking :: Word8
, gkpositioning :: Word8
, gkreflexes :: Word8
}
deriving Show
type Year = Word16
type Month = Word8
type Day = Word8
data Birthdate = Birthdate Year Month Day
deriving Show
data Foot
= Left
| Right
deriving Show
data Position
= GK -- Goalkeeper
| DF Defender
| MF Midfielder
| FW Forward
deriving Show
data Defender
= LWB -- Left Wing Back
| LB -- Left Back
| CB -- Centre Back
| RB -- Right Back
| RWB -- Right Wing Back
deriving Show
data Midfielder
= LW -- Left Wing
| LM -- Left Midfielder
| CAM -- Centre Attacking Midfielder
| CDM -- Centre Defensive Midfielder
| CM -- Centre Midfielder
| RM -- Right Midfielder
| RW -- Right Wing
deriving Show
data Forward
= LF -- Left Forward
| CF -- Centre Forward
| RF -- Right Forward
| ST -- Striker
deriving Show
data Nation = Nation String
deriving Show
data Club = Club String
deriving Show
data Headshot = Headshot String
deriving Show
--------------------------------------------------------------------------------
instance FromJSON Irrelevant where
parseJSON =
aux pure
where
aux f _ = f Irrelevant
instance FromJSON JSON where
parseJSON (Object x) =
do
page <- x .: "page"
totalPages <- x .: "totalPages"
totalResults <- x .: "totalResults"
type' <- x .: "type"
count <- x .: "count"
items <- x .: "items"
pure JSON {..}
parseJSON _ = mzero
instance FromJSON Item where
parseJSON (Object x) =
do
commonName <- x .: "commonName"
firstName <- x .: "firstName"
lastName <- x .: "lastName"
name <- x .: "name"
height <- x .: "height"
weight <- x .: "weight"
age <- x .: "age"
birthdate <- x .: "birthdate"
foot <- x .: "foot"
position <- x .: "position"
nation <- x .: "nation"
club <- x .: "club"
headshot <- x .: "headshot"
-- IRRELEVANT
league <- x .: "league"
isGK <- x .: "isGK"
playStyle <- x .: "playStyle"
playStyleId <- x .: "playStyleId"
skillMoves <- x .: "skillMoves"
potential <- x .: "potential"
weakFoot <- x .: "weakFoot"
traits <- x .: "traits"
specialities <- x .: "specialities"
atkWorkRate <- x .: "atkWorkRate"
defWorkRate <- x .: "defWorkRate"
playerType <- x .: "playerType"
rarityId <- x .: "rarityId"
isIcon <- x .: "isIcon"
quality <- x .: "quality"
positionFull <- x .: "positionFull"
isSpecialType <- x .: "isSpecialType"
contracts <- x .: "contracts"
fitness <- x .: "fitness"
rawAttributeChemistryBonus <- x .: "rawAttributeChemistryBonus"
isLoan <- x .: "isLoan"
squadPosition <- x .: "squadPosition"
iconAttributes <- x .: "iconAttributes"
itemType <- x .: "itemType"
discardValue <- x .: "discardValue"
id' <- x .: "id"
modelName <- x .: "modelName"
baseId <- x .: "baseId"
attributes <- x .: "attributes"
-- STATS
rating <- x .: "rating"
acceleration <- x .: "acceleration"
sprintspeed <- x .: "sprintspeed"
agility <- x .: "agility"
balance <- x .: "balance"
reactions <- x .: "reactions"
ballcontrol <- x .: "ballcontrol"
dribbling <- x .: "dribbling"
composure <- x .: "composure"
positioning <- x .: "positioning"
finishing <- x .: "finishing"
shotpower <- x .: "shotpower"
longshots <- x .: "longshots"
volleys <- x .: "volleys"
penalties <- x .: "penalties"
interceptions <- x .: "interceptions"
headingaccuracy <- x .: "headingaccuracy"
marking <- x .: "marking"
standingtackle <- x .: "standingtackle"
slidingtackle <- x .: "slidingtackle"
vision <- x .: "vision"
crossing <- x .: "crossing"
freekickaccuracy <- x .: "freekickaccuracy"
shortpassing <- x .: "shortpassing"
longpassing <- x .: "longpassing"
curve <- x .: "curve"
jumping <- x .: "jumping"
stamina <- x .: "stamina"
strength <- x .: "strength"
aggression <- x .: "aggression"
gkdiving <- x .: "gkdiving"
gkhandling <- x .: "gkhandling"
gkkicking <- x .: "gkkicking"
gkpositioning <- x .: "gkpositioning"
gkreflexes <- x .: "gkreflexes"
pure Item {..}
parseJSON _ = mzero
instance FromJSON Birthdate where
parseJSON =
aux pure
where
aux f (String x) = f $ Birthdate y m d
where
i = Split.splitOn "/" $ unpack x
y = read $ i !! 2
m = read $ i !! 0
d = read $ i !! 1
aux _ __________ = mzero
instance FromJSON Foot where
parseJSON =
aux pure
where
aux f (String "Left") = f Main.Left
aux f (String "Right") = f Main.Right
aux _ ________________ = mzero
instance FromJSON Position where
parseJSON =
aux pure
where
aux f (String "GK") = f $ GK
aux f (String "LWB") = f $ DF $ LWB
aux f (String "LB") = f $ DF $ LB
aux f (String "CB") = f $ DF $ CB
aux f (String "RB") = f $ DF $ RB
aux f (String "RWB") = f $ DF $ RWB
aux f (String "LW") = f $ MF $ LW
aux f (String "LM") = f $ MF $ LM
aux f (String "CAM") = f $ MF $ CAM
aux f (String "CDM") = f $ MF $ CDM
aux f (String "CM") = f $ MF $ CM
aux f (String "RM") = f $ MF $ RM
aux f (String "RW") = f $ MF $ RW
aux f (String "LF") = f $ FW $ LF
aux f (String "CF") = f $ FW $ CF
aux f (String "RF") = f $ FW $ RF
aux f (String "ST") = f $ FW $ ST
aux _ ______________ = mzero
instance FromJSON Nation where
parseJSON (Object x) =
Nation <$> x .: "name"
parseJSON _ = mzero
instance FromJSON Club where
parseJSON (Object x) =
Club <$> x .: "name"
parseJSON _ = mzero
instance FromJSON Headshot where
parseJSON (Object x) =
Headshot <$> x .: "imgUrl"
parseJSON _ = mzero
--------------------------------------------------------------------------------
stats :: [ Item -> Word8 ] -> Item -> Word8
stats xs i =
fromIntegral
$ (flip div) n
$ sum
$ map (fromIntegral :: Word8 -> Int)
$ map (\f -> f i) xs
where
n = length xs
pac :: Item -> Word8
dri :: Item -> Word8
sho :: Item -> Word8
def :: Item -> Word8
pas :: Item -> Word8
phy :: Item -> Word8
pac =
stats
[ acceleration
, sprintspeed
]
dri =
stats
[ agility
, balance
, reactions
, ballcontrol
, dribbling
, composure
]
sho =
stats
[ positioning
, finishing
, shotpower
, longshots
, volleys
, penalties
]
def =
stats
[ interceptions
, headingaccuracy
, marking
, standingtackle
, slidingtackle
]
pas =
stats
[ vision
, crossing
, freekickaccuracy
, shortpassing
, longpassing
, curve
]
phy =
stats
[ jumping
, stamina
, strength
, aggression
]
--------------------------------------------------------------------------------
-- From browser UI URL to FUT API:
fut :: String
fut =
"https://www.easports.com/fifa/ultimate-team/api/fut/item?jsonParamObject="
url2obj :: String -> Word16 -> String
url2obj url n =
"{" ++ aux ++ "}"
where
qry = (Split.splitOn "?" url) !! 1
pms = Split.splitOn "&" qry
aux =
foldl1 (\x y -> x ++ "," ++ y)
$ map (foldl1 (\x y -> show x ++ ":" ++ show y))
$ [ "page", show n ] : map (Split.splitOn "=") pms
--------------------------------------------------------------------------------
-- HTTP tools
get
:: Manager -> String -> IO L8.ByteString
get manager url =
do
request <- parseRequest url
response <- httpLbs request manager
return $ responseBody response
json
:: Manager -> String -> IO (Maybe JSON)
json manager url =
get manager url >>= pure . decode
api
:: Manager -> (Word16 -> String) -> IO [ Item ]
api manager purl =
do
Just p01 <- json manager $ purl 1
let rest = [ 2 .. totalPages p01 ]
jsons <- mapM (\i -> json manager $ purl i) rest
return $ concat $ (items p01) : (items <$> catMaybes jsons)
--------------------------------------------------------------------------------
logic :: [ Item ] -> [ String ]
logic =
map
$ show . (\i -> (rating i, pac i, dri i, sho i, def i, pas i, phy i, name i))
main
:: IO ()
main =
do
stdin <- getContents
manager <- newManager tlsManagerSettings
players <- api manager $ (fut ++) . (url2obj stdin)
putStrLn "|ME|RI|RE|TI|DE|PA|FI|Nombre"
mapM_ putStrLn $ logic players
el cual produce estos datos (a los que habría que transformar en formato PCFUTBOL):
Código:
|ME|RI|RE|TI|DE|PA|FI|Nombre
(94,88,95,88,35,89,61,"Messi")
(91,75,75,63,90,69,86,"Sergio Ramos")
(91,80,86,88,52,79,82,"Su\225rez")
(91,76,90,78,69,87,69,"Modri\263")
(90,68,68,49,89,59,83,"God\237n")
(90,67,80,81,70,88,59,"Kroos")
(90,49,48,19,16,27,49,"Courtois")
(90,51,50,13,18,27,57,"Oblak")
(89,44,44,16,16,30,59,"ter Stegen")
(89,86,87,84,53,80,75,"Griezmann")
(89,72,88,77,59,83,62,"Isco")
(88,94,81,85,60,84,76,"Bale")
(88,82,88,69,81,80,82,"Marcelo")
(88,82,89,80,43,85,63,"Coutinho")
(88,43,75,60,82,74,78,"Sergio Busquets")
(88,62,73,68,85,71,87,"Casemiro")
(87,54,66,60,86,63,73,"Piqu\233")
(87,62,77,83,69,86,64,"Rakiti\263")
(87,93,83,66,79,76,77,"Jordi Alba")
(87,53,51,16,17,28,55,"Navas")
(87,72,74,66,86,69,83,"Umtiti")
(86,47,76,79,69,87,66,"Parejo")
(86,84,67,45,85,57,78,"Varane")
(85,75,78,63,80,77,78,"Filipe Lu\237s")
(85,75,73,81,50,62,81,"Diego Costa")
(85,57,78,80,84,76,85,"Vidal")
(85,81,84,84,39,76,66,"Iago Aspas")
(85,69,80,72,65,85,73,"Koke")
(85,70,79,73,78,73,76,"Sa\250l")
(85,81,81,79,43,82,59,"Marco Asensio")
(84,76,77,79,34,74,71,"Benzema")
(84,56,48,15,17,32,51,"Sergio Asenjo")
(84,61,78,67,70,77,71,"Illarramendi")
(84,51,49,18,15,25,55,"Neto")
(84,90,80,81,47,72,72,"Rodrigo")
(84,77,75,61,79,76,66,"Sergi Roberto")
(84,81,79,46,80,68,78,"Carvajal")
(84,51,70,56,78,75,79,"William Carvalho")
(84,68,58,41,85,46,83,"Gim\233nez")
(83,66,72,82,53,61,82,"Aduriz")
(83,55,45,16,19,25,56,"Ad\225n")
(83,66,81,70,65,84,66,"Banega")
(83,63,70,82,44,64,75,"Willian Jos\233")
(83,74,68,39,81,59,79,"Nacho Fern\225ndez")
(83,58,63,33,84,46,76,"Savi\263")
(83,70,78,72,69,78,73,"Manu Trigueros")
(83,78,75,79,49,63,67,"Gerard Moreno")
(83,81,80,71,46,80,70,"Lucas V\225zquez")
(83,85,84,75,59,82,69,"Lemar")
(83,84,84,77,29,79,62,"Malcom")
(83,90,82,78,34,77,71,"Promes")
(82,73,79,75,42,83,53,"Joaqu\237n")
(82,35,63,60,81,65,75,"Garay")
(82,73,81,69,70,80,71,"Guardado")
(82,75,76,74,71,81,70,"Wass")
(82,57,65,43,82,61,80,"V\237ctor Ruiz")
(82,73,75,56,81,66,76,"Bartra")
(82,72,69,50,82,63,79,"Gabriel Paulista")
(82,70,81,75,66,75,62,"Rafinha")
(82,72,78,69,81,70,86,"Kondogbia")
(82,60,73,76,49,77,65,"V\225zquez")
(82,74,78,79,36,63,70,"Bacca")
(82,74,72,62,78,69,82,"Partey")
(82,44,71,58,71,69,79,"Dani Garc\237a")
(82,72,68,38,82,49,78,"Lenglet")
(82,82,72,45,81,59,79,"Hern\225ndez")
(82,48,44,20,16,34,50,"Pau L\243pez")
(82,88,80,77,39,74,69,"Gon\231alo Guedes")
(82,94,87,71,46,72,65,"Gelson Martins")
(82,69,82,71,68,74,74,"Arthur")
(82,89,84,75,36,74,58,"Demb\233l\233")
(82,68,75,65,75,70,73,"Rodri")
(81,52,77,77,73,76,79,"Ra\250l Garc\237a")
(81,63,76,76,42,85,55,"Pedro Le\243n")
(81,85,80,81,45,73,72,"Gameiro")
(81,36,71,69,76,77,69,"Bruno")
(81,73,79,71,35,80,49,"Pablo Sarabia")
(81,85,84,76,42,74,66,"Ben Yedder")
(81,77,75,76,40,75,73,"Vitolo")
(81,52,46,18,15,29,50,"Cillessen")
(81,75,69,43,80,50,82,"Murillo")
(81,76,78,79,36,56,71,"Batshuayi")
(81,51,45,18,15,27,52,"Rulli")
(81,93,74,74,42,66,78,"Williams")
(81,87,79,74,54,74,64,"Morales")
(81,66,76,70,69,74,68,"Pablo Fornals")
(81,37,64,71,78,72,74,"Iborra")
(81,75,69,43,80,50,82,"Murillo")
(80,40,45,13,13,28,42,"Moy\225")
(80,51,81,75,58,84,54,"Santi Cazorla")
(80,43,44,15,13,22,53,"Diego L\243pez")
(80,80,74,59,74,72,75,"Juanfran")
(80,52,74,73,63,82,71,"Be\241at")
(80,74,77,78,37,57,67,"\193ngel")
(80,40,44,16,17,30,59,"Kiko Casilla")
(80,77,75,71,76,77,72,"Antunes")
(80,65,73,78,51,66,79,"Stuani")
(80,74,78,78,39,81,62,"Boudebouz")
(80,75,79,69,40,83,64,"Susaeta")
(80,79,84,68,47,72,62,"Muniain")
(80,68,69,78,41,55,73,"Kike Garc\237a")
(80,78,70,68,77,68,76,"Mario Gaspar")
(80,71,73,39,75,67,79,"Hugo Mallo")
(80,62,73,76,46,64,77,"Sergi Enrich")
(80,88,81,75,30,67,66,"Muriel")
(80,72,81,75,44,76,68,"Nolito")
(80,92,77,71,36,73,61,"Cristian Tello")
(80,82,75,73,62,72,75,"Portu")
(80,82,85,68,44,74,59,"Inui")
(80,56,57,49,80,53,75,"Feddal")
(80,79,77,74,54,66,72,"Santi Mina")
(80,80,83,76,54,71,55,"Correa")
(80,84,74,78,48,64,84,"Mariano")
(80,84,78,76,32,65,65,"Toko-Ekambi")
(80,91,81,56,72,60,76,"N\233lson Semedo")
(80,72,76,70,37,75,57,"Oyarzabal")
(80,81,74,56,78,65,69,"Odriozola")
(80,76,75,73,61,79,62,"Carlos Soler")
(80,63,65,77,36,61,72,"G\243mez")
(80,73,80,72,63,78,69,"Lo Celso")
(79,61,80,78,38,59,73,"Charles")
(79,75,78,63,74,70,76,"F\225bio Coentr\227o")
(79,60,58,50,78,61,74,"Kj\230r")
(79,60,59,48,76,52,78,"Sidnei")
(79,75,66,60,78,64,79,"Mercado")
(79,86,79,71,49,73,60,"Piatti")
(79,70,72,75,45,60,71,"Kalini\263")
(79,71,75,58,75,62,82,"Coquelin")
(79,84,76,63,71,69,80,"De Marcos")
(79,60,73,71,36,78,48,"Canales")
(79,74,75,71,41,77,52,"Orellana")
(79,74,73,63,77,71,74,"Escudero")
(79,79,73,58,76,67,74,"Jaume Costa")
(79,79,74,70,59,72,64,"Borja Garc\237a")
(79,75,77,80,44,57,72,"Sergio Le\243n")
(79,75,77,76,55,79,65,"Ibai G\243mez")
(79,65,72,80,44,68,72,"Guidetti")
(79,63,75,69,71,79,67,"Campa\241a")
(79,65,71,46,81,68,73,"Mandi")
(79,55,63,61,77,59,78,"David L\243pez")
(79,51,78,64,64,73,62,"Sergi Darder")
(79,72,66,34,78,51,83,"\193lvaro")
(79,74,79,53,67,65,80,"Roque Mesa")
(79,72,66,53,78,62,80,"I\241igo Mart\237nez")
(79,77,79,71,55,78,58,"Denis Su\225rez")
(79,76,76,75,36,66,61,"Leo Baptistao")
(79,45,46,17,16,24,53,"Pacheco")
(79,86,77,60,70,72,67,"Gay\224")
(79,78,78,73,36,69,63,"Sanabria")
(79,62,74,71,64,78,68,"Granell")
(79,53,67,52,73,65,69,"Marcos Llorente")
(79,37,36,19,19,30,47,"Dmitrovi\263")
(78,49,70,60,75,68,75,"Javi Fuego")
(78,86,79,68,60,71,59,"Jes\250s Navas")
(78,62,68,62,77,61,83,"Javi Garc\237a")
(78,43,44,15,13,27,48,"Sergio")
(78,53,69,59,75,64,82,"Manu Garc\237a")
(78,74,72,63,78,64,75,"Coke")
(78,52,73,71,65,80,56,"Granero")
(78,76,75,72,74,73,72,"Lay\250n")
(78,50,66,55,77,60,78,"Daniel Carri\231o")
(78,53,63,62,78,71,63,"Iturraspe")
(78,39,45,17,16,21,55,"Herrer\237n")
(78,62,68,56,76,71,79,"Arbilla")
(78,75,72,43,74,60,76,"Piccini")
(78,34,41,15,19,28,51,"Vacl\237k")
(78,85,76,54,73,61,79,"Arias")
(78,77,76,69,26,74,57,"Januzaj")
(78,87,78,70,43,69,59,"Szymanowski")
(78,68,62,37,76,43,78,"Paulo Oliveira")
(78,67,73,57,69,68,72,"Pere Pons")
(78,81,79,72,48,72,69,"Sisto")
(78,89,71,63,70,72,72,"Mojica")
(78,84,75,63,71,64,83,"Capa")
(78,66,78,58,63,70,69,"Lobotka")
(78,71,71,62,74,66,80,"Escalante")
(78,64,76,61,65,73,62,"Dani Ceballos")
(78,74,73,77,38,61,65,"\220nal")
(78,41,42,24,18,25,50,"David Soria")
(78,70,69,39,78,47,71,"Vallejo")
(78,70,79,78,61,81,55,"Bardhi")
(78,64,70,78,34,53,56,"Loren")
(77,69,76,76,39,74,54,"Sergio Garc\237a")
(77,34,60,61,74,63,79,"Iv\225n Ramis")
(77,37,60,79,43,60,70,"Jorge Molina")
(77,48,66,61,73,69,74,"Markel Bergara")
(77,65,63,59,77,66,74,"Vermaelen")
(77,37,63,36,78,49,80,"Cabral")
(77,70,68,54,76,63,73,"Barrag\225n")
(77,65,72,67,66,71,65,"Zurutuza")
(77,70,78,71,62,73,72,"Trejo")
(77,52,69,66,75,68,83,"Diop")
(77,77,71,60,75,66,82,"Yuri Berchiche")
(77,46,47,18,19,27,53,"Roberto")
(77,35,64,66,78,58,77,"Mikel San Jos\233")
(77,39,40,17,14,29,51,"Yoel")
(77,47,54,44,76,54,74,"Espinosa")
(77,59,76,62,75,76,73,"Victor S\225nchez")
(77,71,70,52,76,68,69,"Cote")
(77,51,44,17,14,18,43,"Chichizola")
(77,52,51,32,76,48,74,"Juanpe")
(77,77,76,71,37,69,74,"P\233rez")
(77,76,77,73,35,63,62,"Juanmi")
(77,38,62,42,77,58,70,"Sergi G\243mez")
(77,64,65,48,77,57,75,"Funes Mori")
(77,33,52,35,76,46,76,"Bruno")
(77,91,78,62,69,67,75,"Aleix Vidal")
(77,78,70,65,73,67,78,"Su\225rez")
(77,73,69,69,74,70,80,"Yoku\351lu")
(77,78,75,74,53,71,67,"Cheryshev")
(77,78,74,77,42,56,71,"Roger")
(77,35,38,17,15,28,46,"Bounou")
(77,64,73,68,62,69,64,"Jozabed")
(77,53,43,18,16,25,40,"Rub\233n Blanco")
(77,83,78,69,73,63,67,"Rub\233n Pe\241a")
(77,81,80,69,28,69,47,"Boufal")
(77,55,71,61,73,64,81,"Torres")
(77,68,66,48,76,57,75,"R\250ben Vezo")
(77,75,67,39,77,54,76,"Djen\233")
(77,71,75,72,49,56,72,"Calleri")
(77,79,76,74,35,66,58,"Munir")
(77,60,69,54,75,65,80,"Vuk\269evi\263")
(77,66,69,70,62,72,63,"Joan Jord\225n")
(77,45,65,59,70,58,71,"Radoja")
(77,43,44,16,16,20,51,"\193lex Remiro")
(77,66,69,51,76,54,75,"Yeray")
(77,79,74,75,46,58,77,"Andr\233 Silva")
(77,66,59,36,75,39,78,"Gnagnon")
(77,68,77,66,67,72,66,"Shibasaki")
(77,89,78,68,46,65,70,"Ndiaye Diedhiou")
(77,93,79,70,30,63,63,"Vin\237cius J\250nior")
(77,75,77,59,72,68,74,"Rosales")
(77,39,40,17,14,29,51,"Yoel")
(76,31,71,74,38,79,51,"Ganso")
(76,89,72,74,42,64,66,"Doumbia")
(76,58,56,37,74,48,80,"Laguardia")
(76,87,78,64,43,66,55,"G\252rler")
(76,65,61,43,75,47,76,"Jordi Amat")
(76,57,68,65,71,68,70,"Tom\225s Pina")
(76,69,71,63,69,64,78,"Sergio \193lvarez")
(76,45,64,62,69,74,77,"Timor")
(76,81,78,74,45,71,64,"Sansone")
(76,60,44,20,19,25,48,"Serantes")
(76,79,71,49,72,64,78,"David Junc\224")
(76,82,73,72,38,59,63,"Rub\233n Sobrino")
(76,69,69,77,37,55,69,"De Tom\225s")
(76,78,82,71,47,69,72,"De Blasis")
(76,64,67,41,75,53,74,"Diego Llorente")
(76,92,81,70,32,61,68,"Simon")
(76,77,73,65,47,71,63,"Embarba")
(76,58,48,20,19,29,51,"Jaume")
(76,74,64,74,35,55,73,"Mata")
(76,59,69,69,57,67,76,"Eraso")
(76,62,71,76,32,53,67,"Borja Iglesias")
(76,88,76,71,41,54,75,"Boateng")
(76,80,71,66,53,67,65,"Pedraza")
(76,58,54,39,75,42,78,"Diakhaby")
(76,79,70,63,43,65,60,"Iv\225n Alejo")
(76,91,69,56,73,62,73,"Hern\225ndez")
(76,50,69,53,72,66,68,"Arambarri")
(76,29,36,13,15,25,42,"Lunin")
(76,78,76,74,37,70,76,"Braithwaite")
(76,47,69,67,69,71,70,"Recio")
(76,70,75,76,33,66,63,"Sandro")
(76,31,53,38,79,47,68,"Bonera")
(76,32,39,15,14,23,50,"Iraizoz")
(76,42,43,16,14,24,50,"Barbosa")
(76,56,47,15,17,28,58,"Andr\233s Fern\225ndez")
(76,51,43,17,15,29,50,"Iv\225n Cu\233llar")
(76,64,67,52,76,56,73,"Moreno")
(76,72,75,71,38,71,61,"El Zhar")
(76,79,78,66,41,74,63,"Kakuta")
(75,64,75,63,50,73,59,"Portillo")
(75,73,73,68,47,74,60,"Keko")
(75,57,63,75,41,58,67,"Borja Bast\243n")
(75,69,73,53,70,65,75,"Javi L\243pez")
(75,48,40,16,14,20,45,"Joel Robles")
(75,45,57,46,75,53,70,"Ra\250l Navas")
(75,72,73,50,70,63,58,"Aday Ben\237tez")
(75,72,71,41,71,61,73,"Carles Planas")
(75,46,53,37,78,45,70,"Naldo")
(75,66,56,29,73,35,77,"Rodrigo Ely")
(75,64,73,65,60,73,58,"Rub\233n Pardo")
(75,83,75,58,67,71,66,"To\241o Garc\237a")
(75,71,63,51,74,54,76,"Bigas")
(75,53,58,35,75,48,67,"Insua")
(75,71,67,49,72,54,78,"Amadou")
(75,61,70,69,62,75,56,"Medr\225n")
(75,60,57,33,76,44,71,"Duarte")
(75,76,73,72,44,69,67,"Rol\225n")
(75,61,62,40,74,46,76,"Postigo")
(75,59,68,75,43,49,73,"Carrillo")
(75,76,71,64,40,70,57,"Burgui")
(75,73,74,62,61,74,69,"Unai L\243pez")
(75,80,75,73,43,66,62,"Ivi")
(75,86,75,65,49,74,59,"Jony")
(75,67,65,36,75,55,73,"Bustinza")
(75,61,69,63,68,70,71,"Merino")
(75,87,73,60,68,68,72,"Lekue")
(75,73,68,71,57,68,60,"Sabin Merino")
(75,69,65,35,74,52,73,"Aritz")
(75,68,67,37,74,59,68,"Rub\233n Duarte")
(75,61,67,67,70,69,66,"Melero")
(75,70,70,73,31,52,49,"Borja Mayoral")
(75,61,68,74,34,54,63,"Sergi Guardiola")
(75,74,77,65,60,70,71,"Jensen")
(75,83,75,66,55,63,66,"C\243rdoba")
(75,81,71,54,71,66,62,"Lato")
(75,54,68,54,67,67,65,"Marc Roca")
(75,67,62,36,74,44,77,"Cabaco")
(75,85,68,68,41,59,65,"Hern\225ndez")
(75,79,72,57,62,67,49,"Francis")
(75,67,55,24,74,35,72,"Unai N\250\241ez")
(75,70,66,56,74,63,66,"Firpo")
(75,73,69,61,38,66,58,"Dani Raba")
(75,74,67,37,72,52,64,"Mart\237n")
(75,59,64,64,72,64,72,"Ra\269i\263")
(75,83,69,72,40,69,75,"Beb\233")
(75,72,75,69,25,73,61,"Samu Saiz")
(75,61,72,57,70,61,71,"Crist\243foro")
(75,73,68,71,57,68,60,"Sabin Merino")
(75,70,70,73,31,52,49,"Borja Mayoral")
(75,70,66,56,74,63,66,"Firpo")
(75,47,72,64,71,66,76,"Mikel Rico")
(75,83,69,72,40,69,75,"Beb\233")
(75,69,73,53,72,68,62,"Luisinho")
(75,67,71,74,44,67,58,"Beauvue")
(75,44,42,16,20,29,50,"Oier")
(75,64,67,50,75,66,72,"Roncaglia")
(75,73,72,73,51,73,68,"Rochina")
(75,36,53,46,72,59,74,"Alcal\225")
(75,49,67,54,68,64,77,"Rub\233n P\233rez")
(75,71,69,50,72,64,77,"Balenziaga")
(75,70,62,41,75,50,72,"Ara\250jo")
(75,60,69,63,75,64,75,"Gonalons")
(74,45,62,35,71,43,78,"Etxeita")
(74,60,69,68,55,74,59,"M\237chel")
(74,71,62,49,73,58,75,"Nyom")
(74,50,67,44,73,60,74,"Marc Muniesa")
(74,75,70,62,74,64,79,"Doukour\233")
(74,72,68,48,72,61,80,"Ximo Navarro")
(74,71,68,59,71,64,77,"Luna")
(74,60,50,15,15,32,49,"Jordi Masip")
(74,94,72,65,65,69,74,"Adv\237ncula")
(74,91,77,66,35,72,57,"David Ferreiro")
(74,77,70,69,38,55,71,"Lozano")
(74,70,74,65,49,72,64,"Moi G\243mez")
(74,75,73,71,38,54,77,"Longo")
(74,79,71,63,69,67,73,"Silva")
(74,80,73,71,36,69,62,"Jason")
(74,45,60,50,69,58,74,"Musto")
(74,92,76,62,33,63,57,"\193lvaro Garc\237a")
(74,74,73,64,70,66,61,"\193lex Moreno")
(74,73,72,68,53,68,52,"Pozo")
(74,69,64,56,72,50,75,"Chema Rodr\237guez")
(74,69,64,36,73,56,67,"Zald\250a")
(74,76,79,64,27,65,42,"Roberts")
(74,54,56,40,73,41,74,"Vel\225zquez")
(74,84,80,62,29,56,56,"Mor")
(74,56,69,49,70,60,71,"Iturra")
(74,69,73,55,60,64,71,"Imbula")
(74,62,47,18,14,25,52,"Alberto")
(74,76,72,66,68,66,76,"Juanfran")
(74,87,76,64,67,68,80,"Wakaso")
(74,70,60,36,73,52,74,"Ramalho")
(73,65,57,31,72,46,70,"Ignasi Miquel")
(73,70,69,62,68,71,77,"Raul Garc\237a")
(73,68,72,63,53,73,52,"Javi Espinosa")
(73,79,74,61,41,65,57,"Herv\237as")
(73,51,47,42,73,44,75,"Ba")
(73,63,69,61,66,72,67,"Prci\263")
(73,44,68,49,65,67,61,"Sergi Samper")
(73,79,70,70,33,68,67,"\211scar Plano")
(73,73,68,49,70,64,62,"K\233vin Rodrigues")
(73,60,61,42,73,54,71,"R\243ber")
(73,46,50,31,70,40,72,"Marip\225n")
(73,61,60,41,72,49,74,"Alonso")
(73,77,70,55,67,64,68,"Arana")
(73,77,70,69,37,65,58,"Pere Milla")
(73,83,68,44,71,60,77,"Hermoso")
(73,76,71,70,39,63,73,"Santos")
(73,61,66,57,63,69,67,"Zubeldia")
(73,71,69,69,41,65,60,"Brais M\233ndez")
(73,57,69,66,67,65,72,"Brasanac")
(73,62,67,55,53,61,58,"Melendo")
(73,67,64,60,58,63,55,"Valverde")
(73,63,67,58,68,67,66,"Maksimovi\263")
(73,76,69,62,34,63,54,"Ferr\225n Torres")
(73,57,69,66,67,65,72,"Brasanac")
(73,65,73,62,67,69,67,"Douglas Luiz")
(73,54,42,14,15,28,50,"Riesgo")
(73,64,63,51,71,51,76,"Sergio S\225nchez")
(72,76,64,68,37,48,58,"En-Nesyri")
(72,70,69,51,67,61,58,"Fran Beltr\225n")
(72,68,69,44,70,59,69,"Tito")
(72,50,61,57,65,61,67,"Vesga")
(72,55,66,63,70,73,80,"Elustondo")
(72,37,57,50,70,46,77,"Kiko Olivas")
(72,58,68,75,37,66,66,"\268op")
(72,71,62,48,72,60,74,"D\237dac Vil\224")
(72,62,58,35,70,54,81,"Cabrera")
(72,55,44,18,16,27,46,"Aitor")
(72,65,63,40,70,50,77,"Guiti\225n")
(72,72,69,67,37,68,58,"Samu Garc\237a")
(72,71,62,33,69,41,80,"Omeruo")
(72,38,59,46,68,51,81,"Siovas")
(72,43,36,18,17,23,48,"Werner")
(72,75,75,65,48,66,55,"Rober Ib\225\241ez")
(72,59,61,34,68,48,78,"Luismi")
(72,71,67,47,71,55,68,"Vigaray")
(72,70,67,46,70,58,68,"Adri\225n Mar\237n")
(72,68,77,66,25,73,45,"Su\225rez")
(72,89,76,62,36,62,51,"Verde")
(72,55,63,68,64,70,69,"Rub\233n Alcaraz")
(72,82,71,58,64,60,75,"Jordi Calavera")
(72,76,71,61,29,68,46,"Nacho Gil")
(71,34,53,33,72,50,63,"Dorado")
(71,33,60,61,68,63,76,"Borja Fern\225ndez")
(71,68,69,59,68,65,69,"Pedro L\243pez")
(71,57,66,56,64,71,73,"Sastre")
(71,84,72,51,62,60,75,"Anto\241ito")
(71,43,49,27,70,38,76,"Mu\241oz")
(71,43,53,35,70,47,73,"Pulido")
(71,69,67,68,40,72,59,"\193lex Gallar")
(71,84,70,54,65,63,73,"Nacho")
(71,31,59,59,67,66,55,"Gumbau")
(71,82,62,50,65,59,81,"Akapo")
(71,51,64,70,36,48,66,"Alex Alegr\237a")
(71,72,67,58,68,68,65,"Miram\243n")
(71,59,66,73,30,52,50,"Jon Bautista")
(71,52,64,65,42,68,58,"Borja Lasso")
(71,36,39,18,18,24,47,"Dimitrievski")
(71,51,64,70,36,48,66,"Alex Alegr\237a")
(70,61,66,73,43,55,70,"Javi Guerra")
(70,61,68,52,60,64,70,"Aguilera")
(70,70,65,52,68,58,68,"Foulquier")
(70,57,60,40,67,51,75,"Dos Santos")
(70,67,63,40,70,54,67,"David Costas")
(70,62,71,59,64,62,57,"Cot\225n")
(70,71,72,61,27,66,55,"Leiva")
(70,57,42,19,15,29,48,"Sivera")
(70,72,69,46,66,57,69,"Anuar")
(70,78,66,63,37,55,67,"\193vila")
(70,63,71,58,55,68,54,"Aleix Garc\237a")
(70,69,73,57,46,65,50,"Toni Villa")
(70,85,73,68,41,59,55,"Jos\233 Arn\225iz")
(70,77,72,61,56,67,58,"Ale\241\224")
(70,68,66,53,68,56,67,"C\225seres")
(70,77,67,59,67,61,68,"Ganea")
(70,69,68,61,55,68,60,"Manu Morlanes")
(70,68,70,65,29,71,44,"Kangin Lee")
(70,75,71,62,33,63,54,"Espinoza")
(70,52,65,49,65,60,69,"Christian Rivera")
(69,78,64,49,65,56,73,"Javi Moyano")
(69,79,66,65,29,56,54,"Marc Cardona")
(69,83,73,42,63,50,67,"Wagu\233")
(69,69,63,64,42,45,63,"Sadiku")
(69,78,69,60,53,62,67,"Hjulsager")
(69,75,65,65,60,53,61,"Narv\225ez")
(69,60,62,70,35,42,69,"Carlos Fern\225ndez")
(69,67,70,65,34,63,43,"David Concha")
(69,75,63,48,64,53,74,"Bre\382an\269i\263")
(69,57,60,60,63,58,61,"Santi Comesa\241a")
(69,79,66,65,29,56,54,"Marc Cardona")
(69,83,73,42,63,50,67,"Wagu\233")
(69,83,67,46,61,59,72,"Cucurella")
(69,65,54,29,69,39,64,"Calero")
(69,78,66,51,62,53,67,"Moore")
(69,83,67,46,61,59,72,"Cucurella")
(69,74,73,61,27,57,50,"Brahim D\237az")
(68,31,59,71,60,76,49,"Camacho")
(68,72,64,66,35,45,71,"Villalibre")
(68,87,69,61,31,56,63,"Bangoura")
(68,70,51,47,65,56,68,"Joaqu\237n")
(68,32,37,15,14,23,38,"Iv\225n Villar")
(68,54,67,46,69,56,65,"Maz\225\328")
(68,71,69,61,42,60,48,"\211scar Pinchi")
(68,47,36,16,17,21,50,"Unai Sim\243n")
(68,34,39,19,15,25,44,"Soriano")
(68,52,39,14,13,18,45,"Koke Vegas")
(68,79,65,66,24,51,60,"Dwamena")
(68,64,67,55,51,65,49,"Riqui Puig")
(67,47,40,17,16,21,52,"Santamar\237a")
(67,43,36,19,15,21,46,"Rub\233n Y\225\241ez")
(67,47,40,19,15,22,45,"Jos\233 Su\225rez")
(67,74,64,39,63,46,67,"Akieme")
(67,69,65,57,40,66,47,"Curro S\225nchez")
(67,61,57,33,68,42,62,"Lluis L\243pez")
(67,83,69,62,30,58,66,"Iban Salvador")
(67,62,54,34,67,41,66,"Adri\225n Di\233guez")
(67,67,63,54,53,55,57,"Paik Seung Ho")
(67,69,62,62,41,55,58,"Dani Ojeda")
(67,69,61,65,30,47,59,"Abel Ruiz")
(67,24,34,10,11,19,41,"Cristian Rivero")
(66,74,62,63,28,49,58,"Apeh")
(66,62,56,38,66,42,68,"Berrocal")
(66,73,63,58,33,61,43,"Jos\233 Lara")
(66,67,61,42,64,53,61,"Miranda")
(66,60,69,57,56,59,60,"Kaptoum")
(66,40,54,42,65,47,66,"Carlos Blanco")
(66,68,60,32,63,46,64,"Miguel\243n")
(66,22,33,10,11,17,36,"Jovanovi\263")
(66,44,40,20,18,29,46,"Sisniega")
(65,71,66,61,39,59,57,"Cristo Gonz\225lez")
(65,65,62,51,60,56,64,"Dami\224")
(65,63,62,50,43,52,47,"Joni Montiel")
(65,52,53,33,66,43,58,"Javi Jim\233nez")
(65,59,64,52,51,56,37,"Guridi")
(65,60,44,34,67,34,62,"Kike")
(64,64,59,34,62,42,55,"Reguil\243n")
(64,70,58,38,59,56,69,"Moi Delgado")
(64,55,64,58,57,64,51,"Dani Molina")
(64,73,65,53,45,54,57,"Soni")
(64,54,50,26,64,34,60,"Diego Alende")
(64,70,54,34,60,40,68,"Tar\237n")
(64,61,62,50,60,58,54,"Jos\233 Mena")
(64,53,58,62,30,44,54,"Eckert")
(64,65,61,50,59,61,63,"\193lex Centelles")
(63,47,47,34,64,42,56,"Robert Costa")
(63,56,64,58,41,62,41,"Sito")
(63,69,62,52,23,50,50,"Mario Gonz\225lez")
(63,53,42,21,16,28,48,"Garc\237a")
(63,32,33,9,12,19,41,"Zidane")
(62,57,55,64,28,43,65,"Rub\233n Mesa")
(62,45,35,17,16,22,46,"Ezkieta")
(62,68,61,54,35,57,47,"\193lex Blanco")
(61,47,51,34,61,37,60,"Roger Riera")
(61,67,59,50,53,55,62,"Genaro")
(61,54,59,49,54,50,57,"Julio Gracia")
(61,60,57,41,57,56,57,"Gen\237s")
(61,21,29,11,12,17,44,"\193lex Dos Santos")
(61,60,57,41,57,56,57,"Gen\237s")
(60,57,57,37,57,49,58,"Sergi \193lamo")
(60,56,51,49,57,47,57,"Javi P\233rez")
(57,64,56,55,35,52,32,"Andzouana")
(56,58,55,53,29,43,55,"Pedrosa")
(56,26,30,11,9,18,28,"Marc Vito")
(56,61,59,43,40,50,48,"Pol Lozano")
Nota: Solo extraigo unos cuantos datos (y calculo la media) para enseñar cuanto podemos sacar de datos y no tener que hacerlo de forma manual