Category Archives: matplotlib

MLB Win Percentage vs Number of Games for One Run Games

 mlb_wins_games_for_1rungames_20160826.png August 27, 2016 98 kB 800 × 800 Edit Image Delete Permanently URLTitleCaptionAlt TextDescription ATTACHMENT DISPLAY SETTINGS  Alignment Link To Size                                         1 selected Clear   Insert into post 
mlb_wins_games_for_1rungames_20160826.png
August 27, 2016

This scatter plot show winning percentage (vertical axis) vs number of game (of the horizontal axis) for each MLB team in 2016 through August 26.

The Mariners have the most (47);
The Rangers the highest win rate (77.78%)

This matplotlib graphic was made at SportsDatabase.com
with the SDQL

S(1) as Number of One Run Games, A(W) as Winning Percentage of One Run Games, R(team) @ team and (math.fabs(runs-o:runs)=1 and season=2016) as ‘Winning Percentage of One Run Games v Number of One Run Games\nfor MLB teams through Aug 26, 2016′ ?ymin=0.2 &ymax=0.8 &polyfit=1

Cubs Historically Efficient

scat_mlb_rp10h_runs_xseason_20160704

These scatter plots show the average runs per 10 hits vs average runs for MLB teams. Each of the small multiples represents a season starting with 2005 in the upper left through 2016 (through July 4) in the lower right.

The highest average runs per game was achieved by the Yankees in 2007.

The most outstanding team over this time period was the 2015 Blue Jays.

The scatter plot for 2016 at the lower right shows that the Cubs are on pace to set the highest runs per hit efficiency in more than 10 years and that Atlanta and the Royals are near the historic futility of the 2013 Marlins and the 2010 Mariners.

This matplotlib graphic was made at SportsDatabase.com
with the SDQL

A(runs),A(10*runs)/A(hits),Replace(team),R(season)@team and season|$1 as Runs,$2 as Runs Per 10 Hits,$3@$4 and ($4>2004) as ‘Runs per 10 Hits vs Runs\nMLB Teams since 2005’?marker_size=38&width=1600

Guard v Forward FanDuel Fantasy Points for Each NBA Team

Guard v Forward Fantasy Points
Guard v Forward Fantasy Points

This set of small multiple scatter plots shows the guard’s v forward’s fantasy points for each NBA team through Nov 22, 2015. Each scatter plot show the performance of a team. The horizontal position of each dot gives the total fantasy points for that team’s starting forwards and the vertical position that for the starting guards.

The Hornets in the upper left show the most negative correlation: when the guards get a lot of fantasy points the forwards get few. At the other extreme in the lower right the Nuggets show the most positive correlation: when their guards do well so do their forwards.

Also notable is the relatively tight correlation (seen by the narrow shaded region of normalcy) for the Jazz, Thunder and Grizzlies and that the Wizard’s Forwards are most consistent in their Fantasy output.

How might this inform your Fantasy choices?

This matplotlib graphic was made at SportsDatabase.com with the SDQL

S(FP@position=F and date and team) as Forwards,S(FP@position=G and date and team) as Guards,R(team) @ season=2015 and team and date|$1,$2@$3 as ‘Guard v Forward Fantasy Points\n all NBA teams in 2015’?polyfit=1&transparency=0.3&polyfit_show=0&marker_size=10&symmetric=1

Guard v Forward Fantasy Points for NBA teams in 2014

scatter_nbap_forwardsFP_guardsFP_2014
These scatter plots show the combined fantasy points of the starting guards v combined fantasy points of the starting forward for each NBA player-game in 2014: that is, each dot represents player performance in a single game.
This matplotlib graphic was made at SportsDatabase.com
with the SDQL

S(FP@position=F and date and team) as Forwards,S(FP@position=G and date and team) as Guards,R(team) @ season =2014 and team and date|$1,$2@1 as ‘Guard v Forward Fantasy Points\n all NBA teams in 2014’?polyfit=3&transparency=0.3&polyfit_show=0

A small change of the SDQL breaks this relationship down by team.
scatter_nbap_forwardsFP_guardsFP_xteam_2014

This matplotlib graphic was made at SportsDatabase.com
with the SDQL

S(FP@position=F and date and team) as Forwards,S(FP@position=G and date and team) as Guards,R(team) @ season =2014 and team and date|$0001,$2@$3 as ‘Guard v Forward Fantasy Points\n all NBA teams in 2014’?polyfit=2&transparency=0.3

Number of Wins vs Number of Times Winning After 5 Innings for MLB teams in the 2014 regular season

