Live Twitter Feeds (Beta)
For those of you who visited FanGraphs for the first time this off-season, you may not realize that we track every game’s win probability in real time during the season. This year, we’re also going to “tweet” every play and win probability in real time! We have twitter feeds set up for each team, so you can follow your favorite team on your cell phone or through a twitter application of your choice.
We will be tweeting all 162 games for each team, the all-star game, and the playoffs.
There are two types of feeds for each team. The full version, and the lite version. The full version is every single play and the lite version is end of inning plays, significant score changes, and any play that changes the win probability more than 10%. I suspect the full feed will have about 70-100 updates a game, while the lite version will have 20-30 a game.
Consider these feeds in beta! I have tested them a bunch of times this off-season, but there still might be some issues. I’ll definitely take suggestions on these feeds but remember there’s a 140 character limit on tweets.
Example Tweet: 2-9, 0 % to Win, Top 9, 3 Outs, ___, Jay Payton flied out to second .
It gives you the score (with the team your followings score first), the % chance the team your following is going to win the game, the inning, the outs, the base state ( ___ means no one on, _23 would be runners on 2nd and 3rd), and the last play(s).
You can sign up for as many feeds as you like, but be warned, you will receive two tweets per game update if two teams are playing each other and you are subscribed to both feeds.
The Feeds: The full feed is followed by an _fg, so the yankees full feed would be “yankees_fg”. The quick feeds are followed by a _qf so it would be “yankees_qf”
Team: Full Feed Quick Feed Angels: angels_fg angels_qf Astros: astros_fg astros_qf Athletics: athletics_fg athletics_qf Blue Jays: bluejays_fg bluejays_qf Braves: braves_fg braves_qf Brewers: brewers_fg brewers_qf Cardinals: cardinals_fg cardinals_qf Cubs: cubs_fg cubs_qf Diamondbacks: diamondbacks_fg diamondbacks_qf Dodgers: dodgers_fg dodgers_qf Giants: giants_fg giants_qf Indians: indians_fg indians_qf Mariners: mariners_fg mariners_qf Marlins: marlins_fg marlins_qf Mets: mets_fg mets_qf Nationals: nationals_fg nationals_qf Orioles: orioles_fg orioles_qf Padres: padres_fg padres_qf Phillies: phillies_fg phillies_qf Pirates: pirates_fg pirates_qf Rangers: rangers_fg rangers_qf Rays: rays_fg rays_qf Reds: reds_fg reds_qf Red Sox: redsox_fg redsox_qf Rockies: rockies_fg rockies_qf Royals: royals_fg royals_qf Tigers: tigers_fg tigers_qf Twins: twins_fg twins_qf White Sox: whitesox_fg whitesox_qf Yankees: yankees_fg yankees_qf
Print This Post

