Category Archives: dataviz

Margin v. Total Yards in the NFL week 16, 2014

Margin v. Total Yards in the NFL week 16, 2014
Margin v. Total Yards in the NFL week 16, 2014

This scatter plot shows the final score margin v. total offensive yards in the NFL for week 16, 2014.

Also shown, to guide the eye, is the second order polynomial fit along with a shaded region of normalcy.

Teams on the top half of the graph won and teams on the bottom half lost. Since the team’s margin is the negative of their opponent’s margin, one can read off the week’s match ups from the top down v. the bottom up.

One sees quickly that the Cowboys beat the Colts by 35 for the largest margin of the week and that the Seahawks beat the Cardinals almost as badly with 596 yards of offense.

The NY Giants had the second largest offensive output and a narrow margin of victory over the Rams.

In the closest match up of the week, the Patriots beat the Jets with little offense.

This matplotlib graphic was made at SportsDatabase.com
with the SDQL
(rushing yards + passing yards) as Total Yards,margin as Margin,team@(season=2014 and week=16 and team and margin is not None) as ‘Margin v. Total YardsnNFL week 16, 2014’?polyfit=2&polyfit_error_scale=0.08

Passing Yards v Rushing Yards for each NFL game through week 13, 2014

Passing Yards v Rushing Yards for each NFL game through week 13, 2014
Passing Yards v Rushing Yards for each NFL game through week 13, 2014

This scatter plot shows the passing Yards on the vertical axis and rushing yards on the horizontal axis for each NFL game through week 13, 2014. Each team icon represents a game.

I like this graphic because interesting events stick out and the unreadable icons in the middle are correspondingly not interesting.

The Steelers had the most passing yards at 522 and the Seahawks the most rushing yards at 350.

The most balanced good game was by the Vikings and the Bengals play along that diagonal.

The Broncos have stood out for lots or passing yards with few rushing yards.

The Jets have had some poor passing games.

What else is interesting?

What is a good way to incorporate week number? Icon size? Icon transparency? Text? 3D Icon?

Other fun improvements: highlight a team; step through weeks; … what else?

Improve this sports data graphic starting with the SDQL:rushing yards,passing yards,team@(season=2014) as ‘Passing Yards v Rushing Yardsnfor each NFL game through week 13, 2014’?marker_size=30

Worst vs Best Start for NBA Teams since 1995

Worst vs Best Start for NBA Teams since 1995
Worst vs Best Start for NBA Teams since 1995

This scatter plot shows the worst vs best start for NBA teams since 1995.

Teams to the left never started a season with a lot of wins: the Hornets best start was 2-0.

Teams near the bottom never started a season with a long string of losses: the Thunder and the Bucks worst start was 0-2.

The top of the graph are teams that have had bad starts: the Nets hold the record at 18 losses and the Clippers currently have 17.

The best start (since 1995) was 14-0 by the Mavericks.

Teams in the upper right have known both good at bad starts: the 76ers started 10-0 as well as 0-17.

This graphic would be improved by showing the season where each mark was set.

This matplotlib graphic was made at SportsDatabase.com with the SDQL Replace(wins@losses=0),R(losses@wins=0),Replace(team)@team and season|Max($1),Max($2),Replace($3)@$3|$1 as ‘Wins Before First Loss’,$2 as ‘Losses Before First Win’,$3@1 as ‘Worst vs Best Startnfor NBA Teams since 1995’?marker_size=60

Points v. Field Goals for NFL teams through week 13, 2014

Points v. Field Goals for NFL teams through week 13, 2014
Points v. Field Goals for NFL teams through week 13, 2014

This matplotlib scatter plot shows total points versus field goals for each NFL teams through week 13, 2014.
Also shown is the least squares fit.
The tendency is for total points to increase with increasing number of field goals.
The Broncos stick out with few field goals for many points.

This matplotlib scatter plot was made at SportsDatabase.com with the SDQL S(field goals),S(points),R(team)@team and season=2014|int($1) as ‘Fiield Goals’,$2 as ‘Total Points’,$3@1 as ‘Points v. Field Goalsnfor NFL teams through week 13, 2014’?polyfit=1&polyfit_error_scale=1&marker_size=40.

NBA Points v. Turnover Margin through November 30, 2014

NBA Points v. Turnover Margin through November 30, 2014
NBA Points v. Turnover Margin through November 30, 2014

This matplotlib small multiple set of scatter plots shows points scored verses turnover margin for each NBA team through November 30, 2014.

