This is a very quick notebook putting together the scorelines for the USAU results at the start of day 3. Please note that this is limited to the stats kept track of on USAU (which is limited to goals, assists, blocks, and turns). Also since it only goes up through day 3, it only includes half of the consolation bracket matches (some of which were played in the morning on Sunday). This is just to get a very very quick sense of how individual players have performed in general and not to say rank player performances. Obviously these stats are only one small way to look at a player's performance (versus intangibles such as shutdown defense, number of touches, team player, etc), but its currently the only easy means to quantitatively measure performance.


In [1]:
from usau.reports import USAUResults as Results

In [2]:
%matplotlib inline
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_style("whitegrid")
matplotlib.rcParams.update({'font.size': 14})

style_args = {"alpha": 0.5, "markeredgewidth": 0.5}
sns_blue, sns_orange, sns_green, sns_red, *sns_pallete = sns.color_palette()

In [3]:
m2018 = Results.from_event("d1college", 2018, "Men")
m2018.load_from_csvs()


Out[3]:
USAUResults<2018_d1college_nationals_men>

In [4]:
w2018 = Results.from_event("d1college", 2018, "Women")
w2018.load_from_csvs()


Out[4]:
USAUResults<2018_d1college_nationals_women>

In [5]:
# m2018.rosters

In [6]:
import pandas as pd
from IPython.display import display
from usau.top_n_player_stats import compute_plus_minus
import usau.markdown

def top_n_stats(report, goal_weight=1.0, assist_weight=1.0, d_weight=1.0, turn_weight=-0.5,
                sort_per_game=False, num_players=25, markdown=False):
    roster = report.rosters
    roster["net"] = compute_plus_minus(roster,
                                       g_weight=goal_weight,
                                       a_weight=assist_weight,
                                       d_weight=d_weight,
                                       turn_weight=turn_weight)

    # Compute the total number of games played per team, for normalization purposes
    matches = report.match_results.drop_duplicates(subset=["Team", "url"])
    matches["Team Games Played"] = 1
    matches["Team Points Played"] = matches["Score"] + matches["Opp Score"]
    matches = matches[matches["Gs"] > 0] \
        .rename(columns={"Score": "Team Score",
                         "Opp Score": "Team Opp Score",
                        })
    matches = matches.groupby("Team")[["Team Games Played", "Team Points Played",
                                       "Team Score", "Team Opp Score"]].sum()
    roster = roster.join(matches, on="Team")
    roster["net per Game"] = roster["net"] / roster["Team Games Played"]
    roster["#Games"] = roster["Team Games Played"]

    # if args.keep_teams:
    #   roster = roster.loc[roster["Team"].isin(args.keep_teams)].copy()
    # if args.skip_teams:
    #   roster = roster.loc[~roster["Team"].isin(args.skip_teams)].copy()

    # Sort by +/-
    sort_column = "net per Game" if sort_per_game else "net"
    res = (roster.sort_values(sort_column, ascending=False)
                 .reset_index(drop=True)
                 .head(num_players)
                 [["Name", "Team",
                   "Goals", "Assists", "Ds", "Turns",
                   "net", "net per Game", "#Games"]]
                 .rename(columns={"Goals": "Gs", "Assists": "As", "Turns": "Ts",
                                  "net per Game": "net/g"})
          )
    #     .style \
    #     .bar(subset=['Fantasy Score', 'Goals', 'Ds', '+/-'],
    #          color='rgba(80, 200, 100, 0.5)') \
    #     .bar(subset=['Assists', 'Turns'],
    #          color='rgba(200, 80, 80, 0.5)')

    # if args.bold_teams:
    #   res.loc[res["Team"].isin(args.bold_teams), "Team"] = \
    #       res["Team"].apply(lambda x: "**" + x + "**")

    print("{event} {gender} ({year})"
          .format(year=report.year, event=report, gender=report.gender))
    if markdown:
      with pd.option_context('display.float_format', lambda x: "%.2f" % x):
        print(usau.markdown.pandas_to_markdown(res))
    else:
      with pd.option_context('display.width', 200, 'display.max_columns', 50,
                             'display.max_rows', 200, 'display.precision', 2):
        display(res)
    return res

Displaying the


In [7]:
m2018stats = top_n_stats(m2018, markdown=False, num_players=150)