Number of Wins vs Number of Times Winning After 5 for MLB teams in the 2014 regular season
Number of Wins vs Number of Times Winning After 5 for MLB teams in the 2014 regular season

This scatter plot shows the Number of Wins vs Number of Times the Team was Winning After 5 innings for MLB teams in the 2014 regular season.

The linear fit and shaded region or normalcy are also shown.

Teams to the top won the most games;
Teams to the right were winning the most after 5 innings;
Teams to the lower right fade late;
Teams to the upper left comeback.

This matplotlib graphic was made at SportsDatabase.com
with the SDQL S(M5>0),S(margin>0),R(team)@team and season=2014 and playoffs=0|($1) as Winning after 5,($2) as Wins,$3@1 as ‘Number of Wins vs Number of Times Winning After 5nMLB teams 2014 regular season’?polyfit=1&marker_size=40&polyfit_error_scale=0.6&yticks=5

Sacks v Sacks Allowed NFL 2014 Regular Season

Sacks v Sacks Allowed NFL 2014 Regular Season
Sacks v Sacks Allowed NFL 2014 Regular Season

This scatter plot shows sacks v sacks allowed for the 8 remaining NFL teams.

The Ravens have the most sacks with 50 and the Broncos have allowed the fewest with 17.

Teams above the diagonal have sacked more than they allowed.

Upper Left = Good; Lower Right = Bad.

This matplotlib graphic was made at SportsDatabase.com
with the SDQL

S(o:sacks),S(sacks),Replace(team)@team and season=2014 and playoffs=0 and team in [Ravens, Cowboys,Seahawks, Panthers,Broncos, Packers,Colts,Patriots]|int($1) as Sacks Allowed,int($2) as Sacks,$3@1 as ‘Sacks v Sacks AllowednNFL teams 2014 regular season’?polyfit=2&polyfit_error_scale=0.008&marker_size=80&symmetric

Steals v Turnovers NBA teams through Dec 26, 2014

Steals v Turnovers NBA teams through Dec 26, 2014
Steals v Turnovers NBA teams through Dec 26, 2014

This scatter plot shows steals v turnovers for NBA teams through Dec 26, 2014.

The dashed line is the 2nd order polynomial fit and the shaded region of normalcy guides the eye.

The 76ers have both the most turnovers and the most steals.

The Bulls have the fewest steals and an average number of turnovers.

This matplotlib graphic was made at SportsDatabase.com
with the SDQL
S(turnovers), S(steals),Replace(team)@team and season=2014|int($1) as Turnovers,int($2) as Steals,$3@1 as ‘Steals v TurnoversnNBA teams through Dec 26, 2014’?polyfit=2&polyfit_error_scale=0.001&marker_size=50

Goals v Shots on Goal NHL teams through Dec 24, 2014

Goals v Shots on Goal NHL teams through Dec 24, 2014
Goals v Shots on Goal NHL teams through Dec 24, 2014

This scatter plot shows goals v shots on goal for NHL teams through Dec 24, 2014.

Also show is the second order polynomial fit and a shaded region on normalcy.

Teams above the lower-left to upper-right diagonal score on a higher percent of shots than average.

The Blackhawks have taken the most shots and the Lightning have scored the most.

The Sabres have taken the fewest shots on goals and have scored the fewest goals.

This matplotlib graphic was made at SportsDatabase.com
with the SDQL
S(shots on goal),S(goals),Replace(team)@season=2014 and team|int($1) as Shots on Goal,int($2) as Goals,$3@1 as ‘Goals v Shots on GoalnNHL teams through Dec 24, 2014’?polyfit=2&polyfit_error_scale=0.0008&symmetri&aspec&marker_size=60

Faceoffs Won v Faceoffs Lost for NHL teams through Dec 23, 2014

Faceoffs Won v Faceoffs Lost for NHL teams through Dec 23, 2014
Faceoffs Won v Faceoffs Lost for NHL teams through Dec 23, 2014

This scatter plot shows faceoffs won v faceoffs lost for NHL teams through Dec 23, 2014.

Also shown is the third order polynomial fits and a shaded region of normalcy.

Teams in the upper right half of the plot have had more faceoffs than average.

The Canadiens have won the most faceoffs and the Flames have lost the most.

This matplotlib graphic was made at SportsDatabase.com
with the SDQL
S(faceoffs lost),S(faceoffs won),Replace(team)@season=2014 and team|int($1) as Faceoffs Lost,int($2) as Faceoffs Won,$3@1 as ‘Faceoffs Won v Faceoffs LostnNHL teams through Dec 23, 2014’?polyfit=3&polyfit_error_scale=0.0000006&symmetric&aspect&marker_size=60