The Effect of Weather on Team Performance – MLB 2016



May 1, 2020

My dataset that I will be working with is from kaggle at this link.

This dataset includes data from every single Major League Baseball game played during the 2016 season. It includes categories such as home team, away team, venue, attendance, and even weather.

For this project, I will be exploring the question:

How does weather affect team performance?

Team Records – 2016

TeamWLGWin %
Arizona Diamondbacks69931620.425926
Atlanta Braves68931610.422360
Baltimore Orioles89741630.546012
Boston Red Sox93721650.563636
Chicago Cubs114641780.640449
Chicago White Sox78841620.481481
Cincinnati Reds68941620.419753
Cleveland Indians104721760.590909
Colorado Rockies75871620.462963
Detroit Tigers86751610.534161
Houston Astros84781620.518519
Kansas City Royals81811620.500000
Los Angeles Angels of Anaheim74881620.456790
Los Angeles Dodgers96771730.554913
Miami Marlins79821610.490683
Milwaukee Brewers73891620.450617
Minnesota Twins591031620.364198
New York Mets87761630.533742
New York Yankees84781620.518519
Oakland Athletics69931620.425926
Philadelphia Phillies71911620.438272
Pittsburgh Pirates78831610.484472
San Diego Padres68941620.419753
San Francisco Giants89781670.532934
Seattle Mariners86761620.530864
St. Louis Cardinals86761620.530864
Tampa Bay Rays68941620.419753
Texas Rangers95701650.575758
Toronto Blue Jays94771710.549708
Washington Nationals97701670.580838

This table shows each team with their respective amount of wins and losses. It seems a bit weird that most teams have 162 games, yet some teams have more, like the Chicago Cubs with 178. This is because the Cubs played in the playoffs while other teams didn’t quite make it so far. Since playoff games were still games in 2016, I decided to keep them in the dataset.

I also added win percentage, which is the great equalizer between teams that played only 162 times and teams that played much more. This will help out a lot more later when it comes to comparing different teams and different weather.

I haven’t touched on the weather yet, but being able to create a table like this is essential to the analysis, as one will be created for each weather type.

This dataset has columns for a few different aspects to weather, but I’m only going to choose one. Instead of choosing sky conditions or wind speed I will choose temperature. This is mainly because for sky conditions there isn’t enough data for rainy games, and a lot of games are listed as unknown.

For temperature, I am going to split the data up into four categories, mostly based off what I feel is a fair description of weather. (Baseball is played April through October, so while 60 isn’t really cold, it’s colder in comparison to summer)

Cold : 60 and below
Pleasant : 61-72 degrees
Warm : 73-81 degrees
Hot : 82 and above

While these ranges aren’t really the nicest looking, they provide a slightly more even spread.

This cell here shows the game distribution for each of the four weather types. As you can see they aren’t the most even, but the sample size should be large enough to pull meaningful data for each.

Wins By Weather


TeamWLGWin %
Arizona Diamondbacks1120.500
Atlanta Braves67130.462
Baltimore Orioles168240.667
Boston Red Sox1613290.552
Chicago Cubs2011310.645
Chicago White Sox99180.500
Cincinnati Reds912210.429
Cleveland Indians1917360.528
Colorado Rockies1310230.565
Detroit Tigers129210.571
Houston Astros4590.444
Kansas City Royals37100.300
Los Angeles Angels of Anaheim3140.750
Los Angeles Dodgers1450.200
Miami Marlins3580.375
Milwaukee Brewers2680.250
Minnesota Twins716230.304
New York Mets1014240.417
New York Yankees1014240.417
Oakland Athletics88160.500
Philadelphia Phillies119200.550
Pittsburgh Pirates98170.529
San Diego Padres612180.333
San Francisco Giants2416400.600
Seattle Mariners1111220.500
St. Louis Cardinals55100.500
Tampa Bay Rays2460.333
Texas Rangers2460.333
Toronto Blue Jays74110.636
Washington Nationals76130.538


TeamWLGWin %
Arizona Diamondbacks1318310.419
Atlanta Braves821290.276
Baltimore Orioles3125560.554
Boston Red Sox3124550.564
Chicago Cubs3119500.620
Chicago White Sox2518430.581
Cincinnati Reds1224360.333
Cleveland Indians2516410.610
Colorado Rockies1527420.357
Detroit Tigers2426500.480
Houston Astros1316290.448
Kansas City Royals2421450.533
Los Angeles Angels of Anaheim3032620.484
Los Angeles Dodgers4035750.533
Miami Marlins1714310.548
Milwaukee Brewers2627530.491
Minnesota Twins1832500.360
New York Mets2412360.667
New York Yankees2022420.476
Oakland Athletics3855930.409
Philadelphia Phillies1716330.515
Pittsburgh Pirates1919380.500
San Diego Padres2835630.444
San Francisco Giants3833710.535
Seattle Mariners4628740.622
St. Louis Cardinals2418420.571
Tampa Bay Rays52611130.460
Texas Rangers2022420.476
Toronto Blue Jays4242840.500
Washington Nationals2518430.581