USAUResults<2018_d1college_nationals_men> men (2018)
Name Team Gs As Ds Ts net net/g #Games
0 Matthew Cullom Georgetown 16 13 8 13 30.5 6.10 5
1 John Randolph Brown 19 8 2 8 25.0 5.00 5
2 Tannor Johnson Massachusetts 9 15 5 8 25.0 5.00 5
3 Dylan Villeneuve Brown 10 8 7 6 22.0 4.40 5
4 Steven Benaloh Washington 6 21 0 10 22.0 4.40 5
5 Michael Ing Pittsburgh 13 5 5 3 21.5 5.38 4
6 Gus Norrbom William & Mary 7 20 4 21 20.5 4.10 5
7 Mac Hecht Brown 5 17 2 9 19.5 3.90 5
8 Christian Boxley Georgetown 11 9 2 6 19.0 3.80 5
9 Wyatt Mekler Minnesota 8 12 1 4 19.0 3.80 5
10 Max Moore Northwestern 14 6 1 5 18.5 3.70 5
11 Jeffrey Holm Northwestern 4 18 5 17 18.5 3.70 5
12 Stephen Muir Florida State 13 4 3 4 18.0 3.60 5
13 Jay Valdillez Northwestern 13 6 5 12 18.0 3.60 5
14 Kyle Rutledge Northwestern 4 11 4 2 18.0 3.60 5
15 Solomon Rueschemeyer-Bailey Brown 5 10 3 2 17.0 3.40 5
16 Christopher Bohr Connecticut 8 7 4 5 16.5 4.12 4
17 Nicholas Vogt Wisconsin 14 3 2 6 16.0 3.20 5
18 Robert Alongi Auburn 3 6 8 3 15.5 3.88 4
19 Nicholas Roberts Washington 6 10 2 6 15.0 3.00 5
20 Kevin Tien Stanford 6 6 6 7 14.5 2.90 5
21 Craig Anderson Florida State 8 10 1 10 14.0 2.80 5
22 Brett Gramann Massachusetts 4 7 7 8 14.0 2.80 5
23 Michael Becich Stanford 13 1 2 4 14.0 2.80 5
24 Noah Chambers Texas 3 10 3 4 14.0 2.80 5
25 Eric C Taylor Carleton College 6 6 3 3 13.5 3.38 4
26 Manny Eckert Washington 6 9 1 5 13.5 2.70 5
27 Kellen Gray Florida State 3 12 2 7 13.5 2.70 5
28 Jakob Steen Washington 13 1 0 1 13.5 2.70 5
29 Thomas Gallagher Wisconsin 1 12 2 3 13.5 2.70 5
30 Brian Gfroerer Texas 4 9 4 7 13.5 2.70 5
31 John Walden Maryland 3 17 3 19 13.5 3.38 4
32 Xander Cuizon Tice Oregon 10 2 2 1 13.5 3.38 4
33 Eddie Scott Massachusetts 13 2 0 3 13.5 2.70 5
34 Dylan Best Pittsburgh 3 11 2 6 13.0 3.25 4
35 Matthew Cook Georgia 9 3 3 4 13.0 2.60 5
36 Elijah Long North Carolina 4 8 2 2 13.0 3.25 4
37 Drew Mathieson Stanford 7 7 1 5 12.5 2.50 5
38 Jake Radack Massachusetts 4 9 2 5 12.5 2.50 5
39 John Langstaff Georgia 8 11 3 19 12.5 2.50 5
40 Ryan Cooper William & Mary 6 1 5 0 12.0 2.40 5
41 Leandro Marx Oregon 4 4 6 4 12.0 3.00 4
42 Gabe Westergren William & Mary 5 9 3 10 12.0 2.40 5
43 Reese Bowman Texas 5 8 4 10 12.0 2.40 5
44 Chris Wilen Wisconsin 2 8 5 6 12.0 2.40 5
45 Maximilian Cohen-Casado Georgetown 3 12 3 13 11.5 2.30 5
46 Matthew Gouchoe-Hanas North Carolina 8 4 1 3 11.5 2.88 4
47 Anthony Bernard-Sasges Georgetown 3 8 4 8 11.0 2.20 5
48 Alex Olson Carleton College 5 6 1 2 11.0 2.75 4
49 Joshua Venegas Northwestern 6 2 4 2 11.0 2.20 5
50 Dillon Lanier Carleton College 5 8 0 4 11.0 2.75 4
51 Rudra Menon Maryland 1 8 5 6 11.0 2.75 4
52 Patrick Church Victoria 4 6 4 6 11.0 2.75 4
53 Joe White Carleton College 5 6 4 8 11.0 2.75 4
54 Adam Rees Oregon 3 5 5 4 11.0 2.75 4
55 Mason Cary Georgia 10 3 0 4 11.0 2.20 5
56 Cole Wallin Minnesota 8 4 1 4 11.0 2.20 5
57 Patrick Barron Massachusetts 4 6 3 4 11.0 2.20 5
58 Kevin Tsui Pittsburgh 7 2 2 0 11.0 2.75 4
59 Luke Simerly Texas 4 7 2 4 11.0 2.20 5
60 Lucas Chen Washington 4 7 1 2 11.0 2.20 5
61 Reed Hendrickson Washington 5 3 7 8 11.0 2.20 5
62 Derek Mourad Washington 3 9 2 6 11.0 2.20 5
63 Eli Motycka Brown 1 8 3 3 10.5 2.10 5
64 Nathaniel Dick Brown 5 7 0 3 10.5 2.10 5
65 Sam Batson Georgia 5 8 1 7 10.5 2.10 5
66 Porter Jones Washington 6 5 2 5 10.5 2.10 5
67 Robert Larsen Florida State 11 0 1 4 10.0 2.00 5
68 Scott Moore Florida State 5 11 1 14 10.0 2.00 5
69 Marcus Rovner North Carolina 5 1 4 0 10.0 2.50 4
70 Nick Macleod North Carolina 5 3 2 0 10.0 2.50 4
71 Jonah Wisch Pittsburgh 4 9 3 12 10.0 2.50 4
72 John Kern Florida State 7 6 3 12 10.0 2.00 5
73 Luke Webb Carleton College 5 2 4 2 10.0 2.50 4
74 Noah Robinson Pittsburgh 5 3 2 1 9.5 2.38 4
75 Allan Ndovu Stanford 4 1 6 3 9.5 1.90 5
76 Carl Lasker William & Mary 11 0 0 3 9.5 1.90 5
77 Jack Staples Massachusetts 4 4 2 1 9.5 1.90 5
78 SOLOMON Maerowitz-McMahan Massachusetts 6 5 2 7 9.5 1.90 5
79 Wystan Duhn Minnesota 4 6 1 4 9.0 1.80 5
80 Harrison Wolff Landau Carleton College 6 2 1 0 9.0 2.25 4
81 Kerry Athey Oregon 4 2 3 0 9.0 2.25 4
82 Drew Di Francesco Georgia 1 2 11 10 9.0 1.80 5
83 Leo Warren Pittsburgh 1 8 3 6 9.0 2.25 4
84 Peter Johnson Washington 9 0 0 0 9.0 1.80 5
85 Anders Juengst North Carolina 5 5 0 2 9.0 2.25 4
86 Jeremy Hess Maryland 6 0 4 2 9.0 2.25 4
87 David Yu Wisconsin 6 5 3 10 9.0 1.80 5
88 Devon Thomson Victoria 8 2 1 5 8.5 2.12 4
89 Jason Jones Georgia 3 7 5 13 8.5 1.70 5
90 Solomon Yanuck Carleton College 3 3 4 3 8.5 2.12 4
91 Ken Noh Brown 5 6 1 7 8.5 1.70 5
92 Lee Martel Connecticut 7 1 1 2 8.0 2.00 4
93 Lukas Ambrose Oregon 7 0 2 2 8.0 2.00 4
94 Samuel Besse Maryland 6 0 3 2 8.0 2.00 4
95 Will Lohre Oregon 6 3 1 4 8.0 2.00 4
96 Moussa Dia William & Mary 8 2 4 12 8.0 1.60 5
97 John Tan Wisconsin 7 0 2 3 7.5 1.50 5
98 Matthew Straus William & Mary 2 6 1 3 7.5 1.50 5
99 Matthew Hanna Pittsburgh 5 0 3 1 7.5 1.88 4
100 Stanley Birdsong Carleton College 5 2 2 3 7.5 1.88 4
101 Jimmy Alderisio Maryland 9 0 0 3 7.5 1.88 4
102 Nicholas Hirning Stanford 2 6 4 9 7.5 1.50 5
103 Colby Chuck Oregon 2 5 3 5 7.5 1.88 4
104 Cole Jurek Minnesota 6 2 0 2 7.0 1.40 5
105 Andrew Everts Wisconsin 1 4 2 0 7.0 1.40 5
106 Chris Padilla Carleton College 1 4 2 0 7.0 1.75 4
107 Dillon Tranquillo Pittsburgh 4 0 4 2 7.0 1.75 4
108 Eugene L'Heureux Massachusetts 3 3 2 2 7.0 1.40 5
109 Colton Clark Oregon 0 7 1 3 6.5 1.62 4
110 Brian Street Texas 3 3 2 3 6.5 1.30 5
111 Tristan Van De Moortele Minnesota 4 2 2 3 6.5 1.30 5
112 Eric Sjostrom Auburn 0 11 4 17 6.5 1.62 4
113 Alex Liu Brown 5 0 2 1 6.5 1.30 5
114 Max Wolk Wisconsin 4 1 2 1 6.5 1.30 5
115 Will Hoffenkamp Pittsburgh 3 4 2 5 6.5 1.62 4
116 Sam Pastor Texas 3 2 2 1 6.5 1.30 5
117 Jared Scheinberg Massachusetts 3 2 2 1 6.5 1.30 5
118 Connor Matthews Oregon 3 3 2 3 6.5 1.62 4
119 David Odea Carleton College 1 5 1 1 6.5 1.62 4
120 Sam Kaminsky Minnesota 1 5 2 3 6.5 1.30 5
121 Henry Furuta Texas 3 4 3 8 6.0 1.20 5
122 Shane Heath Texas 6 2 0 4 6.0 1.20 5
123 Nathan Kwon North Carolina 2 3 1 0 6.0 1.50 4
124 Matthew Armour Texas 7 0 0 2 6.0 1.20 5
125 Noah Kregenow Washington 2 2 3 2 6.0 1.20 5
126 John McDonnell North Carolina 2 2 2 0 6.0 1.50 4
127 Justin Pettenuzzo Victoria 4 2 1 2 6.0 1.50 4
128 Dan Goldstein Pittsburgh 1 4 2 2 6.0 1.50 4
129 Ian Hahn Wisconsin 2 5 6 14 6.0 1.20 5
130 Dawson Pasin Victoria 5 1 1 2 6.0 1.50 4
131 Norman Archer North Carolina 1 3 2 0 6.0 1.50 4
132 John Roorbach Georgia 1 1 4 0 6.0 1.20 5
133 Kyle Hartley Pittsburgh 2 2 6 8 6.0 1.50 4
134 Noah Stuart Oregon 3 4 0 3 5.5 1.38 4
135 Jeff Maskalunas Wisconsin 3 3 2 5 5.5 1.10 5
136 Vinay Valsaraj Texas 0 3 3 1 5.5 1.10 5
137 Azeez Adeyemi Brown 2 1 4 3 5.5 1.10 5
138 Ethan Bloodworth Carleton College 1 4 2 3 5.5 1.38 4
139 Matt Wattendorf William & Mary 4 2 2 5 5.5 1.10 5
140 John Buchholz William & Mary 3 1 2 1 5.5 1.10 5
141 Christopher Bernard Maryland 4 2 3 7 5.5 1.38 4
142 Logan Willits Georgetown 1 3 3 3 5.5 1.10 5
143 Maximilian Landa Washington 2 1 3 1 5.5 1.10 5
144 Alexander Donadio Massachusetts 0 3 3 1 5.5 1.10 5
145 Sam Smith Auburn 4 2 1 3 5.5 1.38 4
146 Luke Smith Auburn 3 5 1 7 5.5 1.38 4
147 Nathan Getz Connecticut 2 4 1 3 5.5 1.38 4
148 James Hershey Auburn 4 2 0 1 5.5 1.38 4
149 Tim Lootens Florida State 0 6 3 7 5.5 1.10 5

