Skip to content

Instantly share code, notes, and snippets.

View jtemplon's full-sized avatar

John Templon jtemplon

View GitHub Profile
@jtemplon
jtemplon / nba_owners_data.csv
Last active August 29, 2015 14:05
Winning percentages and other data for all active NBA owners through July 2014. Sources: HoopsHype.com and Basketball-Reference.com. Additional analysis by John Templon for BuzzFeed News. Article here: http://buzzfeed.com/johntemplon/heres-how-terrible-the-clippers-were-under-donald-sterling
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 15 columns, instead of 7. in line 9.
owner,team,team_code,seasons,playoff_appearances,wins_during_tenure,losses_during_tenure,wins_during_sterling,losses_during_sterling,playoffs_appearances_during_sterling,seasons_during_sterling,win_percentage_during_tenure,win_percentage_during_sterling,sterling_seasons_per_playoffs,more_than_five_seasons
Peter Holt,San Antonio,SAS,21,20,1146,528,1647,1011,29,33,0.684587814,0.619638826,1.1,1
Mark Cuban,Dallas,DAL,14,13,746,386,1375,1283,19,33,0.659010601,0.517306245,1.7,1
Robert Pera,Memphis,MEM,2,2,106,58,597,913,7,19,0.646341463,0.395364238,2.7,0
Robert Sarver,Phoenix,PHO,10,5,478,326,1521,1137,23,33,0.594527363,0.572234763,1.4,1
Micky Arison,Miami,MIA,19,16,880,630,1085,999,18,26,0.582781457,0.520633397,1.4,1
Paul Allen,Portland,POR,26,19,1171,913,1491,1167,25,33,0.561900192,0.560948081,1.3,1
Leslie Alexander,Houston,HOU,21,13,940,734,1451,1207,22,33,0.561529271,0.545899172,1.5,1
Jerry Reinsdorf,Chicago,CHI,29,22,1288,1042,1415,1243,23,33,0.5527897,0.532355154,1.4,1
Clay Bennett,Oklahoma City,OKC,8,5,345,2
def slugify(s):
"""Convert a string to a URL-friendly slug"""
slug = s.lower().strip()
slug = re.sub(r'[^a-zA-Z0-9\s]', '', slug)
slug = re.sub(r'\s+', '-', slug)
return slug

Keybase proof

I hereby claim:

  • I am jtemplon on github.
  • I am jtemplon (https://keybase.io/jtemplon) on keybase.
  • I have a public key ASDyiBYbmWpFIJOxRsUDOfq8e6R21WoY0O0Lk4ODCf4RYwo

To claim this, I am signing this object: