In [1]:
import usau.reports
import usau.fantasy
import usau.markdown

In [2]:
from IPython.display import display, HTML
import pandas as pd
pd.options.display.width = 200
pd.options.display.max_colwidth = 200
pd.options.display.max_columns = 200

%matplotlib inline
import matplotlib.pyplot as plt
import seaborn as sns

In [3]:
# Read data from csv files
usau.reports.club_nats_men_2016.load_from_csvs()
usau.reports.club_nats_mixed_2016.load_from_csvs()
usau.reports.club_nats_women_2016.load_from_csvs()
None  # No output

In [4]:
mens = usau.reports.club_nats_men_2016.rosters
mixed = usau.reports.club_nats_mixed_2016.rosters
womens = usau.reports.club_nats_women_2016.rosters

def compute_plus_minus(df, g_weight=1, a_weight=1, d_weight=1, turn_weight=-1):
  return g_weight * df["Goals"] + a_weight * df["Assists"] + d_weight * df["Ds"] + turn_weight * df["Turns"]
mens["+/-"] = compute_plus_minus(mens)
mixed["+/-"] = compute_plus_minus(mixed)
womens["+/-"] = compute_plus_minus(womens)

In [5]:
mens_res = mens.sort_values("+/-", ascending=False).reset_index(drop=True).head(50) \
    [["No.", "Name", "Team", "Goals", "Assists", "Ds", "Turns", "+/-"]] \
    .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)')
mens_res


Out[5]:
No. Name Team Goals Assists Ds Turns +/-
0 42 Ben Lohre Johnny Bravo 21 9 0 0 30
1 3 Kurt Gibson Ironside 9 25 3 9 28
2 2 Jay Froude Prairie Fire 16 11 3 7 23
3 5 Dillon Larberg H.I.P 17 6 6 9 20
4 16 Jeffrey Babbitt Dig 20 2 3 5 20
5 23 Jimmy Mickle Johnny Bravo 8 25 6 20 19
6 6 Andre Gailits Furious George 7 12 6 7 18
7 31 Kai Marshall H.I.P 5 7 6 2 16
8 4 Joel Schlachet Revolver 14 5 0 3 16
9 28 Jack Williams Ring of Fire 12 5 2 4 15
10 34 Jesse Buchsbaum Chicago Machine 12 9 1 7 15
11 27 Jake Rainwater Patrol 14 3 3 5 15
12 21 Jeff Graham Ironside 13 4 0 3 14
13 24 Joe Sefton Sockeye 10 7 1 4 14
14 13 Dalton Smith H.I.P 12 10 3 11 14
15 16 Kevin Coulter HIGH FIVE 7 3 4 0 14
16 24 Rory Orloff Doublewide 10 1 3 1 13
17 1 Simon Higgins Revolver 9 5 0 1 13
18 1 Joshua Markette Ironside 5 10 1 3 13
19 13 Alex Evangelides Chicago Machine 5 4 4 0 13
20 14 John Stubbs Ironside 12 4 0 3 13
21 2 Matthew Bennett H.I.P 4 31 9 32 12
22 9 Jones Clemons Prairie Fire 3 18 2 11 12
23 25 Ross Barker Madison Club 13 0 1 2 12
24 19 Ethan Pollack Doublewide 9 2 3 2 12
25 3 Jon Cox PoNY 11 2 1 2 12
26 32 Colin Camp Madison Club 9 6 0 4 11
27 55 Pawel Janas Chicago Machine 6 8 1 4 11
28 17 Zane Rankin Sockeye 7 8 2 6 11
29 28 Nathan White Revolver 3 5 4 1 11
30 15 Kevin Norton PoNY 5 10 1 5 11
31 5 Simon Montague Sockeye 7 8 3 7 11
32 26 Grant Lindsley Revolver 7 5 0 2 10
33 16 Tim Tsang Furious George 6 19 3 18 10
34 73 Benjamin Burelle Furious George 7 2 3 2 10
35 3 Mario O'Brien Sockeye 3 5 4 2 10
36 6 Matt Jackson Prairie Fire 17 9 4 20 10
37 9 Cassidy Rasmussen Revolver 3 10 5 8 10
38 22 Stanley Peterson Johnny Bravo 6 4 1 1 10
39 8 Morgan Hibbert Furious George 3 7 3 3 10
40 34 Henry Konker Johnny Bravo 2 6 4 2 10
41 18 William Sickles Patrol 12 9 1 12 10
42 81 Sean Mott Patrol 7 7 1 5 10
43 4 Delrico Johnson Truck Stop 2 2 6 0 10
44 9 Tom Doi Truck Stop 10 2 3 5 10
45 24 Noah Saul Ring of Fire 7 12 2 11 10
46 8 Jesse Wohl HIGH FIVE 9 0 3 2 10
47 15 Connor Haley HIGH FIVE 3 3 4 0 10
48 18 Daniel Emmons Doublewide 11 4 3 8 10
49 91 Vincent Reydams Patrol 9 1 0 0 10

