Files
dolt/clients/pitchmap
Erik Arvidsson 6e369b85cd NomDL: Change command line to process all .noms files
The codegen.go command line utility now detects the package name from
the file that it was invoked from if `--package` was not provided.

It also processes all `.noms` files in the current directory in case
the `--in` flag was not provided.
2015-09-21 12:19:14 -04:00
..
2015-09-11 12:20:22 -07:00
2015-07-23 13:07:44 -07:00
2015-07-23 15:07:52 -07:00
2015-07-23 13:07:44 -07:00
2015-07-29 15:01:25 -07:00

pitchmap

This directory contains a pipeline of tools that combine to generate a heatmap of locations for major league baseball pitchers.

The source data comes from:

http://gd2.mlb.com/components/game/mlb/

To use:


npm install

mkdir /tmp/mlb_data

node fetch-urls.js --url="http://gd2.mlb.com/components/game/mlb/year_2015/month_05/day_07/" --print="gid.*pitcher.*xml$|gid.*inning_[0-9]*\.xml" --reject="\/year_[0-9]+\/pitchers\/|\/year_[0-9]+\/mobile\/|\/year_[0-9]+\/media\/|\/year_[0-9]+\/batters\/|\/premium\/|\/notifications\/|\/pitching_staff\/|\/media\/|\/batters\/|\/[^\/]+\.[^\/]+$" > /tmp/mlb_data/urls.txt

cd /tmp/mlb_data

wget -e robots=off -x -i urls.txt

<noms>/clients/xml_importer/xml_importer -fs=/tmp/mlb_data -ds=mlb/xml  gd2.mlb.com/

<noms>/clients/pitchmap/index/index -fs=/tmp/mlb_data -input-ds=mlb/xml -output-ds=mlb/heatmap