In [8]:
w2018stats = top_n_stats(w2018, markdown=False, num_players=150)


USAUResults<2018_d1college_nationals_women> women (2018)
Name Team Gs As Ds Ts net net/g #Games
0 Qing (Jenny) Wei North Carolina 16 14 18 16 40.0 8.00 5
1 Amy Stoddard Michigan 18 6 11 8 31.0 6.20 5
2 Danielle Byers West Chester 18 18 12 35 30.5 6.10 5
3 Laura Gerencser Texas 13 14 8 9 30.5 7.62 4
4 Ashley Powell North Carolina State 4 33 6 27 29.5 5.90 5
5 Claire Trop Dartmouth 10 7 13 5 27.5 6.88 4
6 Cara Sieber Ohio State 6 12 13 9 26.5 5.30 5
7 Ella Hansen Oregon 8 25 8 29 26.5 5.30 5
8 Domenica Sutherland Texas 7 24 11 32 26.0 6.50 4
9 Jaclyn Verzuh Dartmouth 13 6 6 6 22.0 5.50 4
10 Hannah Crowley Tufts 20 3 2 7 21.5 4.30 5
11 Julianna Werffeli Dartmouth 5 15 3 4 21.0 5.25 4
12 Caitlyn Lee Dartmouth 9 13 6 14 21.0 5.25 4
13 Dena Elimelech California-San Diego 6 18 10 28 20.0 4.00 5
14 Carolyn Normile Pittsburgh 8 20 7 32 19.0 4.75 4
15 Bridget Mizener North Carolina 8 9 5 6 19.0 3.80 5
16 Liz Hart West Chester 15 6 1 6 19.0 3.80 5
17 Lindsay McKenna West Chester 10 26 9 53 18.5 3.70 5
18 Shayla Harris Stanford 7 5 9 5 18.5 4.62 4
19 Bridget Connor Stanford 9 6 2 1 16.5 4.12 4
20 Phoebe Hopp Michigan 8 3 7 4 16.0 3.20 5
21 Leanne Go California-San Diego 10 9 1 8 16.0 3.20 5
22 Morgan Caldwell Oregon 9 3 5 2 16.0 3.20 5
23 Sarah Russek Pittsburgh 9 5 5 7 15.5 3.88 4
24 Avery Jones California-San Diego 3 11 4 5 15.5 3.10 5
25 Kaitlyn Weaver California-Santa Barbara 6 10 10 21 15.5 3.10 5
26 Gabrielle Krajniak Florida 13 5 12 29 15.5 3.10 5
27 Lily Eisner Dartmouth 1 10 6 3 15.5 3.88 4
28 Ellen Au-Yeung British Columbia 6 10 3 7 15.5 3.10 5
29 Sadie Jezierski Ohio State 5 16 8 28 15.0 3.00 5
30 Emily Barrett Ohio State 12 0 3 1 14.5 2.90 5
31 Caitlin Go Stanford 8 7 4 10 14.0 3.50 4
32 Nariah-Belle Sims Carleton College 8 1 8 6 14.0 3.50 4
33 Michelle McGhee Stanford 5 7 7 10 14.0 3.50 4
34 Brittany Wright Michigan 4 9 9 17 13.5 2.70 5
35 Saioa Lostra Colorado 6 0 8 1 13.5 2.70 5
36 Maya Powell Carleton College 2 17 4 20 13.0 3.25 4
37 Naomi Morcilla British Columbia 6 7 6 12 13.0 2.60 5
38 Megan Henderson Colorado 9 8 1 10 13.0 2.60 5
39 Nicole Sun California-Santa Barbara 12 5 4 16 13.0 2.60 5
40 Corinn Pruitt Ohio State 9 3 6 11 12.5 2.50 5
41 Anika Thomas-Toth Carleton College 10 2 3 5 12.5 3.12 4
42 Purisa Simmons California-San Diego 8 2 3 1 12.5 2.50 5
43 Karen Ehrhardt Carleton College 6 7 2 5 12.5 3.12 4
44 Hayley Wahlroos Oregon 9 5 5 13 12.5 2.50 5
45 Julia Butterfield Stanford 5 7 6 12 12.0 3.00 4
46 Rachel Alfano West Chester 8 2 5 6 12.0 2.40 5
47 Becky Ellis North Carolina State 9 4 5 12 12.0 2.40 5
48 Megan Wilson Tufts 4 18 6 32 12.0 2.40 5
49 Claire Dunn Tufts 8 6 3 11 11.5 2.30 5
50 Charlotte Talham Florida 6 0 8 5 11.5 2.30 5
51 Nhi Nguyen Colorado 7 2 4 3 11.5 2.30 5
52 Rowan Jaynes North Carolina State 5 1 7 3 11.5 2.30 5
53 Ivy Harrison Texas 7 4 4 7 11.5 2.88 4
54 Natalie Clifton Oregon 7 4 1 2 11.0 2.20 5
55 Anne Worth North Carolina 4 6 3 5 10.5 2.10 5
56 Jessie Sun Pittsburgh 0 2 14 11 10.5 2.62 4
57 Rebecca Fagan North Carolina 9 5 0 7 10.5 2.10 5
58 Emily Fagan Oregon 8 3 1 3 10.5 2.10 5
59 Cameron Bryan Texas 6 1 5 4 10.0 2.50 4
60 Katiana Hutchinson Colorado 4 2 6 4 10.0 2.00 5
61 Brianne Wager British Columbia 2 8 7 14 10.0 2.00 5
62 Annelise Peters Ohio State 3 10 5 16 10.0 2.00 5
63 Mary Boyd Michigan 4 5 4 6 10.0 2.00 5
64 Shaelynn Davis Oregon 6 3 4 6 10.0 2.00 5
65 Carmen Tormey North Carolina State 7 7 2 12 10.0 2.00 5
66 Naomi Johnson British Columbia 5 5 2 4 10.0 2.00 5
67 Marissa Land Texas 6 4 3 7 9.5 2.38 4
68 Rachel Wilmoth Colorado 5 3 5 7 9.5 1.90 5
69 Leah Forester California-Santa Barbara 7 3 3 7 9.5 1.90 5
70 Margo Urheim Tufts 7 2 7 13 9.5 1.90 5
71 Kelsey Bennett Colorado 1 19 0 21 9.5 1.90 5
72 Jean Russell Colorado 3 7 5 12 9.0 1.80 5
73 Camille de Guzman Western Washington 5 2 2 0 9.0 1.80 5
74 Alissa Soo Whitman 7 6 3 14 9.0 2.25 4
75 Sarafina Angstadt-Leto Oregon 3 7 1 4 9.0 1.80 5
76 Hani Pajela California-Santa Barbara 4 10 6 22 9.0 1.80 5
77 Lien Nguyen Florida 6 2 2 2 9.0 1.80 5
78 Isabel Arevalo Carleton College 4 5 4 8 9.0 2.25 4
79 Alix Robbins North Carolina State 6 2 2 2 9.0 1.80 5
80 Ellen Jacobus Carleton College 5 0 5 3 8.5 2.12 4
81 Rebeca Ellis California-San Diego 4 6 5 13 8.5 1.70 5
82 Mackenzie Timbel Whitman 6 2 4 7 8.5 2.12 4
83 Connie Cui North Carolina 3 4 2 2 8.0 1.60 5
84 Mary Rippe North Carolina 7 2 2 6 8.0 1.60 5
85 Katie Schreiber Pittsburgh 6 1 4 6 8.0 2.00 4
86 Alora Reiff Ohio State 4 4 1 2 8.0 1.60 5
87 Emma Berrigan Texas 7 0 2 2 8.0 2.00 4
88 Cindy Li British Columbia 6 2 1 2 8.0 1.60 5
89 Alana Hall Western Washington 5 1 3 2 8.0 1.60 5
90 Mae Hardebeck Dartmouth 5 1 2 1 7.5 1.88 4
91 Kaitlyn Harper British Columbia 7 3 0 5 7.5 1.50 5
92 Christina Hanson Michigan 2 3 3 1 7.5 1.50 5
93 Miranda Kosowsky Pittsburgh 6 3 3 9 7.5 1.88 4
94 Julia Kwasnick California-Santa Barbara 4 7 8 24 7.0 1.40 5
95 Catherine Nansalo North Carolina State 3 1 3 0 7.0 1.40 5
96 Naomi Price-Lazarus Carleton College 3 7 3 13 6.5 1.62 4
97 Elisabeth Parker North Carolina 5 11 2 23 6.5 1.30 5
98 Pin-Hsuan Chen California-San Diego 7 1 2 7 6.5 1.30 5
99 Esther Au British Columbia 6 2 2 7 6.5 1.30 5
100 Jacqueline Hausle North Carolina State 5 0 2 1 6.5 1.30 5
101 Madison Tenney California-San Diego 5 2 1 3 6.5 1.30 5
102 Sarah Kratzer Stanford 3 3 1 1 6.5 1.62 4
103 Tova Breen Western Washington 6 2 1 5 6.5 1.30 5
104 Nina Janjic Michigan 0 6 9 17 6.5 1.30 5
105 Madison Brodahl Western Washington 5 1 2 3 6.5 1.30 5
106 Grace Denney Michigan 2 4 3 5 6.5 1.30 5
107 Macy Schelbert Western Washington 3 3 2 4 6.0 1.20 5
108 Madeleine Boyle Oregon 3 3 3 6 6.0 1.20 5
109 Amy Turner Oregon 4 1 1 0 6.0 1.20 5
110 Stacy Tran California-San Diego 5 1 2 4 6.0 1.20 5
111 Julia Zhang British Columbia 6 4 1 10 6.0 1.20 5
112 Linn Bjanes Pittsburgh 4 0 2 1 5.5 1.38 4
113 Serena Tam British Columbia 3 6 0 7 5.5 1.10 5
114 Gabrielle Aufderheide Oregon 2 6 3 11 5.5 1.10 5
115 Mei Zhang Cornell 5 2 1 5 5.5 1.10 5
116 Alexandra Diaz California-San Diego 5 1 0 1 5.5 1.10 5
117 Jaydra Rotolante Oregon 2 2 2 1 5.5 1.10 5
118 Ana Solberg North Carolina State 6 0 1 3 5.5 1.10 5
119 Rachel Hess Oregon 4 3 3 9 5.5 1.10 5
120 Valerie Willocq Tufts 0 8 3 11 5.5 1.10 5
121 Riley Swift Colorado 6 0 1 3 5.5 1.10 5
122 Mia Letterie Whitman 4 5 6 20 5.0 1.25 4
123 Courtney Testa Florida 3 13 8 38 5.0 1.00 5
124 Julia Zwierzynski North Carolina 2 1 5 6 5.0 1.00 5
125 Erika Neave North Carolina 1 3 2 2 5.0 1.00 5
126 Hannah Blizzard Pittsburgh 3 12 2 24 5.0 1.25 4
127 Vail Dark Western Washington 1 5 2 6 5.0 1.00 5
128 Madelyn Poehlein Whitman 1 1 4 2 5.0 1.25 4
129 Lilly Mendoza Cornell 2 4 6 14 5.0 1.00 5
130 Becky Nevin Colorado 3 4 2 8 5.0 1.00 5
131 Mikaela Leslie California-Santa Barbara 3 4 2 8 5.0 1.00 5
132 Kelli Iwamoto California-San Diego 4 5 1 11 4.5 0.90 5
133 Alana Chen Colorado 1 2 2 1 4.5 0.90 5
134 Nicole Kleinsorge Michigan 3 2 2 5 4.5 0.90 5
135 Maggie Adams North Carolina 4 1 1 3 4.5 0.90 5
136 Delaney Adams Western Washington 2 1 3 3 4.5 0.90 5
137 Mikayla Seaward Colorado 2 1 2 1 4.5 0.90 5
138 Emma Lindsay Western Washington 2 2 1 1 4.5 0.90 5
139 Emma Bushman Dartmouth 1 4 0 1 4.5 1.12 4
140 Maika Isogawa Stanford 5 0 2 5 4.5 1.12 4
141 Haley Grajewski Pittsburgh 3 2 2 5 4.5 1.12 4
142 Sara Zhang California-San Diego 3 2 2 5 4.5 0.90 5
143 Briana Campbell North Carolina State 6 5 4 22 4.0 0.80 5
144 Megan Gordon Michigan 3 1 1 2 4.0 0.80 5
145 Livia Amorosi Whitman 2 2 4 8 4.0 1.00 4
146 Audrey Brown California-Santa Barbara 5 1 6 16 4.0 0.80 5
147 Marissa Ray Michigan 3 2 1 4 4.0 0.80 5
148 Erica Ng Dartmouth 2 0 3 2 4.0 1.00 4
149 Emma Colavincenzo Ohio State 0 2 3 2 4.0 0.80 5