In [6]:
mixed_res = mixed.sort_values("+/-", ascending=False).reset_index(drop=True).head(50) \
    [["No.", "Name", "Team", "Goals", "Assists", "Ds", "Turns", "+/-"]] \
    .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)')
mixed_res


Out[6]:
No. Name Team Goals Assists Ds Turns +/-
0 33 Graham Brayshaw No Touching! 18 10 5 7 26
1 21 Andrew Allen Ambiguous Grey 19 10 8 12 25
2 4 John Howell Public Enemy 10 7 8 5 20
3 11 Barrs Lang Blackbird 8 7 14 10 19
4 1 Joshua Layton G-Unit 7 10 7 6 18
5 11 Ben Katz Slow White 8 5 8 3 18
6 34 Evan Boucher Mischief 9 15 2 9 17
7 42 Samantha Valesano No Touching! 20 9 7 19 17
8 5 Eric Alexander NOISE 18 4 3 9 16
9 25 Nicholas Snuszka shame. 10 6 4 5 15
10 6 Chris Mazur Metro North 6 20 6 17 15
11 16 Brian Schoenrock Drag'n Thrust 6 5 5 2 14
12 20 Jimmy James Mcdonald No Touching! 8 1 8 3 14
13 55 Todd Herman Slow White 14 1 3 4 14
14 14 Jade McLaughlin shame. 10 7 5 8 14
15 24 Alexander Thomas Alloy 11 0 5 2 14
16 6 Chris Pleshek Public Enemy 9 5 10 10 14
17 9 Jennifer Cogburn Seattle Mixtape 7 0 10 3 14
18 18 Jed Farber Alloy 11 25 5 28 13
19 22 Evan Klein Seattle Mixtape 5 9 9 10 13
20 59 Bryan Bernard Alloy 8 6 7 9 12
21 35 Sarah Anciaux Drag'n Thrust 7 3 8 6 12
22 2 Nancy Haskell Steamboat 15 3 4 10 12
23 5 Luke Ryan AMP 10 1 3 2 12
24 77 Daniel Khoe Steamboat 1 9 7 5 12
25 99 Timothy Gilligan Blackbird 8 7 6 10 11
26 11 Jacob Dummeldinger G-Unit 9 4 3 5 11
27 3 Nick Purifico AMP 7 4 4 4 11
28 13 Dan Patisteas Slow White 4 4 4 1 11
29 12 Christopher Waite Slow White 3 11 4 7 11
30 2 Corey Lee Blackbird 10 2 3 4 11
31 17 Kyle Khalifa Ambiguous Grey 8 3 3 3 11
32 7 David Shirley Drag'n Thrust 5 3 3 1 10
33 99 Khalif El-Salaam Seattle Mixtape 11 11 6 18 10
34 19 Mike Clark Drag'n Thrust 8 4 3 5 10
35 40 Mac Taylor Blackbird 14 11 7 22 10
36 10 Brian Carroll Love Tractor 3 3 7 3 10
37 2 Chris Hart Love Tractor 8 6 3 7 10
38 11 Megan Henderson Love Tractor 4 2 4 1 9
39 22 Brittany Winner Steamboat 11 5 4 11 9
40 64 Davis Whitehead Slow White 6 5 3 5 9
41 24 Zackary Fleming shame. 11 3 4 9 9
42 7 Daniel Bishop G-Unit 4 3 4 2 9
43 23 Camden Kittredge Love Tractor 4 3 5 3 9
44 9 Krystina Morris Public Enemy 8 0 5 4 9
45 38 Joe Mozloom Jr Steamboat 3 5 6 5 9
46 46 Austin Bonelli AMP 2 5 3 1 9
47 27 Christopher Powers Steamboat 6 10 3 10 9
48 3 ALANNA McKee Ambiguous Grey 6 1 7 5 9
49 20 Jenny Wang Mischief 7 0 2 1 8

In [7]:
womens_res = womens.sort_values("+/-", ascending=False).reset_index(drop=True).head(50) \
    [["No.", "Name", "Team", "Goals", "Assists", "Ds", "Turns", "+/-"]] \
    .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)')
womens_res


