Jump to content

Baseball statistics website created by yours truly


Recommended Posts

9 minutes ago, GuidoSarducci said:

http://switchfielder.com/baseball/

The idea is to be able to run fairly arbitrary queries against data, not just set stuff like leaderboards/etc..  So you can find info like "What have been the worst pitching performances by a team in a given month over the last ten years" (sadly the O's own two of the top ten positions 🙂 

Only boxscore data available now, and its still kinda barebones.   And its more of a learning /exploratory project.  Some of the queries may not work or make sense. If interested let me know what you think.

Good luck with the site as it seems like a cool concept.

Link to comment
Share on other sites

12 minutes ago, Moose Milligan said:

Will it tell me exactly how sweet the tears of Red Sox fans taste after we just swept their asses in Fenway? 

I'll have to find some horrible records about the Red Sox or Fenway.

 

Gave me an idea for  query .. all games the Orioels have played in Fewnay in April .over the last ten years or so

  • Upvote 1
Link to comment
Share on other sites

2 minutes ago, yark14 said:

Cool idea.  You could probably use it to run a Twitter account that has the most random stat of the day.

My main feedback from tinkering around with it: the sorting needs work.

Yeah I think maybe I should add a  client-side sortable table.  Right now it just dumps into a standard HTML table.  You can select the ordering as part of the query, which is important for things like "worst pitching performances in the entire history of the MLB", but for just reordering what you have on screen, would be mucher nicer.

 

31 minutes ago, spleen1015 said:

Can this tell me how many times Hyde brought Bautista in for the 9th, on the road, in a tie game?

The eventual goal is to run queries where you could find out exactly something  like that.    Need to process the event files for things that, then come up with usable interface.  The boxscores alone have been a handful, but I'll probably reach reach a point where I can't get much  interesting data from them aside from some historical records.

At one point durijng the early Hyde years I was seriously wondering whether Chris Holt's mound visits were actually making things worse .. would be great if there some stats to back that up.

Now to answer the records question : unfortunately the "Parks" feature seems to be broken but running a manual query on my local db, he Orioles in Fenway against the Red Sox were 14-12 from 2012 to 2022 which is when my data ends ... lost two last year (including infamous Ryan McKenna game).  Incuding the sweep we're head 17-14 (since 2012, in Fenway, in April 🙂

 

Link to comment
Share on other sites

55 minutes ago, Moose Milligan said:

I will check the site tomorrow on my laptop. Doesn’t look too good on mobile at the moment. 

Yeah I just tried.  Works but a bit ugly 😐.  Guess I need more experience with  Bootstrap 

Link to comment
Share on other sites

Little update because I got at least some interest.  I have been working on the Retrosheet event files, which give a play-by-play account of games to varying degrees.  From these you can reconstruct quite a bit, obviously the further you go back the less quality it is and (e..g, you don't get pitch data until ~1990). 

Anyway I am now giving all games a uniquely generated ID, to simply the DB operations.  Testing my play-by-play processor, and it turns out that game 100,000 was played between Baltimore and Boston on September 6th, 1963.  I am generating that looks like this:
 

applyPlay B1 BOS 1 BAL 0 2 outs
BAL poweb101 at bat BOS monbb101  pitching
onBase: 1:          2:          3:
play=  D/78
double
play runs= 0 outs=  0
applyPlay B1 BOS 1 BAL 0 2 outs
BAL gentj101 at bat BOS monbb101  pitching
onBase: 1:          2: poweb101 3:
play=  W
walk
runner on 2  does not advance
play runs= 0 outs=  0
applyPlay B1 BOS 1 BAL 0 2 outs
BAL branj101 at bat BOS monbb101  pitching
onBase: 1: gentj101 2: poweb101 3:
play=  HR.2-H;1-H
home run
runner on 2  ( poweb101 ) scored
runner on 1  ( gentj101 ) scored
basesAdv= {1, 2}
play runs= 3 outs=  0

The "play" line is what I'm getting from Retrosheet, from there I have to infer  just about everything else.  (It does have inning and batter info, but I also keep track of this internally and verify I am doing the right thing, so like it says a certain batter is up, I check to see if they were next in the order)

Anyway parsing some of these "play" lines can be quite challening... this particularly game I think everything was the same as Baseball reference (I summarize at the end), except like one catcher assist was credited as a putout. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...