New stats format in acb.com

Playing with the new stats format in acb.com (launched in October 2019)


In [1]:
import pandas as pd

In [2]:
season = 2019
urls = [
    'http://www.acb.com/estadisticas-individuales/{}/temporada_id/{}/tipo_id/0'.format(x, season)
    for x in 
    [
        'valoracion', 
        'puntos', 
        'rebotes', 
        'asistencias', 
        'robos', 'tapones', 
        'mas-menos', 
        'minutos', 
        'tiros3', 
        'tiros3-porciento',
        'tiros2', 
        'tiros2-porciento',
        'tiros1', 
        'tiros1-porciento',
        'rebotes-defensivos',
        'rebotes-ofensivos',
        'faltas-recibidas',
        'faltas-cometidas',
        'mates'
    ]
]

In [3]:
data = pd.concat([pd.read_html(url)[0].iloc[:, 1:] for url in urls], axis=0).drop_duplicates()

In [4]:
data.columns = [
    'name', 'games', 'minutes', 'points',
    '3p_converted', '3p_attempted', '3p_percentage',
    '2p_converted', '2p_attempted', '2p_percentage',
    '1p_converted', '1p_attempted', '1p_percentage',
    'offensive_rebounds', 'deffensive_rebounds', 'rebounds',
    'assists', 'steals', 'turnovers',
    'blocks', 'received_blocks',
    'dunks', 'faults', 'received_faults',
    'plus_minus', 'pir'
]
data = data.set_index('name')

In [5]:
data.describe()


Out[5]:
games minutes points 3p_converted 3p_attempted 2p_converted 2p_attempted 1p_converted 1p_attempted offensive_rebounds ... assists steals turnovers blocks received_blocks dunks faults received_faults plus_minus pir
count 196.000000 196.000000 196.000000 196.000000 196.000000 196.000000 196.000000 196.000000 196.000000 196.000000 ... 196.000000 196.000000 196.000000 196.000000 196.000000 196.000000 196.000000 196.000000 196.000000 196.000000
mean 3.571429 66.923469 27.591837 3.188776 8.765306 6.724490 12.897959 4.576531 6.020408 3.153061 ... 5.122449 2.117347 4.275510 0.943878 0.882653 0.974490 6.867347 6.913265 0.535714 28.382653
std 0.835126 27.259047 16.912345 3.386258 7.851573 5.165528 8.793925 4.595344 5.644111 3.260807 ... 5.133630 1.919269 2.994972 1.529844 1.141975 1.500209 3.576670 5.205286 21.015104 19.204206
min 1.000000 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 ... 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 -69.000000 -14.000000
25% 3.000000 50.000000 16.000000 1.000000 2.000000 3.000000 6.000000 1.000000 2.000000 1.000000 ... 1.000000 1.000000 2.000000 0.000000 0.000000 0.000000 4.000000 3.000000 -14.000000 15.000000
50% 4.000000 67.500000 24.000000 2.000000 7.000000 6.000000 11.000000 4.000000 5.000000 2.000000 ... 3.000000 2.000000 4.000000 0.000000 1.000000 0.000000 7.000000 6.000000 1.000000 25.000000
75% 4.000000 87.000000 36.250000 5.000000 13.000000 10.000000 18.000000 7.000000 8.000000 4.000000 ... 7.000000 3.000000 6.000000 1.000000 1.000000 1.000000 9.000000 9.250000 14.250000 37.250000
max 4.000000 124.000000 95.000000 17.000000 39.000000 31.000000 44.000000 33.000000 38.000000 19.000000 ... 27.000000 11.000000 14.000000 7.000000 6.000000 8.000000 17.000000 30.000000 56.000000 98.000000

8 rows × 22 columns

PIR and plus-minus


In [6]:
data[['pir', 'plus_minus']].sum(axis=1).sort_values(ascending=False).head(18)


Out[6]:
name
Nikola Mirotic Stajovic           130
Ferran Bassas Navarra             109
Walter Samuel Tavares Da Veiga    101
Giorgi Shermadini                 100
Thaddus Dewayn Mcfadden           100
Clark, Earl                        98
Augusto Cesar Lima Brito           94
Marcelo Tieppo Huertas             89
Cheikh Moussa Diagné               88
Brandon Davies                     87
Costello, Matthew                  87
Adams, Josh                        86
Facundo Campazzo                   84
Daniel Díez De La Faya             83
Harper, Demonte                    80
Gabriel Alejandro Deck             77
Ondrej Balvin                      76
Nicolás Laprovittola               73
dtype: int64

Offensive players


In [7]:
(
    data[
        ['points', 
         'offensive_rebounds', 
         'assists', 
         'received_faults', 
         '3p_converted', 
         '2p_converted', 
         '1p_converted',
         'plus_minus']
    ].sum(axis=1) - 
    data[
        ['3p_attempted', 
         '2p_attempted', 
         '1p_attempted',
         'turnovers',
         'received_blocks'
        ]
    ].sum(axis=1)
).sort_values(ascending=False).head(18)