In [9]:
results = {}
for year in (2015, 2016, 2017, 2018):
    for gender in ("Men", "Women"):
        res = Results.from_event("d1college", year, gender)
        if year != 2018:
            res.load_from_csvs("../usau/data2")
        else:
            res.load_from_csvs()
        results[year, gender] = res

Goals to Assists


In [10]:
# Plot goals versus assists, labelling the top 20 performers of both genders
fig, ax = plt.subplots(figsize=(18, 11))
ax.plot(m2018stats.Gs, m2018stats.As, "o", color=sns_blue, **style_args)
ax.plot(w2018stats.Gs, w2018stats.As, "o", color=sns_red, **style_args)
ax.set_xlabel("Goals")
ax.set_ylabel("Assists")
ax.set_title("Goals versus Assists")
for _, row in m2018stats.head(20).iterrows():
  adjustment = 0.2
  ax.annotate(row["Name"], xy=(row["Gs"] + adjustment, row["As"] + adjustment),
              ha='left', va='center', rotation=30, wrap=True, color=sns_blue)
for _, row in w2018stats.head(20).iterrows():
  adjustment = 0.2
  ax.annotate(row["Name"], xy=(row["Gs"] + adjustment, row["As"] + adjustment),
              ha='left', va='center', rotation=30, wrap=True, color=sns_red)
