Navigation: Jump to content areas:


Pro Quality. Fan Perspective.
Login-facebook
Around SBN: Blake Griffin Slam Dunks: NBA Jam Style

Pitch f/x database on Mac?

For a while I've been attempting to construct a pitch f/x database on a Mac with a lack of success, though I've gotten fairly close.  I was wondering if anyone here would be able to help.

Star-divide

I've been able to set up a SQL database using MAMP and Sequel Pro (following this).

I've been able to use a Perl script to download all of the xml files (following the instructions from here, but using the scripts found here).

My problem, however, comes from attempting to parse the data and input it into the database.  I've tried two different scripts, one from Mike Fast (found here), and one from Darrel Zimmerman (here).  Both run into problems with the package DBD:mysql(PP).  DBI is fairly straightforward to install, but I haven't been able to get DBD:mysql(PP) running.

I've attempted to manually install DBD:mysql using instructions from here, but that also resulted in error messages when attempting to run the script.  Unfortunately, here I'm done.  I don't have the technical knowledge to figure any of this out, or to see if there's a workaround.  I have an inkling that there's a workaround that uses XML::simple instead of DBD:mysql, but have no idea how that would work.  If anyone could help, that would be amazing.  Thanks.

For reference:
Instructions for setting up database: http://www.beyondtheboxscore.com/2009/6/4/898762/saberizing-a-mac-installing-the
Script for downloading data: http://www.wantlinux.net/category/baseball-data/
Instructions/discussion for pitch f/x: http://www.beyondtheboxscore.com/2009/8/19/994666/saberizing-a-mac-4-pitch-f-x
Mike Fast parsing script: http://codepaste.net/gjbeyv
ZImmerman parsing script: http://www.wantlinux.net/category/baseball-data/
DBD:mysql/MAMP install instructions: http://forum.mamp.info/viewtopic.php?f=2&t=1204

And I know that there are some ways to directly download the data, including Zimmerman's SQL dump and Hermsmeyer's rotobase tool.  I do know, however, know of any that can update on a daily basis, which is what I'd ideally want to be able to do.

Comment 7 comments  |  0 recs  | 

Do you like this story?

Comments

Display:

My brother does all in Linux which said work on the Mac, but I know he has changed it a bit

I will let him know of the question and see if he can respond.

- .-. ..- … – / – …. . / .—. .-. - .. . … …

by Jeff Zimmerman on Dec 21, 2010 9:14 PM EST reply actions  

Thanks.

And I thought the sql might be updated daily, but it would be nice to have a somewhat more elegant solution than redownloading the entire data for the year whenever I need the most recent start or something. Though if there isn’t a solution, I would probably just use that.

by ThePanda on Dec 21, 2010 9:25 PM EST up reply actions  

I will see if I can get him to help you out though

- .-. ..- … – / – …. . / .—. .-. - .. . … …

by Jeff Zimmerman on Dec 21, 2010 11:18 PM EST up reply actions  

My guess as to your DBI mysql issue

I think your perl installer i.e. Makefile.pl doesn’t know where the mysql libraries are on the mac. You could try " perl -MCPAN -e ‘install Bundle::DBI’ " As far as daily sql output. I will look into writing a script for a weekly output for next season.

by Darrell Zimmerman on Dec 22, 2010 9:12 AM EST up reply actions  

I use a PC, but I can't see why this wouldn't work for Macs

I use an R Script to download the data. Actually, the site where I got the script from appears to have been taken down, sadly.

by garik16 on Dec 22, 2010 12:47 AM EST reply actions  

Never read this article before

But it might help

http://www.beyondtheboxscore.com/2009/8/19/994666/saberizing-a-mac-4-pitch-f-x

"The WAR folks like yunel apparently. i know this, bobby cox hated going to war with this guy." - Jon Heyman

Beyond the Box Score / Capitol Avenue Club / shwitter: @CapitolAvenue

by PWHjort on Dec 25, 2010 9:35 PM EST reply actions  

Comments For This Post Are Closed


User Tools

We use numbers and stuff.
Community Guidelines
Why be a member?

Follow us on Facebook!

Follow us on Twitter!

SaberGraphics

Yahoo_full_count

MLB Daily Dish

Get the latest MLB Trade Rumors, Transactions, and News at MLB Daily Dish!


Managing Editor:

Jbopp-kc_small Justin Bopp

Columnists:

Adam_small adarowski

Dme_small Satchel Price

Closeup4_small J-Doug

Carlosicon_small Julian Levine

Billy_and_daddy_4th_of_july_small Bill Petti

Featuring:

Dayton_small Jeff Zimmerman

12475953_small Jacob Peterson

Recent_pic_pg_small Patrick Gordon

Btbpro_small Dave Gershman

Me_small Bryan Grosnick

229331_10150183361996591_674441590_6760167_6637860_n3_small Lewie Pollis

Img_3830_small David Fung

30472_1481067225243_1190689185_1381415_997334_n_small Glenn DuPaul

1mnvxku7_small joshuaworn

Set_small MattFilippi18

Photo0011_small Nathaniel Stoltz