Saberizing a Mac: Installing the Baseball Databank Database
Well, crew, I think we tackled the question raised in Part One pretty well. To summarize, here's how to get the necessary free software onto your Mac in order to work with databases:
- Download MAMP and install it.
- Download Sequel Pro and install it.
- Open MAMP and make sure the servers start.
- Open Sequel Pro.
- Type the login information from the web page opened by MAMP into the login screen of Sequel Pro, including the hostname, user, password, port and socket directory link.
- Admire your tech geek skills.
If you want to know some specifics about the programs you just installed, here you go: MAMP is actually three things -- a server, a MySQL database program, and a web-based interface all rolled into one (Mac-Apache-MySql-PHP). Sequel Pro is also different user-interface, but one that's a stand-alone application instead of a web interface, and has a Mac-style look to it (which is important to keeping up the image of Mac superiority.) Feel free to ask further questions in the comments and hopefully the pros will answer them.
The Next Step
Anyway, with our software ready to go, the next step is to grab some data. Let's start with the Baseball Databank, located here. The baseball databank has a lot of basic stats and biographical information. Colin's already written about how to get that going on a PC, and I'm guessing the steps are similar on a Mac. But feel free to share your successes and failures in the comments below.
To help give you some idea of where we're head after this, I was thinking of tackling some SQL coding basic using the examples Colin's already written about, letting people play around with creating some new queries for interesting projects and sharing them, then looking at getting a retrosheet database or a pitch f/x database up and running. (Note: due to size, informat format, and updating issues, being able to start using those databases productively will likely be much more complex than the BDB.)
0 recs |
17 comments
|
Comments
Another step in this process should be to add a csv of data to an existing dataset
Such as adding this Win Shares csv one to the databank dataset:
link
by Jeff Zimmerman (TucsonRoyal) on Jun 4, 2009 7:33 PM EDT reply actions 0 recs
OK, how do you do that?
if you’re using MAMP and Sequel Pro…
by RFK on Jun 5, 2009 6:53 PM EDT up reply actions 0 recs
That's a good question.
Anyone installed the BDB successfully yet? I haven’t tried…
Beyond the Boxscore // Calling BJ Upton lazy is lazy.
by Sky Kalkman on Jun 5, 2009 7:49 PM EDT up reply actions 0 recs
I did that part
…and it was pretty easy. I even did Colin’s exercises, including the pitching question at the end. Did you know that Slim Sallee has the 50th lowest career earned run average, minimum 1000 innings pitched?
by RFK on Jun 5, 2009 8:02 PM EDT up reply actions 0 recs
Okay the MAMP link died on me...
anyone else having trouble?
Decrease runs scored?
Maybe.
Decrease winning? Never seen that proven.
-SFTU
by hazel on Jun 5, 2009 11:08 PM EDT reply actions 0 recs
Weird, it's not loading right now.
Here’s the direct link to download it. Gotta love Firefox’s in-line search for URLs.
Beyond the Boxscore // Calling BJ Upton lazy is lazy.
by Sky Kalkman on Jun 5, 2009 11:48 PM EDT up reply actions 0 recs
that's for a pc
St. Louis Cardinals... defying win expectancy since 2008
by vivaelpujols on Jun 6, 2009 2:17 AM EDT up reply actions 0 recs
go here
St. Louis Cardinals... defying win expectancy since 2008
by vivaelpujols on Jun 6, 2009 2:38 AM EDT up reply actions 0 recs
The baseball-databank is a ZIP file, so it doesn't work for mac
Has anyone else got it up?
St. Louis Cardinals... defying win expectancy since 2008
by vivaelpujols on Jun 6, 2009 2:39 AM EDT reply actions 0 recs
just double-click on the ZIP file
or unzip it in some other way. It worked for me.
by RFK on Jun 6, 2009 2:45 AM EDT up reply actions 0 recs
Then how do you add it to Sequel
St. Louis Cardinals... defying win expectancy since 2008
by vivaelpujols on Jun 6, 2009 2:57 AM EDT up reply actions 0 recs
nevermind I got it thanks
St. Louis Cardinals... defying win expectancy since 2008
by vivaelpujols on Jun 6, 2009 3:16 AM EDT up reply actions 0 recs
Just for others' reference, .zip files unzip fine on a Mac. Pretty sure the appropriate software (stuffit) comes preinstalled.
Beyond the Boxscore // Calling BJ Upton lazy is lazy.
by Sky Kalkman on Jun 7, 2009 3:28 PM EDT up reply actions 0 recs
This is pretty cool
I downloaded the DBD and it’s very user friendly. I’ll have to work on writing queries, but I’m pretty sure my analysis capabilities just increased a ton.
St. Louis Cardinals... defying win expectancy since 2008
by vivaelpujols on Jun 6, 2009 4:39 AM EDT reply actions 0 recs
Notes as I do this:
Open up MAMP and Sequel Pro.
Sign in and save sign-in as “MAMP Default” in Sequel Pro.
Download .zip file of .sql file from Colin’s direct link.
Unzip (automatically) into a newly created folder called “Databases” within my baseball stuff.
Drop-down SPro menu: select “Add Database…”
Name it BDB and leave other choice as “Default”.
Under File, choose “Import…”
Navigate to Databases folder, select the .sql file and form the drop-down select “.sql”. This happened automatically, but the original default choice was .csv.
Wait for about 20 seconds as SPro imported.
Crack adult beverage.
Beyond the Boxscore // Calling BJ Upton lazy is lazy.
by Sky Kalkman on Jun 7, 2009 3:38 PM EDT reply actions 0 recs
This might be self-evident, or maybe not, to database newbies:
At the top of SPro, there are three views. Structure view tells you about each table in the database; ignore this for now. Content will show you the actual data in each table, which is only mildly interesting on its own. Query view lets you write SQL code which lets you retrieve data from the database in the way you want to see it, either by performing calculations on the data in one table, or by combining data from multiple tables using links between tables.
Beyond the Boxscore // Calling BJ Upton lazy is lazy.
by Sky Kalkman on Jun 7, 2009 5:27 PM EDT up reply actions 0 recs

by 













BtB on Facebook














