Beyond the Box Score: An SB Nation Community

Navigation: Jump to content areas:


Pro Quality. Fan Perspective.
Around SBN: Defend That, Digger! The Overrated/underrated edition

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.)

0 recs  |  Comment 17 comments |

Story-email Email Printer Print

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   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

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

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   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

Comments For This Post Are Closed


User Tools

We use numbers and stuff.
Community Guidelines
Why be a member?
Start posting on Beyond the Box Score »

Join SB Nation and dive into communities focused on all your favorite teams.

FanPosts

Community blog posts and discussion.

Recommended FanPosts

770insig_small
BtB's "Ball On A Budget" Fantasy League - Discuss Participants, Payrolls and Position Eligibility

Recent FanPosts

Ds9_small
good graphing program?
Small
Predicting HR/FB Rates
Leopold_butter_scotch_southpark_small
Troy Tulowitzki vs Ryan Braun
Small
Pitchers batted ball observations
Small
Eric Byrnes: A player worth a look?
Small
Valverde Is Charging Detroit Double
Mukuro_small
Another question: About power rankings
Small
Why You Shouldn't Trade for Arroyo
Jinaz-reds-avatar_small
Last Call for BtB Sabermetric Writing Award Nominations

+ New FanPost All FanPosts >

FanShots

Quick hits of video, photos, quotes, chats, links and lists that you find around the web.

Recent FanShots

If you care about newspaper coverage of MLB, read this post
Visualizing the Difference Between Offensive and Defensive Value for Catchers
First B-Pro and now ESPN. Tommy, you're growing up so fast
THT - Advancing by ground
Negro League Museum Close to Folding
It is a capital mistake to theorize before one has data. Insensibly one...
Ranking Minor League Systems Using Victors Wang's Prospect Valuations
Pitch f/x on Ricky Nolasco Stretch vs. Windup again
Veron Wells the artist.  I never knew.

http://www.vwellsart.com/
A Dream Team... in honor of Dr. King

+ New FanShot All FanShots >

BtB on Twitter

Main Feed: @BtBScore

Jeff: @jeffwzimmerman
Steve: @steve_sommer
Sky: @BtB_Sky
Dan: @dturkenk
Harry: @harrypav
Jinaz: @jinazreds
Jack: @jh_moore
Erik: @Erik_Manning
Tommy R: @trancel
Justin: @justinbopp

Subscribe to BtB via Email

Enter your email address:

Delivered by FeedBurner

Most Commented

BtB Goes Social


Managers

Wbc_029_small Jeff Sullivan

Editors

Rawlings_baseball_bigger_small Dan Turkenkopf

Limes_125_small Sky Kalkman

770insig_small Jeff Zimmerman (TucsonRoyal)

Aviles_small Justin Bopp

Authors

Roots_game_small R.J. Anderson

Jinaz-reds-avatar_small JinAZ

Face_small Harry Pavlidis

1753738656_110919ebe9_o_small vivaelpujols

Ozzie_small erik

Raysring1_small Tommy Rancel

Redcap_small SFiercex4

St_louis_cardinals_ce1141_003263_small stevesommer05

Paige_small Satchel Price