Awesome. Signing up now.
Best thing ever, great idea! Thanks for constantly being innovative and exciting everyone who is smart enough to follow!
It’s a long season, and there are many day games that can’t be followed easily while at work. Now not only can we get real-time updates, we can get them in our favorite sabermetric style!!
Fangraphs has hit another home run on this one.
Nicely done! I always new you guys were twits! ;-)
*knew (I guess I’m the twit, huh?)
Thank you so much. This is amazing.
Everytime I go on fangraphs I’m baffled at how great this site is and how much it’s improving. This feed is a FANTASTIC idea and, although I never used Twitter before, I just created an account for the sole purpose of using this feed. Great job as usual, guys.
Great idea, a little concerned that even the lite version is a little too much information overload, but I think it will likely work well. I’ll be following my Red Sox, you can be sure of that.
We can always reduce the number of tweets on the lite feed. I’d hardly say this is a finished product.
I think a feed that gave 3-inning updates and then any updates of changes >10% in Win probability may be a much more managable. Or you could set Win probability thresholds that led to updates like 25%, 50%, 75%, 90% or something like that. It would be great to get ~5-10 updates/game rather than 20-30.
I’m just curious is you guys end up with any revenue after all the effort you put into this wonderful site. I know there is a tiny bit of advertising, but are you guys left with anything after bandwidth costs, etc?
Wow, looks like this is going to be the thing that finally pushes me over the edge to getting a Twitter account. Should’ve known I’d never be able to hold out.
I am hopeless. I signed up for twitter, but have no idea how to now subscribe to the feed I want. I tried adding dodgers_qf as a person I follow, but it just tells me it can’t find dodgers_qf. I am obviously doing something very wrong that is probably obvious to most people, but if someone would be kind enough to tell me what to do to subscribe to a feed, it would be most appreciated.
Goto the feed you want above and then select “Follow” from it’s page under the logo.
~ Austin
Thanks Austin. I never noticed they were links.
Very cool.
Man, stuff like this puts Fangraphs ahead of every other site. Including pay-for sites.
I can’t wait for the Fan Graphs magazine, tv show, radio station, and tour. :) I wish the message board would take off and liven up though in the mean time!
Note that there’s a similar service that has been doing this. See http://twitter.com/redsoxticker for example.
Yeah, someone pointed this out to me a couple days ago. From what I read on their site it says there’s going to be a 3-6 minute delay on the tweets. I’m hoping for much better performance, maybe 30 after the play happens.
We’ll see how things really run tonight and tomorrow. Should be interesting!
David, assuming that there’s no more than 15 games going on at once — and I’m assuming you’ll prioritize the number crunching on the quick feed over the indepth feed. It’s totally possible to update it as often as Twitter lets you…
I take it you’re pulling it straight from gd1 or gd2 over at mlb.com?
Your bandwidth cost are going to be absurd though. I take it you’re pulling the xml file, parsing it by event — updating it for every new event, and then crunching the numbers through your Win percentage calculator?
I’m trying to remember how those boxscore.xml’s are formatted but so long as you’re only pulling it per AB, rather than per Pitch , I think this works fine.
Your bandwidth costs are going to to kill you unless mlb breaks their xml files into Innings now.
Oh, by the way David..
I think you should Tweet certain milestones as well. One awesome one, would be pulling the PFX data, which would trigger a tweet every time someone had a release speed of 100+ mph.
Of if they ever implemented hitting fx (i haven’t looked through all these goodies yet) every time someone went for a a 400ft HR.
Just Tweeting random things, like the best breaking ball of the night.
All of these things require that you don’t have to crunch the numbers, even if the W% formula is simple — You can just pull them.
I think it’d be neat to be chilling out and getting messages like..
8th Inning, Detroit Toronto. Verlander Tops 100mph.
9th Inning, STL CIN, Jason Motte Hits 102
or
Burnett’s Curve moved xx Inches, swinging strike, 2 inches better than so and so..
So and so’s curve dropped xx inches, swinging strike .5 inches better than Burnett…
anyways, you get the point. As you can tell, I think this is a great idea, and good on yah.
Actually, BIS is providing us with live data this season (last season we were with STATS), so it’s not like we have to worry about downloading the inning files or anything.
So… with that said, we can’t do any pitchfx stuff. I don’t know what MLBAM’s policy is on using their live data to essentially replicate an actual gameday feed in real time, but I’d have to think it’s something they’d consider blocking your IP for relatively quickly. Maybe not, I don’t know.
David, just to let you know, if you don’t already, the Phillies/Braves game tonight is not updating.
Yeah, we’re working on it. Having some opening day hicups, but looks like things will be resolved shortly.
Thanks David. Can you do anything about Brett Myers while you are at it?!?!?
Thanks again.
Ah, maybe I’ll hack together some perl to do it. Is there an API for twitter (i’m new to tweeting)? or do you just write some kind of POST method in php to send it there?
Last year I wrote a perl script that queried game-day every 3 minutes or something, because the guys in my fantasy league were too cheap to pay for a stat tracker program.
I was all excited thinking you were coming up with all sorts of regular expressions to tear through these XML files, meanwhile you’re getting it pre-processed! Sell Out! lol.
The Stat companies don’t give you pfx data?
Heh, well… we’ve always bought our stats. I do grab gameday data on my own, but you really can’t use it for commercial purposes.
Ugh, well… can’t say this went well. Problem is resolved but my provider looks like they’re playing catchup on the game data. Not sure they’ll actually catch up to the live game.
Hopefully tomorrow will go a lot smoother.
Wonderful idea, wonderful site. Ditto all the praise here!
Not to get greedy but what would really wonderful for fantasy is Twitter feeds for individual player performance. Is that on the horizon?
But major congrats on this!
David, love the idea.
How about one feed that includes major updates for all teams?
Good idea Sky. As soon as everything runs smoothly with the team feeds, I’ll look into doing an entire MLB major update feed.
Looks like everything is working so far! I’m following the mets game right now.
Also, how about putting the event description first, followed by base-out situation, score, inning, and win probability. If listing the change in WP, put it right after the event description.
Assuming I’m following the whole game via the Twitter feed, I want to see the stuff that changes most frequently first.
Well… this is more of a technical thing because the play descriptions can occasionaly be long, especially if multiple events happen. And with the 140 character limit, I’d like to get the important stuff in there, and then cut off some of the play if necessary.
I don’t really know what’s more important, the play or the game state? Because the game state will be lost sometimes, and with the way it is, you’ll always get at least the last play on the full feed.
So you’re outputting a string and taking the first 140 characters for the Twitter feed, I guess? Why not calculate how long the string is for all the non-even stuff, then include 140-x characters of the event description. Same info, different order.
logic:
if the string is greater than 140, enter loop, have all your shorthand in an array, and go through and replace double, with dbl, run scored, with RS, etc etc or basically whatever words repeat themselves in long strings — make up a short hand, and then just use a straight replace within the string.
If you prune the sucker enough, it oughta fit.
Your example: 10 Percent Win, 2 Out, (remove first name) Payton FO (instead of flies out) to 2B (instead of second base). RS (run scored). 4-2 BAL.
I’d really only call it if the string was greater than 140 characters, but it seems like as good of an idea as any?
It would be awesome if we could get a twitter feed of all events with a WPA swing over a certain threshold. A cool way to keep up with important plays.