Out[7]:
No. Name Team Goals Assists Ds Turns +/-
0 37 Sandra Jorgensen Scandal 27 3 16 9 37
1 3 Liza Minor Heist 8 17 9 11 23
2 6 QING (Jenny) WEI Phoenix 13 7 10 8 22
3 20 Sophia Knowles Rival 25 9 8 21 21
4 7 Kami Groom Brute Squad 15 5 8 7 21
5 20 Danielle Walsh Green Means Go 14 7 7 10 18
6 44 Mira Walker Ozone 9 13 5 9 18
7 31 Sara Scott Rival 10 19 8 19 18
8 16 Sarah Levinn Showdown 16 4 1 4 17
9 6 Sarah Griffith Seattle Riot 7 4 8 3 16
10 20 Briana Cahn Nightlock 12 4 5 6 15
11 10 Ashlee Davison Traffic 5 2 20 12 15
12 15 Sydney Overman Showdown 13 6 2 6 15
13 2 Emily Lloyd Ozone 11 4 4 4 15
14 51 Claire Desmond Fury 7 7 4 3 15
15 11 Melissa Gibbs Heist 7 4 5 2 14
16 24 KATELYN Travaglini Phoenix 10 25 6 27 14
17 25 Shira Klane Brute Squad 2 7 8 3 14
18 22 Julia Schmaltz Showdown 6 4 6 4 12
19 19 Adrienne Lemberger Nightlock 5 5 5 4 11
20 7 Austin Prucha Heist 11 3 2 5 11
21 23 Sarah Lord Scandal 5 15 2 12 10
22 41 Sophie Dagenais Iris 14 0 5 9 10
23 19 Genevieve Dufresne Iris 9 6 2 7 10
24 90 Catherine Hui Traffic 9 9 8 16 10
25 71 Cassandra Wong Brute Squad 10 2 4 6 10
26 30 Jodi Mccloskey Rival 7 2 7 7 9
27 16 Kathryn Ritzmann Green Means Go 7 8 9 15 9
28 21 Chelsea Murphy Brute Squad 6 1 4 2 9
29 9 Marika Austin Fury 6 2 3 2 9
30 17 Kelly Wiese Heist 5 0 4 0 9
31 20 Collefas Mot Traffic 9 0 6 6 9
32 4 Marissa Hicks Ozone 10 0 3 4 9
33 7 Claire Sharman Nightlock 6 0 7 4 9
34 10 Shira Stern Seattle Riot 9 0 3 3 9
35 2 Melissa Archer Wildfire 8 1 3 3 9
36 7 Kimberly Beach Scandal 4 1 8 4 9
37 18 Caitlin Harley Rival 3 6 10 10 9
38 23 Lillian White Showdown 2 2 8 3 9
39 40 Amelia Cuarenta Heist 7 1 5 5 8
40 12 Mariel Hammond Phoenix 7 3 7 9 8
41 14 Theresa Zettner Rival 3 5 6 6 8
42 5 Yolanda Scarpati Green Means Go 4 7 1 4 8
43 28 Sally Lambert Molly Brown 6 2 1 1 8
44 52 Caitlin O'Connell Brute Squad 2 0 8 2 8
45 0 Erin Crider Wildfire 6 1 11 10 8
46 21 Jane Griffin Wildfire 12 2 2 8 8
47 12 Jasmine Draper-Matthew Heist 3 6 1 2 8
48 8 Rachel Bradshaw Seattle Riot 8 2 2 4 8
49 22 Theresa Hackett Scandal 8 1 1 2 8

In [8]:
print usau.markdown.pandas_to_markdown(mens_res.data.head(30))
print usau.markdown.pandas_to_markdown(mixed_res.data.head(30))
print usau.markdown.pandas_to_markdown(womens_res.data.head(30))