A positive turnover margin means that the opponent turned the ball over more times than the team (SDQL: o:turnovers – t:turnovers).

The Warriors show the strongest negative correlation: they have tended to score more points when they turn the ball over more than their opponent.

At the other extreme, the Cavs show the strongest positive correlation: the more their opponent turns the ball over the more points they have scored.

This small multiple set was made at SportsDatabase.com> with the SDQL: (o:turnovers-turnovers) as Turnover Margin, points as Points @ self.nice_team(team) and (season=2014) as ‘NBA Points v. Turnover Marginnthrough November 30, 2014’?polyfit=1&polyfit_show=1&transparency=0.65&marker_size=5.

 

NHL Goals v. Penalty Minutes

NHL Goals v Penalty Minutes
NHL Goals v Penalty Minutes

This matplotlib scatter plot shows Goals v Penalty Minutes for each NHL team through Nov 28, 2014.

Also shown in the second order polynomial fit and shaded region of normalcy.

The Sabres are outstanding in their low number of goals in relation to their high number of penalty minutes.

At the other extreme, the Lightning score a lot of goals with few penalty minutes.

The sports data graphic was made at SportsDatabase.om with the SDQL: S(penalty minutes),S(goals),R(team),R(name)@team and season=2014|$1 as Penalty Minutes,$2 as Goals,$3@1 and ($3) as ‘NHL Goals v Penalty Minutes’?marker_size=50&polyfit=2&polyfit_error_scale=0.01

Points Scored v Points Allowed NFL week 12, 2014

'Points Scored v Points Allowed NFL week 12, 2014'
'Points Scored v Points Allowed NFL week 12, 2014'

This matplotlib scatter plot show the points scored verses points allowed for each NFL team in week 12, 2014.

One sees quickly that the Eagles scored the most points with 43, followed by the Broncos, Bills and Dolphins.

The Cardinals, Jaguars and Jets all scored only 3 points.

Symmetry along the diagonal makes it easy to pick out match ups with winning teams above the diagonal and losers below.

The Browns and Falcons had the closest scoring games while the Bills and Jets had the widest margin.

This MatPlotLib scatter plot was made at SportsDatabase.com with the SDQL o:points as ‘Points Allowed’,points as ‘Points Scored’,team@(week=12 and season=2014) as ‘Points Scored v Points AllowednNFL week 12, 2014’?marker_size=40

Average Points v Season NFL 1989 – 2014

Average Points v Season NFL 1989 - 2014
Average Points v Season NFL 1989 - 2014

This scatter plot show the average points scored by a team in NFL games from 1989 – 2014.

Also shown is the second order polynomial fit.

Scores have been increasing.

This Matplotlib scatter plot was made at SportsDatabase.com with the SDQL:
R(season),A(points)@season|$1 as Season,$2 as Points@1 as ‘Average Points v SeasonnNFL 1989 – 2014’?marker_size=200&polyfit=2&polyfit_error_scale=0.000000001&ymin=18&ymax=24

Can you improve this graph?

Add explanatory parameters? 

Scatter Plot of NBA Points vs Opponent Points in 2013

Scatter Plot of Points vs Opponent Points for all NBA games in 2013
Scatter Plot of Points vs Opponent Points for all NBA games in 2013

This scatter plot shows the team points vs opponent points for all NBA games in 2013.

One sees quickly that the highest scoring game was 145 to 130ish.

The strange brain shaped pattern shows that NBA teams avoid very close scores: in fact a margin of 7 was most common in 2013.

If the teams’ scores were independent we would expect a circle rather than a brain.

I like the gigantic transparent icons because the viewer observers the gray scale directly.

Below is a cleaner version which avoids overlapping icons.

One sees more clearly that there are no ties in the NBA and although, ‘we knew that’, mapping this knowledge to the graphic roots the viewer and gives confidence for further insights.

It seems not inappropriate to spread out these final scores visually – what if that last shot went in ?

What do you think?

Points vs Opponent Points for all NFL Ga

 

Points vs Opponent Points for all NFL Games 1989 - 2013
Points vs Opponent Points for all NFL Games 1989 - 2013

The final score (points vs opponent points) for every NFL game 1989 – 2013.

This scatter plot works as a ‘heat map.’

We see quickly that:

  • A total of 1 never happens (it is impossible by NFL scoring rules)
  • A total of 2 is rare (a safety)
  • A total of 4, while possible, has never happened.
  • The most common score is around 23, or somewhere in there.
  • Ties happen and are rare.

It could probably be improved with a better gradation scheme.