March Mathness
First, let’s download all of the necessary files:
- Go to
- Under “departments” on the left side of the page, click on “school staff”.
- Click on “Smyth, Michael” (not Alex – couldn’t get that one to work).
- Click “File Manager”, then “March Mathness”, then “Download”
- Open up the file location (Hit the little file button on the start bar, then click downloads).
- This is a compressed folder, meaning that it has essentially been shrunken due to its size. So, we must make them full size again. Right click the file, select “Extract All”, and then “extract”.
- Now you have two files with the material – one is compressed (has a zipper or it) and one is not. We will work with the regular folder.
Next, we need to create an account on the Sage Math Cloud:
- Go to
- Create an account (Enter name, email and password).
- Enter the title of your project (March Mathness, or whatever you want to call it).
Now, upload the files:
- Click “create or upload files”
- Upload all four files (after clicking on one, you can click the upload “area” again and upload one at a time. Or, you can upload all four at one time by holding “ctrl” and clicking on all four.
- After uploading, click on “files” in the upper left hand corner, then our “primary” file, and we are good to go!
- To run a line, hold shift and click enter. When a little number pops up to the left of the command line, the command has been performed.
- This is an online platform, meaning that when you give it a command, the computer sends a message across the internet to a server (which is in either Oregon or Washington) of which then sends the action back. So, be patient – if there is a star in that space, wait. Don’t keep clicking it.
- You can go straight down through the command lines and run each thing. Each line through “Results2016.to_csv('BlankCSV.csv')” must be ran for this to work.
After running all lines:
- Go to “files” and click the checkbox for BlankCSV.
- Click “Download”.
- Open the file that you just downloaded (whether through the “file” process or from the bottom of the page.
- Click the column that contains “rating” at the top (the letter – should be I).
- Click “sort and filter” and “sort largest to smallest”. Also, click “expand the selection” and “sort”.
- Your ratings are now listed from greatest to smallest!
- Quick disclaimer: after doing this for awhile and downloading each file, you will end up downloading a lot of files. You may need to go in to “Downloads” on your computer and delete some of them.
Now for some definitions:
- FirstThird is that team’s rating for the first portion of the season (for us, we originally have it split into thirds).
- SecondThird is the second and third, and ThirdThird is, well, you get it.
- PointDif takes into account how many points a team won by in each game (i.e. their point differential).
- Rebound takes into account the teams’ rebounding margin (i.e. how many more rebounds they got (or didn’t get)) in comparison to their opponent.
- All of the GmCnts tell how many games were in each “third”. So, if you want to adjust this amount, you can within the code.
- Rating, of course, is the total rating taking into account all categories within our code.
In programming, there are things called parameters. Parameters are like inputs for a function (x for f(x)). We can change these parameters according to what we want.
- Where this matters for us is in the “weighing” function (the line that says:
- Results2016 = Weighing(0.30,0,0.20,0.25, 0.25, first16, second16, third16, pointdif16, rebounddif16, Teams2016); Results2016
- Each number corresponds to its category in order (0.30 corresponds to first16, 0.10 corresponds to second16, etc.).
- So, if we alter the “weights”, we alter the total affect that category has on the big picture.
- We can also alter the portion of the seasons (where FirstThird, SecondThird, and ThirdThird are split). If you would like to do that, let me know and I’ll show you where that is.