Parks table
Parks.Rd
Name and location data for baseball stadiums.
Usage
data(Parks)
Format
A data frame with 260 observations on the following 6 variables.
park.key
unique identifier for each ballpark
park.name
the name of the ballpark
park.alias
a semicolon delimited list of other names for the ballpark if they exist
city
city where the ballpark is located
state
state where the ballpark is located
country
country where the ballpark is located
Details
This dataset apparently includes all ballparks that were ever used in baseball. There is no indication of the years they were used, nor the teams that played there.
The ballparks can be associated with teams through the park
variable in the
Teams
table.
Source
Lahman, S. (2024) Lahman's Baseball Database, 1871-2023, 2023 version, http://www.seanlahman.com/
Examples
data(Parks)
library(dplyr)
# how many parks in each country?
table(Parks$country)
#>
#> AU CA JP MX PR UK US
#> 1 4 1 2 1 1 250
# how many parks in each US state?
Parks %>%
filter(country=="US") %>%
count(state, sort=TRUE)
#> state n
#> 1 NY 41
#> 2 OH 33
#> 3 PA 24
#> 4 MO 16
#> 5 IL 12
#> 6 MA 12
#> 7 DC 11
#> 8 MD 11
#> 9 CA 10
#> 10 NJ 10
#> 11 IN 9
#> 12 KY 6
#> 13 MI 6
#> 14 TX 6
#> 15 WI 6
#> 16 CT 5
#> 17 FL 5
#> 18 MN 4
#> 19 GA 3
#> 20 RI 3
#> 21 WA 3
#> 22 CO 2
#> 23 DE 2
#> 24 IA 2
#> 25 VA 2
#> 26 AZ 1
#> 27 HI 1
#> 28 NC 1
#> 29 NE 1
#> 30 NV 1
#> 31 WV 1
# ballparks in NYC
Parks %>%
filter(state=="NY") %>%
filter(city %in% c("New York", "Brooklyn", "Queens"))
#> park.alias park.key park.name
#> 1 <NA> NYC01 Union Grounds
#> 2 <NA> NYC02 Capitoline Grounds
#> 3 <NA> NYC03 Polo Grounds I (Southeast Diamond)
#> 4 <NA> NYC04 Polo Grounds II (Southwest Diamond)
#> 5 <NA> NYC05 Washington Park I
#> 6 <NA> NYC06 Metropolitan Park
#> 7 Ridgewood Park I NYC07 Grauer's Ridgewood Park
#> 8 <NA> NYC08 Washington Park II
#> 9 <NA> NYC09 Polo Grounds III
#> 10 <NA> NYC10 Polo Grounds IV
#> 11 <NA> NYC11 Eastern Park
#> 12 <NA> NYC12 Washington Park III
#> 13 <NA> NYC13 Hilltop Park
#> 14 <NA> NYC14 Polo Grounds V
#> 15 <NA> NYC15 Ebbets Field
#> 16 <NA> NYC16 Yankee Stadium I
#> 17 William A. Shea Stadium NYC17 Shea Stadium
#> 18 Ridgewood Park II NYC18 Wallace's Ridgewood Park
#> 19 <NA> NYC19 Washington Park IV
#> 20 <NA> NYC20 Citi Field
#> 21 <NA> NYC21 Yankee Stadium II
#> 22 <NA> SAI01 St. George Cricket Grounds
#> city state country
#> 1 Brooklyn NY US
#> 2 Brooklyn NY US
#> 3 New York NY US
#> 4 New York NY US
#> 5 Brooklyn NY US
#> 6 New York NY US
#> 7 Queens NY US
#> 8 Brooklyn NY US
#> 9 New York NY US
#> 10 New York NY US
#> 11 Brooklyn NY US
#> 12 Brooklyn NY US
#> 13 New York NY US
#> 14 New York NY US
#> 15 Brooklyn NY US
#> 16 New York NY US
#> 17 New York NY US
#> 18 Queens NY US
#> 19 Brooklyn NY US
#> 20 New York NY US
#> 21 New York NY US
#> 22 New York NY US
# ballparks in Canada
Parks %>%
filter(country=="CA") %>%
count(state, sort=TRUE)
#> state n
#> 1 ON 2
#> 2 QC 2
# what are the Canadian parks?
Parks %>%
dplyr::filter(country=="CA")
#> park.alias park.key park.name city state country
#> 1 Jarry Park MON01 Parc Jarry Montreal QC CA
#> 2 Olympic Stadium MON02 Stade Olympique Montreal QC CA
#> 3 <NA> TOR01 Exhibition Stadium Toronto ON CA
#> 4 Skydome TOR02 Rogers Centre Toronto ON CA