TeamWLGWin %
Arizona Diamondbacks3253850.376
Atlanta Braves2426500.480
Baltimore Orioles2223450.489
Boston Red Sox2922510.569
Chicago Cubs4522670.672
Chicago White Sox2534590.424
Cincinnati Reds2937660.439
Cleveland Indians3918570.684
Colorado Rockies1422360.389
Detroit Tigers3025550.545
Houston Astros5247990.525
Kansas City Royals3229610.525
Los Angeles Angels of Anaheim2237590.373
Los Angeles Dodgers3622580.621
Miami Marlins4651970.474
Milwaukee Brewers2939680.426
Minnesota Twins2541660.379
New York Mets3127580.534
New York Yankees3518530.660
Oakland Athletics1122330.333
Philadelphia Phillies2431550.436
Pittsburgh Pirates3135660.470
San Diego Padres2523480.521
San Francisco Giants1921400.475
Seattle Mariners2024440.455
St. Louis Cardinals2727540.500
Tampa Bay Rays1019290.345
Texas Rangers3019490.612
Toronto Blue Jays2919480.604
Washington Nationals3323560.589


TeamWLGWin %
Arizona Diamondbacks2321440.523
Atlanta Braves3039690.435
Baltimore Orioles2018380.526
Boston Red Sox1713300.567
Chicago Cubs1812300.600
Chicago White Sox1923420.452
Cincinnati Reds1821390.462
Cleveland Indians2121420.500
Colorado Rockies3328610.541
Detroit Tigers2015350.571
Houston Astros1510250.600
Kansas City Royals2224460.478
Los Angeles Angels of Anaheim1918370.514
Los Angeles Dodgers1916350.543
Miami Marlins1312250.520
Milwaukee Brewers1617330.485
Minnesota Twins914230.391
New York Mets2223450.489
New York Yankees1924430.442
Oakland Athletics128200.600
Philadelphia Phillies1935540.352
Pittsburgh Pirates1921400.475
San Diego Padres924330.273
San Francisco Giants88160.500
Seattle Mariners913220.409
St. Louis Cardinals3026560.536
Tampa Bay Rays410140.286
Texas Rangers4325680.632
Toronto Blue Jays1612280.571
Washington Nationals3223550.582

Now let’s combine those tables into bar graphs that show how each team performs in different weather.

A few conclusions we can draw are:

  1. Atlanta Braves played much worse in pleasant weather than other conditions.
  2. Texas Rangers played better as the temperature got higher
  3. Kansas City Royals and Texas Rangers played worse in cold weather than other conditions, but not at all bad as the Los Angeles Dodgers did

However, these graphs aren’t the very best ways of comparing from team to team. For that, I’m going to compare ratios. Now I will do bar graphs, but for how well a team performed in one certain weather compared to their overall win percentage.

These graphs do a better job of comparing from team to team. Since I used ratios, these graphs aren’t skewed by teams having a higher or lower total winning percentage; it is all relative. Based off these graphs, we can conclude:

  1. The Los Angeles Dodgers played terribly in the cold while their LA counterpart, the Los Angeles Angels of Anaheim played amazing. These ratios might be more extreme due to too small of a sample size, as the Dodgers only played five games in the cold while the Angels only played four. The Philadelphia Phillies might be a safer bet as the best team in the cold, as they played 20 games. Sample size is only an issue for cold games, as overall there were less cold games than other weather types
  2. The Atlanta Braves did not play well at all in pleasant weather, while the New York Mets and Chicago White Sox played great.
  3. The Oakland Athletics played the worst in warm weather, while the New York Yankees and San Diego Padres played the best.
  4. This one is interesting. The San Diego Padres, who played the best in warm weather, played poorly in hot weather. Also playing poorly was the dome team Tampa Bay Rays, who may not have been so used to the sun. The Oakland Athletics, who didn’t play well in warm games, played the best in hot games. What a difference a few degrees could make.

We should also note that any team with a ratio greater than one played better in that weather than average, while ratios less than one played worse. From now on I’ll refer to these as “good ratios” and “bad ratios”.

For cold weather, the northeast coast teams from Philadelphia and Baltimore are towards the very top. Other teams from colder climates with good ratios are Toronto and San Francisco (San Francisco may not be generally thought of as a cold climate but they played 32 home games in cold conditions, more than any other team (second was Chicago Cubs with 21, which included many playoff games)). The worst team is the Los Angeles Dodgers, who play in warm and sunny Los Angeles. Other teams from warmer climates with bad ratios are Miami and Texas. Indoor teams with bad ratios are Tampa Bay and Milwaukee.

For pleasant weather, again, northeast coast teams New York Mets and Philadelphia are really high on the list, while teams from hot climates, Texas (Arlington) and Houston, have bad ratios. However, Miami has a hot climate and they have a good ratio.

For warm weather, warm climate teams like San Diego, Los Angeles Dodgers, and Atlanta have good ratios. However the Los Angeles Angels didn’t perform so well. The problem with warm and pleasant weather is that these conditions aren’t really extreme and during the spring and summer every city experiences many days with these conditions. Hot weather, however, isn’t quite the same way.

For hot weather, the hot climate teams like Arizona, Houston, and Texas all have good ratios. (I’ve been to a Texas Rangers game in Arlington, TX, and I can confirm it was indeed, very, very hot and sunny. I can’t say the same about the Chicago games I’ve been to.) The worst three teams are all from not-hot climates. San Diego is very far south, but it rarely gets up to temperatures that I listed as ‘hot’ (Stay classy, San Diego). Seattle is not hot, being in the rainy pacific northwest. Tampa Bay has hot weather, but their team plays in a temperature regulated dome where none of the games are listed as ‘hot’.

Overall, this was a fun little project on how different teams performed in different temperatures. A possible cause for why teams played better is based off of where they play their home games. For each condition, we notice that the best teams typically have home ballparks with a similar climate.

Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *