LeBron vs the Top 100 Scorers in NBA History

Author

Josh Baker

Published

November 24, 2026

—

## Setup

library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.2.0     ✔ readr     2.2.0
✔ forcats   1.0.1     ✔ stringr   1.6.0
✔ ggplot2   4.0.1     ✔ tibble    3.3.1
✔ lubridate 1.9.5     ✔ tidyr     1.3.2
✔ purrr     1.2.1     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(scales)

Attaching package: 'scales'

The following object is masked from 'package:purrr':

    discard

The following object is masked from 'package:readr':

    col_factor
library(knitr)

top100players <- read.csv("https://myxavier-my.sharepoint.com/:x:/g/personal/bakerj47_xavier_edu/IQBQrEJjkHQUTqEnnHIbzFT7AZtQKSHstHt873in0ftlyms?e=HTnmvv&download=1")
top_player_seasons <- read.csv("https://myxavier-my.sharepoint.com/:x:/g/personal/bakerj47_xavier_edu/IQCDcoalnI8oQb_xKdDjc3ehAa6xpL9vtHKGA2-8BjFcfiE?e=GWclpW&download=1")

Question

The NBA has been around nearly 80 years, having just North of 5,000 players participate in the league during that time. Naturally debates have sparked about who the best of those 5,000 has been. With LeBron James becoming the all time leading scorer a few years back I would like to compare his career to the rest. I would like to know, among the 100 highest career scorers in NBA history, what separates LeBron between, how much he scores per game, how long he stayed productive, or his all around game?

I would also like to check if more seasons played goes along with a lower career scoring average. As well as if LeBron has averaged more points per game than the other top 100 players from the ages of 33 onwards.

How to Accomplish

Basketball-Reference.com keeps a ranked list of career scoring leaders on a page with one row per player, linked to that players specific page. I scraped the top 100 players from the career points leaders page, then looped over each player’s page to collect individual season rows.

The exact variables I pulled were Age, Season, Team, Games Played, Points, Rebounds, Assists, Field Goal %, and 3 Point % all in per game averages. I also include the Player’s name and Career Scoring Rank.

The scraping was done in a separate script. A function in the script scraped a single players page, then a for loop called the website for the other 99 players. Files were saved as two CSV files in the cloud and imported.

I was sure to make requests every four seconds as to abide by the websites request. I was sure to include my email address and the link to our BAIS program link.

Data Wrangling

# Total points = points per game x games played (the site reports averages)
seasons <- top_player_seasons %>%
  mutate(pts_total = pts * games)

glimpse(seasons)
Rows: 1,666
Columns: 12
$ player    <chr> "LeBron James", "LeBron James", "LeBron James", "LeBron Jame…
$ rank      <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, …
$ season    <chr> "2003-04", "2004-05", "2005-06", "2006-07", "2007-08", "2008…
$ age       <int> 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, …
$ team      <chr> "CLE", "CLE", "CLE", "CLE", "CLE", "CLE", "CLE", "MIA", "MIA…
$ games     <int> 79, 80, 79, 78, 75, 81, 76, 79, 62, 76, 77, 69, 76, 74, 82, …
$ pts       <dbl> 20.9, 27.2, 31.4, 27.3, 30.0, 28.4, 29.7, 26.7, 27.1, 26.8, …
$ trb       <dbl> 5.5, 7.4, 7.0, 6.7, 7.9, 7.6, 7.3, 7.5, 7.9, 8.0, 6.9, 6.0, …
$ ast       <dbl> 5.9, 7.2, 6.6, 6.0, 7.2, 7.2, 8.6, 7.0, 6.2, 7.3, 6.3, 7.4, …
$ fg_pct    <dbl> 0.417, 0.472, 0.480, 0.476, 0.484, 0.489, 0.503, 0.510, 0.53…
$ x3p_pct   <dbl> 0.290, 0.351, 0.335, 0.319, 0.315, 0.344, 0.333, 0.330, 0.36…
$ pts_total <dbl> 1651.1, 2176.0, 2480.6, 2129.4, 2250.0, 2300.4, 2257.2, 2109…
# Remove rows from seasons outside of the NBA
seasons <- seasons |> 
  filter(!str_detect(team, "Did not play"))
# One row per player-season is the unit of analysis. For the career-level comparisons I summarised each player into one row.
career <- seasons %>%
  group_by(player, rank) %>%
  summarise(
    seasons   = n(),
    games     = sum(games, na.rm = TRUE),
    total_pts = sum(pts_total, na.rm = TRUE),
    ppg       = total_pts / games,
    seasons_25ppg = sum(pts >= 25, na.rm = TRUE),
    seasons_25_7_7 = sum(pts >= 25 & trb >= 7 & ast >= 7, na.rm = TRUE),
    .groups = "drop"
  )

others <- seasons %>% filter(player != "LeBron James", !is.na(age))
lebron_seasons <- seasons %>% filter(player == "LeBron James")

Analysis and Results

4.1 Longevity and Volume Quick View

career %>%
  arrange(desc(total_pts)) %>%
  slice_head(n = 10) %>%
  mutate(total_pts = comma(round(total_pts)), ppg = round(ppg, 1)) %>%
  select(Rank = rank, Player = player, Seasons = seasons, Games = games,
         `Total points` = total_pts, `Career PPG` = ppg) %>%
  kable(caption = "Top 10 scorers: seasons, games and points")
Top 10 scorers: seasons, games and points
Rank Player Seasons Games Total points Career PPG
1 LeBron James 24 1636 43,667 26.7
2 Kareem Abdul-Jabbar 20 1560 38,391 24.6
3 Karl Malone 19 1476 36,936 25.0
4 Kobe Bryant 20 1346 33,633 25.0
5 Kevin Durant 19 1219 32,989 27.1
6 Michael Jordan 15 1072 32,299 30.1
7 Dirk Nowitzki 21 1522 31,561 20.7
8 Wilt Chamberlain 14 1045 31,415 30.1
9 Julius Erving 16 1243 30,027 24.2
10 James Harden 18 1238 29,654 24.0

The table shows two ways to reach the top of the list: score at a high rate (Michael Jordan’s career PPG) or keep scoring for a very long time (seasons and games played). The next sections test which of those describes LeBron.

4.2 Scoring by age

age_band <- others %>%
  group_by(age) %>%
  summarise(n = n(),
            median_ppg = median(pts, na.rm = TRUE),
            q25 = quantile(pts, 0.25, na.rm = TRUE),
            q75 = quantile(pts, 0.75, na.rm = TRUE),
            .groups = "drop") %>%
  filter(n >= 8)   # skip ages with very few comparison seasons

ggplot() +
  geom_line(data = age_band, aes(age, median_ppg), color = "grey40", linetype = "dashed") +
  geom_line(data = lebron_seasons, aes(age, pts), color = "purple", linewidth = 1.3) +
  geom_point(data = lebron_seasons, aes(age, pts), color = "purple", size = 2) +
  labs(title = "Points per game by age: LeBron vs. the other top-100 scorers",
       x = "Age during season", y = "Points per game", caption = "Source: Basketball-Reference.com (scraped)") +
  theme_minimal(base_size = 12)

This graphic demonstrates the comparison at each age between LeBron’s PPG and the median average PPG of the other top 100 scorers, as to eliminate those scores that may have been outliers.

4.3 PPG Post Age 33

late <- seasons %>%
  filter(age >= 33, !is.na(pts)) %>%
  mutate(group = if_else(player == "LeBron James", "LeBron", "Other top-100 scorers"))

late %>%
  group_by(group) %>%
  summarise(`Seasons` = n(), `Mean PPG` = round(mean(pts), 1),
            `Median PPG` = round(median(pts), 1)) %>%
  kable(caption = "Points per game at age 33 and older")
Points per game at age 33 and older
group Seasons Mean PPG Median PPG
LeBron 10 25.2 25.5
Other top-100 scorers 441 14.6 14.4

This takes a direct comparison between the Median and Mean PPG for LeBron and the other Top 100 Players respectively. Demonstrating how LeBron’s how performance so late into his career sets him apart from the others.

4.4 Sustained High Level Seasons

career %>%
  slice_max(seasons_25ppg, n = 12, with_ties = FALSE) %>%
  mutate(player = fct_reorder(player, seasons_25ppg)) %>%
  ggplot(aes(seasons_25ppg, player, fill = player == "LeBron James")) +
  geom_col() +
  geom_text(aes(label = seasons_25ppg), hjust = -0.2, size = 3.5) +
  scale_fill_manual(values = c(`TRUE` = "purple", `FALSE` = "grey"), guide = "none") +
  scale_x_continuous(expand = expansion(mult = c(0, 0.1))) +
  labs(title = "Seasons averaging 25+ points per game",
       subtitle = "Top 12 among the 100 highest career scorers",
       x = "Seasons", y = NULL,
       caption = "Source: Basketball-Reference.com (scraped)") +
  theme_minimal(base_size = 12)

A long career can be padded with lower-level seasons at the end. Counting only seasons at 25 or more points per game removes that padding and asks how many peak level scoring years each player had.

4.5 All Around Game

career %>%
  slice_max(seasons_25_7_7, n = 10, with_ties = FALSE) %>%
  mutate(player = fct_reorder(player, seasons_25_7_7)) %>%
  ggplot(aes(seasons_25_7_7, player, fill = player == "LeBron James")) +
  geom_col() +
  geom_text(aes(label = seasons_25_7_7), hjust = -0.2, size = 3.5) +
  scale_fill_manual(values = c(`TRUE` = "purple", `FALSE` = "grey"), guide = "none") +
  scale_x_continuous(expand = expansion(mult = c(0, 0.1))) +
  labs(title = "Seasons averaging 25+ points, 7+ rebounds and 7+ assists",
       subtitle = "Top 10 among the 100 highest career scorers",
       x = "Seasons", y = NULL,
       caption = "Source: Basketball-Reference.com (scraped)") +
  theme_minimal(base_size = 12)

Points are only one part of the case. This chart uses the rebound and assist columns to count seasons in which a player was a high level scorer, rebounder and passer at the same time.

Conclusion

The five expressions of the data presented through this document have done a quick job of demonstrating how LeBron puts himself apart from the other elite scorers in NBA history. He has been at a high level for much longer than the average players. With his passing and rebounding being at a level above everyone else for the entire time as well. Much more can go into the debate for who is the greatest player of all time but you can get a good start here.