How Do I … With PI?
Posted by Raphy on June 19, 2010
There seems to be a recent increase in the number of how to questions regarding PI usage. Since there are constantly new users, I thought that it might be good to have a single place for people to posts questions and answers regarding PI searches. This way people can read up on old questions and the answers to new questions won't risk being lost in the comments of another post.
I can't stick this to the top of any page or even tag it, but a search for "PI help" should help find this thread. If comments on the thread ever closes, please send me an email and I'll reopen it. You can find my contact information (along with all the other bloggers) on the right bar of this page.
Anyway, here is the thread. Ask away.
June 19th, 2010 at 11:05 pm
I noticed that in general you can do pitching queries or hitting queries. What about fielding queries? Watching the Pirates error fest against the White Sox on Wednesday, I was wondering when the last time the Sox were involved in a game where four errors were committed in an inning. How would you go about doing that?
June 19th, 2010 at 11:10 pm
There's probably an easy way to do this, but how do you search career stats like "Most games played without appearing in a World Series"? Or can't you do that? (Specifically, I am wondering who has played the most MLB games without ever being named to an All-Star team - or, alternatively, without ever having played in one.)
June 19th, 2010 at 11:22 pm
How do I figure out who has the best slugging percentage on Tuesday night games during a meteor shower?
June 19th, 2010 at 11:28 pm
@1 Fielding and Inning queries are not yet available. (Although , Fielding queries have been promised, hopefully this summer. http://www.baseball-reference.com/blog/archives/5756 )
If you want to do a little research, you can use the ROE option in the team batting game finder as a starting point. I know its not perfect, but it may help.
June 19th, 2010 at 11:30 pm
Say I wanted to see which team has had the best production from 2nd basemen over the past 10 years... How would I be able to find that? Like I would want only 30 lines (one for each team) and I would basically want all 2B from each team lumped into one line. Example: The giants line would take Jeff Kent's stats as a Giant, Ray Durham's stats as a Giant, and anyone else who played 2B during that time, combined into one line and etc etc for each team.
June 19th, 2010 at 11:35 pm
@2 There is no easy way to do that with PI. However, the WS question can be found here.
http://www.baseball-reference.com/leaders/leaders_most_gamesnows.shtml
As for the all-star appearances. I don't think there is an easy way to do this. However, if you are spreadsheet savvy, you can use the batting game finder to create a table with every player to play in the all-star game and compare that with a table (created with the season finder) of the leaders in games played.
Interesting idea for a post...
June 20th, 2010 at 12:18 am
How to find pitchers who were in both games a doubleheader? "Days Rest" cannot be set to -1 (a suggestion I have made before).
June 20th, 2010 at 12:23 am
Can one search for an accomplishment within the first x plate appearances or first x at bats in one's MLB career? For example, who had the most homers in the first 1,000 plate appearances of one's career?
June 20th, 2010 at 12:29 am
@7 You can trick the PI to find this. Set Days Rest < 0 * IP (or something like that). I'll try to get to the other questions tomorrow. Good night, all.
June 20th, 2010 at 2:22 am
there was one i was trying to find: a game in which a player hits for the cycle, and those hits being his team's only hits in that game. maybe that can't be done with PI.
June 20th, 2010 at 3:28 am
Is there a way to total someone's numbers while eliminating one season (or say a bad start for a SP) from the log?
June 20th, 2010 at 4:10 am
I'm trying to find out Wilson Valdez's GIDP percentage this year since he's grounded into a downright silly amount so far.
I know in splits, I can see how many PA he's had with runners on 1st, 1st and 2nd, etc but that doesn't tell me the outs, so I'd need to be able eliminate the 2 outs situations.
Any way to find this out?
June 20th, 2010 at 6:57 am
@5 I'm still working on it. I thought I had it, but sadly I didn't.
@8 PI is limited to find most hits in first x games not AB. (If you need elaboration, please let me know).
@10 I don't think that can easily be done with PI.
@12 I think what you looking for is on the splits page. There is a split runner on 1st lt2 outs.
Generated 6/20/2010.
If not you could use the PI event finder. (If you want me to elaborate, please let me know.)
Jennifer, I'll answer your question later.
June 20th, 2010 at 8:28 am
@11. Not automatically. However you can decide which season you want removed and have the site add it up. Basically you need to take the player's page url and add # followed by the seasons you want included separated by a comma followed by the word sum. You would then hit enter and refresh the page.
Matt Cains career stats without the 2006 season would look like this:
http://www.baseball-reference.com/players/c/cainma01.shtml#2005,2007,2008,2009,2010,sum
The same thing can be done with the gamelogs using career games instead of seasons. However, it does not work with both a range and a list (1-6,8) or more than one range (1-6,8-25). As a result you would have to type in every game of the season. This can be a bit tedious, which is where PI comes into play.
Suppose we wanted to find Matt Cain's stats for 2009 with his wort game removed. We can figure out that his worst game score was 16 and use the Cain Pitching Game finder to search for all games by Cain in 2009 with a gamescore of at least 17. If you select Find players with most matching games in a season, the PI will add all those games together and give the totals for the most basic stats from those games.
June 20th, 2010 at 10:37 am
@9 -- not so. There is a <= option but not a pure < option. Using the <= captures all the zero days reset appearances, of which there are many more, thus defeating the goal.
June 20th, 2010 at 10:39 am
Just ignore that last one. Was reading pre-coffee.
June 20th, 2010 at 1:19 pm
@2
I think it's Tony Phillips: 2,161 games, 0-time All-Star
June 20th, 2010 at 4:58 pm
How do you search for Grand Slams with the play index?
June 20th, 2010 at 6:29 pm
@18
Use the Batting or Pitching Event Finder.
Search for all teams / homeruns
Filter the search for bases 123.
Repeat for each year.
June 20th, 2010 at 6:59 pm
Priceless. Thank you
June 20th, 2010 at 7:13 pm
@10, the record for most hits by a player who got all his team's hits is 4. Three players have done that, and none of them cycled. Kid Elberfeld, 1 Aug 1903, 4 singles; Billy Williams, 5 Sept 1969, 2 doubles and two homers (which, of course, is better than hitting for the cycle); Miguel Tejada, 23 Apr 2006, 3 singles and a home run. This came from the Sporting News Record Book, not the PI.
June 20th, 2010 at 8:31 pm
How can I search for stats in the season finders based on a players 1st year with a team (as opposed to first year overall)
June 20th, 2010 at 9:14 pm
There should be a way to separate extra inning stats from regulation game stats.
June 20th, 2010 at 9:19 pm
How would I find out how many teams have lost 50 (or more) of their first 69 games ..... which Baltimore has just done....
June 20th, 2010 at 9:42 pm
@22 I don't think that you can.
@23 While its probably not as extensive as you'd like you can separate extra inning stats on the splits page (listed under by inning) Like most splits, these are not yet searchable. However you can isolate extra inning events with the event finder.
June 20th, 2010 at 9:46 pm
@24 You can use the streaks finder ( http://www.baseball-reference.com/games/streaks.shtml ) found under Game results search tools.
Set: Games in Streak to 69.
Year - All Years
Team - All Teams
Order by losses
and select from beginning of the season only.
June 21st, 2010 at 1:31 pm
Thanks Raphy.
June 24th, 2010 at 10:47 pm
The Pirates have had just 1 starter win a game in almost a month...
How can I find a record for most consecutive games in which a team's starting pitcher did not win a game (not just an individual pitcher, but the team as a whole)
June 25th, 2010 at 8:06 am
Dave -As far as I know this can not be done. Although, I have never wanted to do this specific search, I have long wanted to do many similar searches.
As for you question, you may want to look at teams in this list:
http://bbref.com/pi/shareit/5r3c4
June 25th, 2010 at 9:37 am
Then I guess there's no easy way to find seasons in which a team's relievers had more wins than the starters
June 25th, 2010 at 9:51 am
I don't for sure. The one thing that I know of is that you can do that easily on a year-by year basis. If you look at the league wide starting pitcher page the information is available.
http://www.baseball-reference.com/leagues/MLB/2010-starter-pitching.shtml
Generated 6/25/2010.
Wgs is wins by starters and in the case of team totals Wtm will be total team wins.
June 29th, 2010 at 9:21 pm
In case anybody come back to this...
The Pirates seem to be on their way to losing tonight. They have just 1 run against the Cubs on the road. If they do not score another run tonight, their run total in the most recent 4 games at the Cubs (starting tonight and going backwards) will be 1-2-3-4
How great would it be to devise a way to search for streaks like that? Most consecutive games (in any manner) to score in progressive run amounts forward or backward.
First game, 0 runs. Next game, 1 run. Next game, 2 runs. Next game, 3 runs...