ax.set_xlim(0)
ax.set_ylim(0)


Out[10]:
(0, 34.65)

In [11]:
m2018stats["Gender"] = "Men"
w2018stats["Gender"] = "Women"
stats2018 = pd.concat([m2018stats, w2018stats])

Assists to Turnovers


In [12]:
# Plot As versus turns, labelling the top values of both genders
# Using the top 500 players by fantasy (at least 2 scores/assists) to prune some of the null data
g = sns.lmplot("As", "Ts", stats2018.head(500), hue="Gender",
               size=12, palette={"Men": sns_blue, "Women": sns_red})
g.ax.set_title(u"Offensive Throwing Efficiency, ▲ = more turnovers")
for _, row in m2018stats[(m2018stats.As > 11) |
                         (m2018stats.Ts > 13)].iterrows():
  adjustment = 0.3
  xy = (row["As"] + adjustment, row["Ts"] + 0.8)
  g.ax.annotate(row["Name"], xy=xy,
                ha='left', va='center', rotation=30, wrap=True, color=sns_blue)
for _, row in w2018stats[(w2018stats.As > 11) |
                         (w2018stats.Ts > 16)].iterrows():
  adj = 0.3
  x = row["As"]
  y = row["Ts"]
  # Couple of special cases for people whose names are obscured
  if row["Name"] in ("Julia Kwasnick", "Kelsey Bennett", "Maya Powell", "Hannah Blizzard", "Qing (Jenny) Wei"):
    g.ax.annotate(row["Name"], xy=(x, y), xytext=(x + 1.0, y + 2.0),
                  arrowprops=dict(facecolor=sns_red, headwidth=6, headlength=8, width=2.0, alpha=0.3),
                  ha='left', va='center', rotation=30, wrap=True, color=sns_red)
  elif row["Name"] in ("Elisabeth Parker",):
    g.ax.annotate(row["Name"], xy=(x, y), xytext=(x + 0.5, y + 3.5),
                  arrowprops=dict(facecolor=sns_red, headwidth=6, headlength=8, width=2.0, alpha=0.3),
                  ha='left', va='center', rotation=30, wrap=True, color=sns_red)
  elif row["Name"] in ("Stephanie Williams",):
    g.ax.annotate(row["Name"], xy=(x, y), xytext=(x + 1.4, y),
                  arrowprops=dict(facecolor=sns_red, headwidth=6, headlength=8, width=2.0, alpha=0.3),
                  ha='left', va='center', rotation=30, wrap=True, color=sns_red)
  elif row["Name"] in ("Caitlyn Lee",):
    g.ax.annotate(row["Name"], xy=(x, y), xytext=(x + 1.4, y - 0.5),
                  arrowprops=dict(facecolor=sns_red, headwidth=6, headlength=8, width=2.0, alpha=0.3),
                  ha='left', va='center', rotation=30, wrap=True, color=sns_red)
  else:  
    g.ax.annotate(row["Name"], xy=(x + adj, y + adj - 0.4),
                  ha='left', va='center', rotation=30, wrap=True, color=sns_red)


