<jupyter_start><jupyter_text>Strikeouts on the Rise: Using pybaseball to Explore Historical Team Pitching Performance[This NY Times piece](http://www.nytimes.com/interactive/2013/03/29/sports/baseball/Strikeouts-Are-Still-Soaring.html) from 2013 showed that strikeouts are on the rise in Major League Baseball. In a simple infographic, it shows the gradual increase over time in strikeouts per game from 1900 to 2012. This is a brief example of how you can use pybaseball to replicate this graphic and answer other historical questions about team-level baseball statistics.<jupyter_code>from pybaseball import team_pitching
import matplotlib.pyplot as plt
%matplotlib inline
#collect historic team pitching data from pybaseball
pitching_data = team_pitching(1900,2016)
#a quick look at the data
print("data shape: {}").format(pitching_data.shape)

print(pitching_data.head())
# some summary stats
pitching_data.describe()
# get league-average SO/game by year
league_average = pitching_data.groupby('Season', as_index=False)['K/9'].mean()
# plot avg. SO/game over time
plt.scatter(pitching_data['Season'], pitching_data['K/9'])
plt.plot(league_average['Season'], league_average['K/9'], c='red')
plt.xlim(1900,2016)
plt.ylim(2,10)
plt.xlabel('Season')
plt.ylabel('Average Strikeouts per Game')
plt.title('Strikeouts per Game over Time');<jupyter_output>/Library/Python/2.7/site-packages/matplotlib-override/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors == str('face'):
{'fraction_non_alphanumeric': 0.10131332082551595, 'fraction_numerical': 0.029393370856785492, 'mean_word_length': 6.547169811320755, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '596064', 'license': 'MIT', 'n_tokens_mistral': 537, 'n_tokens_neox': 469, 'n_words': 151, 'path': 'EXAMPLES/strikeouts_on_the_rise.ipynb', 'repo_name': 'elliota43/pybaseball', 'size': '1599'}