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.
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.
7 comments
|
0 recs |
Do you like this story?
Comments
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.
- .-. ..- … – / – …. . / .—. .-. - .. . … …
BTW, the .sql my brother puts out is updated daily during the season.
- .-. ..- … – / – …. . / .—. .-. - .. . … …
by Jeff Zimmerman on Dec 21, 2010 9:15 PM EST up 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.
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.
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 



