Out[7]:
name
Nikola Mirotic Stajovic           114
Ferran Bassas Navarra             102
Thaddus Dewayn Mcfadden           101
Adams, Josh                        92
Giorgi Shermadini                  90
Augusto Cesar Lima Brito           84
Harper, Demonte                    83
Clark, Earl                        81
Marcelo Tieppo Huertas             81
Facundo Campazzo                   77
Walter Samuel Tavares Da Veiga     77
Cheikh Moussa Diagné               75
Brandon Davies                     72
Sergio Llull Meliá                 70
Nicolás Laprovittola               70
Jaycee Don Carroll                 69
Vitor Alves Benite                 69
Gabriel Alejandro Deck             69
dtype: int64

Deffensive players


In [8]:
(
    data[
        ['deffensive_rebounds', 
         'steals', 
         'blocks', 
         'plus_minus']
    ].sum(axis=1) - data['faults']
).sort_values(ascending=False).head(18)


Out[8]:
name
Walter Samuel Tavares Da Veiga    78
Clark, Earl                       73
Ferran Bassas Navarra             56
Nikola Mirotic Stajovic           53
Augusto Cesar Lima Brito          49
Facundo Campazzo                  49
Jonathan Barreiro Rodríguez       48
Fabien Causeur                    47
Usman Garuba Alari                43
Jean-Pierre Tokoto II             43
Costello, Matthew                 42
Daniel Díez De La Faya            42
Mickey, Jordan                    40
Louis Labeyrie                    39
Gabriel Alejandro Deck            38
Nicolás Laprovittola              37
Marcelo Tieppo Huertas            37
Bojan Dubljevic                   37
dtype: int64

Team players


In [9]:
(data['plus_minus'] + data['minutes'] / 2 - data['pir']).sort_values(ascending=False).head(18)


Out[9]:
name
Clark, Earl                         65.5
Fabien Causeur                      63.5
Thomas Schreiner                    47.5
Walter Samuel Tavares Da Veiga      45.5
Jean-Pierre Tokoto II               45.5
Vitor Alves Benite                  44.0
Anthony Erwin Randolph Jr           43.0
Adam Hanga                          42.0
Rousselle, Jonathan                 40.5
Omar Sharif Cook                    39.5
Ferran Bassas Navarra               39.5
Sergio Llull Meliá                  39.0
Massenat, Frantz                    38.0
Sakota, Dusan                       37.5
Harper, Demonte                     36.5
Higgins, Courdon                    36.0
Rodrigo San Miguel de la Iglesia    36.0
Delaney, Malcolm                    35.0
dtype: float64

Assists by turnover


In [10]:
((data['assists'] + 1) / (data['turnovers'] + 1)).sort_values(ascending=False).head(18)


Out[10]:
name
David Navarro Brugal                6.000000
Omar Sharif Cook                    4.666667
Rodrigo San Miguel de la Iglesia    4.200000
Kelvin Creswell Rivers              4.000000
Albert Oliver Campos                3.250000
Sam Van Rossom                      3.166667
John William Shurna                 3.000000
Polonara, Achille                   3.000000
Izundu, Ebuka                       3.000000
Nicholas James Spires               3.000000
Rinalds Malmanis                    3.000000
Dovydas Giedraitis                  3.000000
Luca Vildoza                        2.600000
Daniel Pérez Otero                  2.600000
Scrubb, Philip                      2.600000
Earl Genard Calloway                2.500000
Atkins, Darion                      2.500000
Alberto Díaz Ortiz                  2.500000
dtype: float64

Up in the air


In [11]:
(
    data['dunks'] + data['blocks'] - data['received_blocks'] + data['2p_converted'] - data['2p_attempted']
).sort_values(ascending=False).head(18)


Out[11]:
name
Lammers, Benjamin                 7
Fall, Youssoupha                  6
Mickey, Jordan                    4
Ilimane Diop Gaye                 4
Tryggvi Hlinason                  4
Louis Labeyrie                    2
Sy, Bandja                        2
Walter Samuel Tavares Da Veiga    2
Rolands Smits                     2
Víctor Claver Arocas              1
Pere Tomàs Noguera                1
Javier Vega Merayo                1
Vit Krejci                        1
Joel Parra López                  1
Alejandro Abrines Redondo         1
Edgar Benjamin Vicedo Ayala       1
Oriol Paulí Fornells              1
Vyacheslav Bobrov                 1
dtype: int64

Greedy


In [12]:
(
    data[['3p_attempted', '2p_attempted', 'turnovers', 'received_blocks']].sum(axis=1) - 
    data[['assists','plus_minus']].sum(axis=1)
).sort_values(ascending=False).head(18)


Out[12]:
name
Luke Cameron Harangody            121
Klemen Prepelic                   104
Alen Omic                          92
Kravic, Dejan                      92
Christian Eyenga Moenge            90
Eddie, Jarell                      71
Anderson, Karvel                   70
EJ Rowland                         69
Shayne Mitchell Whittington        69
Konstantinos Vasileiadis           68
Askia Toussaint Booker             67
Magee, Fletcher                    64
Davis, Jordan                      63
Demitrius Rayelle Conger           61
Dino Radoncic                      60
Christopher Daniel Czerapowicz     58
Nikos Zisis                        57
Vladimir Brodziansky               56
dtype: int64

In [ ]:


In [ ]: