Beyond the Box Score: An SB Nation Community

Navigation: Jump to content areas:


Pro Quality. Fan Perspective.
Login-facebook
New Blog: Voodoo Five for South Florida Bulls Fans!

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.

Connect_with_facebook

Cbs_fantasy_baseball_promo

FanPosts

Community blog posts and discussion.

Recommended FanPosts

Picture-2_small
Advanced Graphing Techniques Part 4 - Cluster Analysis in R

Recent FanPosts

Small
SB Nation Survey + Chance to donate $500 to a charity of this community's choice
Small
Spring Training Statistics?
Patrick_willis_small
WAR Fantasy draft
Small
Is It No Longer Sonny In Tampa?
Limes_125_small
Help With 32 Questions Contest
Otto_-_image_adjusted_small
Good reasons for getting past the divided leagues era
Small
Nathan's Replacement
Rays_small
Chasing the Grail, Part Two
Rays_small
Chasing Sabermetric’s Holy Grail or, Another Stab at Estimating Catcher Defense

+ New FanPost All FanPosts >

FanShots

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

Recent FanShots

Optimizing the Phillies and Yankees Lineups
Join BtB's Last Minute March Madness Pool
Dave Allen did this with home runs. I thought this might look cool for certain pitchers who had pinpoint command.
Irish Ballplayers -- Seems appropriate for today
Simpson's Paradox, Bert vs. Jack, and more sweet B-Ref splits

I've played fantasy baseball for many years. (My first team's rotation featured rookies Jason Bere and Aaron Sele.  Jay Buhner and Mo Vaughn anchored my lineup.) But I haven't played it well since 2003 or 2004.  My excuse?  Kids.

No, it's not that I fill my rosters with unproven youngsters.  It's that my wife and I have too many.  Too many to allow me the time necessary to have success in a competitive fantasy baseball league.

I've thought about hanging up my fantasy spikes but I really like playing it -not to win necessarily- but really just to keep an eye on good and great players from around baseball.  Players  like Adrian Gonzalez or Josh Johnson who of course come up on the each team's schedule sporadically throughout the summer but then seemingly disappear.  I like knowing about those guys and I like being able to talk to other baseball fans about those guys.  So I play fantasy baseball.  And I'm gonna continue to play.

...As long as at least two or three of you folks wanna join the rest of us in my new league: S(a.N.D)B.O.K.X. Fantasy Baseball.

The SAND is the tautologically redundant part of the acronym: Simple (and Not Difficult)

The BOKX explains just how simple (and not difficult) this league's scoring system will be: Based Only on Ks (strikeouts) and Xs (extra base hits).

* * * This league's scoring system has two only statistics: strikeouts and extra-base hits.* * *

Hopefully, this keeps things simple (and not difficult) and will thus require only a few minutes each week to seek out good hitters and good pitchers to replace not-quite-as-good pitchers and not-quite-as-good hitters.  (And hopefully, I'll have Ryan Howard on my team.)

We'll probably use only players from the National League and  unless things change for some reason, it'll be a points league. It's gonna be on Yahoo! so it'll be free and unless things change for some reason, we'll just be playing for bragging rights (and something to do).

I've had some help from Red Reporter's sabermetric higher-ups and I think I know how to weight things so that the NL's good, better and best strikeout pitchers are going to be worth roughly what the NL's good, better and best sluggers will be worth on draft day.  But I've never seen or heard of a league like this so I don't know quite what to expect and if anybody can think of any reason that this format might go beyond just being quirky and we'll like end up ripping a hole in the space/time continuum, help us out, eh?

So, if you wanna play and/or if you have any questions, let me know below.

We had the draft set for Wednesday, March 31st at 8:30pm EST.  But I'm almost certain that we're going to change that date. I think we'll need to settle on a date and a time and I think we'll need to do it sooner rather than later so as soon as we can get our ninth and tenth owners we'll restart that conversation.

I'm gonna go ahead and post an email address so that if there are any lurkers who wanna play they don't necessarily have to create an SBNation account in order to do so.  Just let me know what you're thinking: SANDBOKX.at.Gmail
Why Nathan's loss won't kill the Twins - ESPN TMI Blog
The Book -- Predicting the HR leader board
Spring Training Pitch FX Data
The All-CHONE Team

+ 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

Paige_small
Something Ludicrous? Dontrelle as Detroit's Fifth Starter
Paige_small
xFIP Doesn't Think K-Rod is Getting Better
Paige_small
Using BP's "Star System" to Rank the Farm Systems
Paige_small
The Duke of ___________?
Paige_small
Toronto's Lineup Might Not Suck, Soon

BtB Goes Social

SBNation.com Recent Stories

Chicago Cubs pitcher Angel Guzman, center, rubs the head of teammate Carlos Marmol, left, while chatting with Marmol and manager Lou Piniella, right, on the first day of baseball spring training Thursday, Feb. 18, 2010, in Mesa, Ariz. (AP Photo/Paul Connors)

SB Nation's 2010 MLB Previews: Chicago Cubs, Seeking Redemption

New York Mets starting pitchers Mike Pelfrey, left, Johan Santana, center, and Oliver Perez watch as teammates take part in drills during spring training baseball Saturday, Feb. 27, 2010, in Port St. Lucie, Fla. (AP Photo/Jeff Roberson)

SB Nation's 2010 MLB Previews: New York Mets, The High Cost Of Low Expectations

Washington Nationals pitcher Stephen Strasburg throws during the second inning of  a spring training baseball game against the Detroit Tigers Tuesday, March 9, 2010 in Viera, Fla. (AP Photo/Charlie Riedel)

Nationals Send Stephen Strasburg To Double-A Despite Impressive Spring

More from SBNation.com >


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

Paige_small Satchel Price

Authors

Jinaz-reds-avatar_small JinAZ

Face_small Harry Pavlidis

Newavatar_small Matt Klaassen

1753738656_110919ebe9_o_small vivaelpujols

Ozzie_small erik

Big_pun--300x300_small Tommy Rancel

Adam_small adarowski

Redcap_small SFiercex4

St_louis_cardinals_ce1141_003263_small stevesommer05

Julio_teheran_2_small PWHjort

Cclogo_small Daniel Moroz