Lahman from R
library(Lahman)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.2 ✔ tibble 3.3.0
## ✔ lubridate 1.9.4 ✔ tidyr 1.3.1
## ✔ purrr 1.1.0
## ── 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
Teams |>
slice_tail(n = 3)
## yearID lgID teamID franchID divID Rank G Ghome W L DivWin WCWin LgWin
## 1 2023 NL SFN SFG W 4 162 81 79 83 N N N
## 2 2023 NL SLN STL C 5 162 81 71 91 N N N
## 3 2023 NL WAS WSN E 5 162 81 71 91 N N N
## WSWin R AB H X2B X3B HR BB SO SB CS HBP SF RA ER ERA CG SHO SV
## 1 N 674 5412 1271 256 13 174 544 1492 57 16 81 39 719 641 4.02 4 2 50
## 2 N 719 5510 1376 264 12 209 570 1326 101 29 70 37 829 760 4.79 0 0 36
## 3 N 700 5522 1401 279 26 151 423 1149 127 29 78 38 845 797 5.02 0 0 42
## IPouts HA HRA BBA SOA E DP FP name park
## 1 4304 1395 173 403 1359 117 399 0.981 San Francisco Giants AT&T Park
## 2 4285 1549 179 530 1215 67 431 0.989 St. Louis Cardinals Busch Stadium III
## 3 4285 1512 245 592 1225 90 430 0.985 Washington Nationals Nationals Park
## attendance BPF PPF teamIDBR teamIDlahman45 teamIDretro
## 1 2500153 96 96 SFG SFN SFN
## 2 3241091 99 99 STL SLN SLN
## 3 1865832 96 98 WSN MON WAS