This is my first time doing a March Madness Bracket. I don't follow basketball - more of a Seahawks & Broncos fan. I had about an hour before the deadline to get my bracket together, and being a developer I decided to play to my strengths.
My bracket is based on 3 axioms:
- Any team is skilled enough to defeat any other. (Upsets are possible)
- You want the team with the most physical players. (Basketball is a physical game)
- A player's weight is mostly muscle. (I've never seen a fat basketball player)
Each player was given a physical score based on their weight divided by their height.
All the players scores were averaged to get a team score.
Team with the best score wins the matchup. ‘Best’ meaning the highest average weight to height ratio.
Building the Bracket:
We’re mostly a python shop so using requests and BeautifulSoup I built a simple crawler to scrape height and weight for all players and all teams in the NCAA. BeautifulSoup is *the* python tool to extract content, data, and pretty much anything on a webpage.
Then I used numpy to give each player a score and average all the players to determine team scores. Numpy is a very powerful scientific computing library. It's totally overkill for this project, but why not? There’s an office trophy at stake!
Now I had a score for each team based on the full team name, but I then ran into a problem.
The ESPN site has only abbreviations for teams and the team logos. I didn’t know enough to go from the abbreviations to the full team names. (Did I mention I don’t follow basketball?)
Luckily for me, ESPN put the logo next to each team. I scraped the bracket page for each logo/abbreviation combo, used google reverse image search and the ‘best guess’ to find the full team names.
This let me build the bracket based on the scores.
Bottom of the BrandVerity Group - and in ESPN’s 6.6 percentile. Very Bad.
The scoring method I used has a side effect - players who are shorter and weigh more score higher than taller, skinnier players.
Turns out shorter, thicker teams do poorly in basketball. Who knew?
If webcrawling, big data and machine learning sounds appealing, get in touch! We are looking for passionate people with diverse backgrounds.