home / pelican

content

1 row where published_date = "2016-11-21"

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: published_date (date)

slug ▼ author category content published_date summary title url
pitching-stats-and-python ryan technology I'm an avid [Twitter](https://www.twitter.com) user, mostly as a replacement [RSS](https://en.wikipedia.org/wiki/RSS) feeder, but also because I can't stand [Facebook](https://www.facebook.com) and this allows me to learn about really important world events when I need to and to just stay isolated with [my head in the sand](http://gerdleonhard.typepad.com/.a/6a00d8341c59be53ef013488b614d8970c-800wi) when I don't. It's perfect for me. One of the people I follow on [Twitter](https://twitter.com/drdrang) is [Dr. Drang](http://www.leancrew.com/all-this/) who is an Engineer of some kind by training. He also appears to be a fan of baseball and posted an [analysis of Jake Arrieata's pitching](http://leancrew.com/all-this/2016/09/jake-arrieta- and-python/) over the course of the 2016 MLB season (through September 22 at least). When I first read it I hadn't done too much with Python, and while I found the results interesting, I wasn't sure what any of the code was doing (not really anyway). Since I had just spent the last couple of days learning more about `BeautifulSoup` specifically and `Python` in general I thought I'd try to do two things: 1. Update the data used by Dr. Drang 2. Try to generalize it for any pitcher Dr. Drang uses a flat csv file for his analysis and I wanted to use `BeautifulSoup` to scrape the data from [ESPN](https://www.espn.com) directly. OK, I know how to do that (sort of ¯\ _(ツ)_ /¯) First things first, import your libraries: import pandas as pd from functools import partial import requests import re from bs4 import BeautifulSoup import matplotlib.pyplot as plt from datetime import datetime, date from time import strptime The next two lines I ~~stole~~ borrowed directly from Dr. Drang's post. The first line is to force the plot output to be inline with the code entered in the terminal. The second he explains as such: > > The odd ones are the `rcParams` call, which makes the inline graphs bigger > than the tiny Jupyter default, and the … 2016-11-21 I'm an avid [Twitter](https://www.twitter.com) user, mostly as a replacement [RSS](https://en.wikipedia.org/wiki/RSS) feeder, but also because I can't stand [Facebook](https://www.facebook.com) and this allows me to learn about really important world events when I need to and to just stay isolated with [my head in the sand](http://gerdleonhard.typepad.com/.a/6a00d8341c59be53ef013488b614d8970c-800wi) when I don't. It's perfect for … Pitching Stats and Python https://www.ryancheley.com/2016/11/21/pitching-stats-and-python/

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [content] (
   [author] TEXT,
   [category] TEXT,
   [content] TEXT,
   [published_date] TEXT,
   [slug] TEXT PRIMARY KEY,
   [summary] TEXT,
   [title] TEXT,
   [url] TEXT
);
Powered by Datasette · Queries took 22.663ms