Goals and Assists vs Blocks


In [13]:
# Plot goals+assists versus Ds, labelling the top 20 performers of both genders
fig, ax = plt.subplots(figsize=(18, 11))
ax.plot(m2018stats.Gs + m2018stats.As, m2018stats.Ds, "o", color=sns_blue, **style_args)
ax.plot(w2018stats.Gs + w2018stats.As, w2018stats.Ds, "o", color=sns_red, **style_args)
ax.set_xlabel("Goals + Assists")
ax.set_ylabel("Ds")
ax.set_title("Offensive versus Defensive work")
ax.set_ylim(0, 28)
for _, row in w2018stats[(w2018stats.Ds > 8) |
                         (w2018stats.Gs + w2018stats.As > 25)].iterrows():
  adjustment = 0.2
  x, y = row["Gs"] + row["As"], row["Ds"]
  color = sns_red
  ax.annotate(row["Name"], xy=(x + adjustment,y  + adjustment),
              ha='left', va='center', rotation=30, wrap=True, color=color)
for _, row in m2018stats[(m2018stats.Ds > 6) |
                         (m2018stats.Gs + m2018stats.As > 20)].iterrows():
  adjustment = 0.2
  x, y = row["Gs"] + row["As"], row["Ds"]
  color = sns_blue
  ax.annotate(row["Name"], xy=(x + adjustment,y  + adjustment),
              ha='left', va='center', rotation=30, wrap=True, color=color)



In [ ]: