L2M

Last two minute report data from the NBA

View the Project on GitHub atlhawksfanatic/L2M

L2M

Articles

Description

This repository is meant as a way to maintain the Last Two Minute (L2M) reports that the NBA releases for certain NBA games. The clean, processed version of the data can be found in 1-tidy/L2M/L2M.csv while the corresponding R code to create this data is scattered across the 0-data and 1-tidy folders. The 0-data/L2M/ folder hosts the raw data (in pdf form).

Season Games Grades per period Calls per period IC per period CC Percentage INC per period Bad Calls Percentage CNC per period
2015 139 11.27 4.82 0.15 97% 1.37 25% 5.08
2016 439 12.88 4.77 0.21 96% 1.66 29% 6.45
2017 428 15.00 4.15 0.08 98% 2.49 39% 8.36
2018 475 19.67 4.14 0.12 97% 2.46 39% 13.07
2019 453 21.30 3.63 0.14 96% 2.54 43% 15.12
2020 328 17.82 3.78 0.15 96% 1.11 26% 12.93

L2M Call Accuracy updated through 2020-03-11

The process for compiling the L2M dataset is to:

  1. Download the raw data, these are broken up into the different years which the NBA has collected L2M:
    • Archived which begins on 1 March 2015 and goes through the 2017 NBA Finals.
    • 2017-18
    • 2018-19 - which changes formats to online only after the 2019 NBA All Star Game (February 21, 2019 is the first). This requires the splashr package to handle scraping of the NBA website.
    • 2019-20 - current season and so far no PDFs. splashr package required.
  2. Read in the pdf files through the pdftools package:
  3. Download box scores for games from <basketball-reference.com> for score and rosters to match up committing/disadvantaged players.
    • File depends on .rds files created in step 2 to be present in directory.
  4. Combine L2M reports with box score information

The final output includes the following variables:

And an overview of the changes in L2M reporting is provided in 2-eda/2-through-2019-finals. Further, there is a bit of a how-to for downloading and extracting data on the L2M that is provided in 2-eda/2-how-to-last-two-minutes