Browse files

license and README

  • Loading branch information...
1 parent 937c6c2 commit 3abcab65f801c6125ff15c77d9cab596b1510d02 Bryan Fink committed Jan 20, 2011
Showing with 51 additions and 0 deletions.
  1. +27 −0
  2. +24 −0 src/baseball.erl
@@ -0,0 +1,27 @@
+Computing Baseball Stats using Riak Map/Reduce
+* What is this?
+This project is primarily an example of using Riak
+( and luwak_mr
+( to compute baseball statistics.
+* How do I use it?
+First, grab the game event files by decade from the Retrosheet
+archive: Unzip them into
+usefully-named directories (e.g. "1950s").
+Setup Riak, then clone luwak_mr and this project, build them, and add
+them to Riak's code path.
+Load the Retrosheet data into Riak by attaching to the Riak console
+and using baseball:load_events(Directory), where Directory is the path
+to one of your unzipped archives (e.g. "/home/bryan/baseball/1950s").
+Compute the batting average for any player by attaching to the Riak
+console and using baseball:batting_average(File, PlayerID), where File
+is the last component of the path that you used in your load_events
+call (e.g. 1950s), and PlayerID is the 8-character identifier of any
+player (see the .ROS files in your unpacked archive, or the Retrosheet
+docs for information about player IDs).
@@ -1,3 +1,27 @@
+%% -------------------------------------------------------------------
+%% baseball: utilities for computing baseball stats on Riak
+%% This file is provided to you under the Apache License,
+%% Version 2.0 (the "License"); you may not use this file
+%% except in compliance with the License. You may obtain
+%% a copy of the License at
+%% Unless required by applicable law or agreed to in writing,
+%% software distributed under the License is distributed on an
+%% KIND, either express or implied. See the License for the
+%% specific language governing permissions and limitations
+%% under the License.
+%% -------------------------------------------------------------------
+%% @doc Compute baseball stats using Riak Map/Reduce.
+%% This module works with data from the Retrosheet archive
+%% ( to compute baseball statistics
+%% (currently only batting average).

0 comments on commit 3abcab6

Please sign in to comment.