Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Frolic
Oct 21, 2005

Captain von Trapp posted:

After a really embarrassingly long time of coding, I wrote a Python script to convert the cfbstats.com files to the NCAA csv format. Please spot-check it to make sure I haven't borked the coding somewhere. Sadly it's just FBS. If someone finds this kind of data for FCS let me know and I'll include it as well. This is the result from cfbstats.com's data on their website now, which does not yet include this weekend's games. When it does I'll post that as well.


Thanks for this! The only difference I can find is that the ncaa csv didn't list FBS vs FCS twice. It would have an entry with FBS VS FCS but there wouldn't be a reverse entry FCS vs FBS like there is for FBS vs FBS. Hopefully that makes sense!

I was using that to figure out which teams were FBS/FCS.

But my program did load your list and do it's thing which is awesome. Came out pretty crazy though which I think will settle down with a little tweaking + a few more weeks data.

Adbot
ADBOT LOVES YOU

Frolic
Oct 21, 2005

Captain von Trapp posted:

Here's my quasi-clone of the old DIVISIONB.CSV file, this time in convenient Pastebin format: http://pastebin.com/A3SqYttG

Unfortunately I've been swamped so I haven't yet implemented the non-duplication of the FBS vs FCS games. With some luck I'll have that soon. When that happens I'll probably post both versions just in case someone's poll relies on this current format of mine. As usual, please everybody keep an eye out for machine readable FCS data. We still don't have a good source for that.

I went ahead and attempted to write something that takes in your .csv file and strips out the duplicate FBS vs FCS games. It loaded for me fine but if anyone finds somethings not working let me know and I will try to fix it. Available here : http://pastebin.com/UF3FArsv.

Frolic
Oct 21, 2005

Captain von Trapp posted:

Pastebin link for this week's DIVISIONB.CSV clone: http://pastebin.com/TU2WjEV1

Standard caveats apply: all games are listed twice - a line for A vs B and a line for B vs A. This is true for games involving FCS teams as well. I will fix this eventually.

Here is the data without duplicates for FCS if anyone needs it: http://pastebin.com/HvNN2sfN

If you want I can give you the code to remove the duplicates. What language is yours written in?

My rankings for this week :

quote:

1 Baylor
2 Oregon
3 Washington
4 Georgia Tech
5 Arizona
6 UCLA
7 Missouri
8 Wisconsin
9 Ohio State
10 Florida State
11 Clemson
12 LSU
13 Louisville
14 Maryland
15 Texas Tech
16 Miami Florida
17 Minnesota
18 Oklahoma
19 Alabama
20 Houston
21 Navy
22 Rutgers
23 Northwestern
24 Texas AM
25 Nebraska

Frolic fucked around with this message at 23:44 on Sep 22, 2013

Frolic
Oct 21, 2005

Captain von Trapp posted:

Python. Sure, I'd be interested in the code to remove the duplicates. I'll be happy to post my reader code too, but be warned I've managed to write basically unreadable Python which is quite the accomplishment.

My code is on github here under convert.py. I just made mine use my parsing to pull out a list of fbs teams then goes through the list one at a time and removing any where the one on the left isn't fbs.

If you wanted something that doesn't require using my loader/parsing/poo poo code you could probably do something like this if you pass it a list of the teams in fbs:

code:

def removeuplicates(fbs_teams):
  f = open('./olddivisionbhere.csv', 'rU')
  for line in f.readlines():
    line = "".join([c for c in line if isgood(c)or c =='/']).split(',')
    for t in fbs_teams:
      if line[1] == t:
        output.append(','.join(line))

  return output

My isgood() is just there so I didn't have to have to many or's. Looks like this:
code:

def isgood(c):
  if c ==',' or c==' ' or c== '-' or c.isalnum():
    return True
  else:
    return False

I would be interested in seeing your code. I'm new to python so it'd be interesting to see how someone else approached it.

Frolic fucked around with this message at 14:32 on Sep 23, 2013

  • Locked thread