Navigation: Jump to content areas:


Pro Quality. Fan Perspective.
Login-facebook
Around SBN: Tiger Woods Makes His 2012 PGA Tour Debut

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:

  1. Download MAMP and install it.
  2. Download Sequel Pro and install it.
  3. Open MAMP and make sure the servers start.
  4. Open Sequel Pro.
  5. 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.
  6. 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.)

Comment 17 comments  |  0 recs  | 

Do you like this story?

Comments

Display:

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  

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  

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  

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  

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  

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  

go here

St. Louis Cardinals... defying win expectancy since 2008

by vivaelpujols on Jun 6, 2009 2:38 AM EDT up reply actions  

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  

I should note:

Part II of the tutorial is here.

More sample code available here. And I have a lot of available sample code on my hard drive that I can try to clean up and present, so if you have any requests let me know.

by cwyers on Jun 6, 2009 2:16 PM EDT reply actions  

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  

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  

Comments For This Post Are Closed


User Tools

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

FanPosts

Community blog posts and discussion.

Recent FanPosts

Small
Context Neutral Run and RBI projections
Small
Free Agent Compensation
Img_0001_small
Value of Various Plate Approaches
Strike_three2_small
Effect of Foul Area on Strikeouts: AL 1954-68: Erratum
Small
Baseball on a stick
Small
Player Evaluating Statistic
Baseball_small
Rays Outfield: Cheap but Extremely Productive
Small
A new xBABIP
Small
Jack Morris "pitching to the score"
Strike_three2_small
Foul Area and Differences in SO: AL vs NL

+ New FanPost All FanPosts >

Follow us on Facebook!

Follow us on Twitter!

SaberGraphics

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

Picture-6_small Chris St. John

Btbpro_small Dave Gershman

229331_10150183361996591_674441590_6760167_6637860_n3_small Lewie Pollis

Img_3830_small David Fung