Skip to content

Instantly share code, notes, and snippets.

Matthew Bernhardt matt-bernhardt

Block or report user

Report or block matt-bernhardt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@matt-bernhardt
matt-bernhardt / crew_attendance_thru_160630.csv
Created Jun 30, 2016
Data and analysis scripts around Columbus Crew attendance
View crew_attendance_thru_160630.csv
ID Date Season Month GameNumber Hscore Ascore Visitor Venue Attendance Temperature
10992 4/13/1996 19:30 1996 4 1 4 0 D.C. United Ohio Stadium 25266 60
10993 4/20/1996 19:30 1996 4 2 1 2 Tampa Bay Mutiny Ohio Stadium 24343 66
10997 5/11/1996 19:30 1996 5 3 3 2 New England Revolution Ohio Stadium 24750 56
10999 5/19/1996 16:00 1996 5 4 2 4 Colorado Rapids Ohio Stadium 20184 78
11002 6/8/1996 13:30 1996 6 5 3 3 Sporting Kansas City Ohio Stadium 16526 67
11003 6/19/1996 19:30 1996 6 6 2 2 Colorado Rapids Ohio Stadium 13093 78
11006 6/30/1996 15:00 1996 6 7 0 4 New York Red Bulls Ohio Stadium 17261 84
11009 7/11/1996 19:30 1996 7 8 1 1 New England Revolution Ohio Stadium 13751 68
11010 7/20/1996 19:30 1996 7 9 3 4 San Jose Earthquakes Ohio Stadium 18156 67
@matt-bernhardt
matt-bernhardt / README.md
Last active May 8, 2016
Reconstructed Passing Chord Diagram
View README.md

This is an attempt to reconstruct the passing matrix for soccer players. It was originally developed by the MLS website, but then abandoned more than a year ago.

@matt-bernhardt
matt-bernhardt / wordpress-giving-widgets.wie
Created May 4, 2016
An exported widgets definition file produced by the Widget Importer & Exporter plugin.
View wordpress-giving-widgets.wie
{
"sidebar": {
"search-2": {
"title": ""
},
"recent-posts-2": {
"title": "",
"number": 5
},
"recent-comments-2": {
@matt-bernhardt
matt-bernhardt / powerpoint.html
Last active Oct 18, 2018
A sketch of the HTML output from PowerPoint, with changes to introduce event tracking from Google Analytics
View powerpoint.html
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='initial-scale = 1, minimum-scale = 1, maximum-scale = 1'/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@matt-bernhardt
matt-bernhardt / games.csv
Created Apr 24, 2016
Columbus Crew away games in MLS play (league and playoffs) under Gregg Berhalter
View games.csv
MatchDate Competition Opponent Crew OppScore Result Venue Surface Surface Type
3/8/2014 19:00 MLS League D.C. United 3 0 Win RFK Stadium Natural Grass Natural
3/29/2014 22:00 MLS League Seattle Sounders 2 1 Win CenturyLink Field FieldTurf Artificial
4/13/2014 15:00 MLS League San Jose Earthquakes 1 1 Draw Buck Shaw Stadium Natural Grass Natural
5/4/2014 16:00 MLS League Sporting Kansas City 0 2 Loss Sporting Park Natural Grass Natural
5/7/2014 20:00 MLS League Houston Dynamo 0 1 Loss BBVA Compass Stadium Natural Grass Natural
5/17/2014 22:30 MLS League Portland Timbers 3 3 Draw Providence Park FieldTurf Artificial
5/31/2014 17:00 MLS League Toronto FC 2 3 Loss BMO Field Natural Grass Natural
6/7/2014 18:30 MLS League D.C. United 0 0 Draw FedEx Field Natural Grass Natural
7/4/2014 21:30 MLS League Colorado Rapids 1 1 Draw Dick's Sporting Goods Park Natural Grass Natural
@matt-bernhardt
matt-bernhardt / composer.json
Last active Mar 21, 2016
Experiments with building out a Wordpress network via Composer
View composer.json
{
"name": "mjbernha/composer-wp",
"description": "Composer-deployed Wordpress",
"license": "GPL-2.0",
"authors": [
{
"name": "Matt Bernhardt",
"email": "mjbernha@mit.edu"
}
],
@matt-bernhardt
matt-bernhardt / analysis.R
Last active Mar 5, 2016
Data and analysis scripts for an article on repeatability of success in Major League Soccer. The published article describing this work has been published at http://www.massivereportdata.com/blog/2016/03/05/revisiting-the-repeatability-of-team-success/
View analysis.R
## Data preparation
# Read in data
data <- read.csv('data.csv')
# Convert Playoffs1 and Playoffs2 to ordered factor
data$Playoffs1 <- factor(data$Playoffs1, levels = c("Did Not Qualify", "Octofinals", "Quarterfinalist", "Semifinalist", "Finalist", "Champion"))
data$Playoffs2 <- factor(data$Playoffs2, levels = c("Did Not Qualify", "Octofinals", "Quarterfinalist", "Semifinalist", "Finalist", "Champion"))
# Add duplicate Year encoding as a factor
@matt-bernhardt
matt-bernhardt / empty-database.sh
Last active Mar 2, 2016
A bash script to delete all tables from a MySQL database. Useful when your user connection has rights only at the table level, so dropping and recreating the database itself isn't an option.
View empty-database.sh
#!/bin/bash
MUSER="$1"
MPASS="$2"
MDB="$3"
MHOST="$4"
# Detect paths
MYSQL=$(which mysql)
AWK=$(which awk)
GREP=$(which grep)
@matt-bernhardt
matt-bernhardt / 2016.csv
Last active Jan 8, 2016
2016 MLS League Schedule
View 2016.csv
Game Time Home Away Venue
Sunday, March 6, 2016 1:30PM EST New York Red Bulls Toronto FC Red Bull Arena
Sunday, March 6, 2016 2:00PM EST Orlando City Real Salt Lake Orlando Citrus Bowl
Sunday, March 6, 2016 2:00PM EST Chicago Fire New York City FC Toyota Park
Sunday, March 6, 2016 3:00PM EST FC Dallas Philadelphia Union Toyota Stadium
Sunday, March 6, 2016 3:00PM EST Houston Dynamo New England Revolution BBVA Compass Stadium
Sunday, March 6, 2016 3:00PM EST San Jose Earthquakes Colorado Rapids Avaya Stadium
Sunday, March 6, 2016 4:30PM EST Portland Timbers Columbus Crew SC Providence Park
Sunday, March 6, 2016 5:30PM EST Vancouver Whitecaps FC Montreal Impact BC Place
Sunday, March 6, 2016 7:00PM EST Seattle Sounders FC Sporting Kansas City CenturyLink Field
@matt-bernhardt
matt-bernhardt / README.md
Last active Dec 30, 2015
Dynamic Network Visualization
View README.md
You can’t perform that action at this time.