| No. |       Name       |      Team       | Goals | Assists | Ds | Turns | +/- |
| :-- | :--------------- | :-------------- | :---- | :------ | :- | :---- | :-- |
| 42  | Ben Lohre        | Johnny Bravo    | 21    | 9       | 0  | 0     | 30  |
| 3   | Kurt Gibson      | Ironside        | 9     | 25      | 3  | 9     | 28  |
| 2   | Jay Froude       | Prairie Fire    | 16    | 11      | 3  | 7     | 23  |
| 5   | Dillon Larberg   | H.I.P           | 17    | 6       | 6  | 9     | 20  |
| 16  | Jeffrey Babbitt  | Dig             | 20    | 2       | 3  | 5     | 20  |
| 23  | Jimmy Mickle     | Johnny Bravo    | 8     | 25      | 6  | 20    | 19  |
| 6   | Andre Gailits    | Furious George  | 7     | 12      | 6  | 7     | 18  |
| 31  | Kai Marshall     | H.I.P           | 5     | 7       | 6  | 2     | 16  |
| 4   | Joel Schlachet   | Revolver        | 14    | 5       | 0  | 3     | 16  |
| 28  | Jack Williams    | Ring of Fire    | 12    | 5       | 2  | 4     | 15  |
| 34  | Jesse Buchsbaum  | Chicago Machine | 12    | 9       | 1  | 7     | 15  |
| 27  | Jake Rainwater   | Patrol          | 14    | 3       | 3  | 5     | 15  |
| 21  | Jeff Graham      | Ironside        | 13    | 4       | 0  | 3     | 14  |
| 24  | Joe Sefton       | Sockeye         | 10    | 7       | 1  | 4     | 14  |
| 13  | Dalton Smith     | H.I.P           | 12    | 10      | 3  | 11    | 14  |
| 16  | Kevin Coulter    | HIGH FIVE       | 7     | 3       | 4  | 0     | 14  |
| 24  | Rory Orloff      | Doublewide      | 10    | 1       | 3  | 1     | 13  |
| 1   | Simon Higgins    | Revolver        | 9     | 5       | 0  | 1     | 13  |
| 1   | Joshua Markette  | Ironside        | 5     | 10      | 1  | 3     | 13  |
| 13  | Alex Evangelides | Chicago Machine | 5     | 4       | 4  | 0     | 13  |
| 14  | John Stubbs      | Ironside        | 12    | 4       | 0  | 3     | 13  |
| 2   | Matthew Bennett  | H.I.P           | 4     | 31      | 9  | 32    | 12  |
| 9   | Jones Clemons    | Prairie Fire    | 3     | 18      | 2  | 11    | 12  |
| 25  | Ross Barker      | Madison Club    | 13    | 0       | 1  | 2     | 12  |
| 19  | Ethan Pollack    | Doublewide      | 9     | 2       | 3  | 2     | 12  |
| 3   | Jon Cox          | PoNY            | 11    | 2       | 1  | 2     | 12  |
| 32  | Colin Camp       | Madison Club    | 9     | 6       | 0  | 4     | 11  |
| 55  | Pawel Janas      | Chicago Machine | 6     | 8       | 1  | 4     | 11  |
| 17  | Zane Rankin      | Sockeye         | 7     | 8       | 2  | 6     | 11  |
| 28  | Nathan White     | Revolver        | 3     | 5       | 4  | 1     | 11  |

| No. |         Name         |      Team       | Goals | Assists | Ds | Turns | +/- |
| :-- | :------------------- | :-------------- | :---- | :------ | :- | :---- | :-- |
| 33  | Graham Brayshaw      | No Touching!    | 18    | 10      | 5  | 7     | 26  |
| 21  | Andrew Allen         | Ambiguous Grey  | 19    | 10      | 8  | 12    | 25  |
| 4   | John Howell          | Public Enemy    | 10    | 7       | 8  | 5     | 20  |
| 11  | Barrs Lang           | Blackbird       | 8     | 7       | 14 | 10    | 19  |
| 1   | Joshua Layton        | G-Unit          | 7     | 10      | 7  | 6     | 18  |
| 11  | Ben Katz             | Slow White      | 8     | 5       | 8  | 3     | 18  |
| 34  | Evan Boucher         | Mischief        | 9     | 15      | 2  | 9     | 17  |
| 42  | Samantha Valesano    | No Touching!    | 20    | 9       | 7  | 19    | 17  |
| 5   | Eric Alexander       | NOISE           | 18    | 4       | 3  | 9     | 16  |
| 25  | Nicholas Snuszka     | shame.          | 10    | 6       | 4  | 5     | 15  |
| 6   | Chris Mazur          | Metro North     | 6     | 20      | 6  | 17    | 15  |
| 16  | Brian Schoenrock     | Drag'n Thrust   | 6     | 5       | 5  | 2     | 14  |
| 20  | Jimmy James Mcdonald | No Touching!    | 8     | 1       | 8  | 3     | 14  |
| 55  | Todd Herman          | Slow White      | 14    | 1       | 3  | 4     | 14  |
| 14  | Jade McLaughlin      | shame.          | 10    | 7       | 5  | 8     | 14  |
| 24  | Alexander Thomas     | Alloy           | 11    | 0       | 5  | 2     | 14  |
| 6   | Chris Pleshek        | Public Enemy    | 9     | 5       | 10 | 10    | 14  |
| 9   | Jennifer Cogburn     | Seattle Mixtape | 7     | 0       | 10 | 3     | 14  |
| 18  | Jed Farber           | Alloy           | 11    | 25      | 5  | 28    | 13  |
| 22  | Evan Klein           | Seattle Mixtape | 5     | 9       | 9  | 10    | 13  |
| 59  | Bryan Bernard        | Alloy           | 8     | 6       | 7  | 9     | 12  |
| 35  | Sarah Anciaux        | Drag'n Thrust   | 7     | 3       | 8  | 6     | 12  |
| 2   | Nancy Haskell        | Steamboat       | 15    | 3       | 4  | 10    | 12  |
| 5   | Luke Ryan            | AMP             | 10    | 1       | 3  | 2     | 12  |
| 77  | Daniel Khoe          | Steamboat       | 1     | 9       | 7  | 5     | 12  |
| 99  | Timothy Gilligan     | Blackbird       | 8     | 7       | 6  | 10    | 11  |
| 11  | Jacob Dummeldinger   | G-Unit          | 9     | 4       | 3  | 5     | 11  |
| 3   | Nick Purifico        | AMP             | 7     | 4       | 4  | 4     | 11  |
| 13  | Dan Patisteas        | Slow White      | 4     | 4       | 4  | 1     | 11  |
| 12  | Christopher Waite    | Slow White      | 3     | 11      | 4  | 7     | 11  |

| No. |        Name        |      Team      | Goals | Assists | Ds | Turns | +/- |
| :-- | :----------------- | :------------- | :---- | :------ | :- | :---- | :-- |
| 37  | Sandra Jorgensen   | Scandal        | 27    | 3       | 16 | 9     | 37  |
| 3   | Liza Minor         | Heist          | 8     | 17      | 9  | 11    | 23  |
| 6   | QING (Jenny) WEI   | Phoenix        | 13    | 7       | 10 | 8     | 22  |
| 20  | Sophia Knowles     | Rival          | 25    | 9       | 8  | 21    | 21  |
| 7   | Kami Groom         | Brute Squad    | 15    | 5       | 8  | 7     | 21  |
| 20  | Danielle Walsh     | Green Means Go | 14    | 7       | 7  | 10    | 18  |
| 44  | Mira Walker        | Ozone          | 9     | 13      | 5  | 9     | 18  |
| 31  | Sara Scott         | Rival          | 10    | 19      | 8  | 19    | 18  |
| 16  | Sarah Levinn       | Showdown       | 16    | 4       | 1  | 4     | 17  |
| 6   | Sarah Griffith     | Seattle Riot   | 7     | 4       | 8  | 3     | 16  |
| 20  | Briana Cahn        | Nightlock      | 12    | 4       | 5  | 6     | 15  |
| 10  | Ashlee Davison     | Traffic        | 5     | 2       | 20 | 12    | 15  |
| 15  | Sydney Overman     | Showdown       | 13    | 6       | 2  | 6     | 15  |
| 2   | Emily Lloyd        | Ozone          | 11    | 4       | 4  | 4     | 15  |
| 51  | Claire Desmond     | Fury           | 7     | 7       | 4  | 3     | 15  |
| 11  | Melissa Gibbs      | Heist          | 7     | 4       | 5  | 2     | 14  |
| 24  | KATELYN Travaglini | Phoenix        | 10    | 25      | 6  | 27    | 14  |
| 25  | Shira Klane        | Brute Squad    | 2     | 7       | 8  | 3     | 14  |
| 22  | Julia Schmaltz     | Showdown       | 6     | 4       | 6  | 4     | 12  |
| 19  | Adrienne Lemberger | Nightlock      | 5     | 5       | 5  | 4     | 11  |
| 7   | Austin Prucha      | Heist          | 11    | 3       | 2  | 5     | 11  |
| 23  | Sarah Lord         | Scandal        | 5     | 15      | 2  | 12    | 10  |
| 41  | Sophie Dagenais    | Iris           | 14    | 0       | 5  | 9     | 10  |
| 19  | Genevieve Dufresne | Iris           | 9     | 6       | 2  | 7     | 10  |
| 90  | Catherine Hui      | Traffic        | 9     | 9       | 8  | 16    | 10  |
| 71  | Cassandra Wong     | Brute Squad    | 10    | 2       | 4  | 6     | 10  |
| 30  | Jodi Mccloskey     | Rival          | 7     | 2       | 7  | 7     | 9   |
| 16  | Kathryn Ritzmann   | Green Means Go | 7     | 8       | 9  | 15    | 9   |
| 21  | Chelsea Murphy     | Brute Squad    | 6     | 1       | 4  | 2     | 9   |
| 9   | Marika Austin      | Fury           | 6     | 2       | 3  | 2     | 9   |


In [ ]: