Skip to content

Commit f6d943e

Browse files
Update documentation, write real README
1 parent 5e4e709 commit f6d943e

File tree

8 files changed

+1260
-40
lines changed

8 files changed

+1260
-40
lines changed

README.md

+31-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,31 @@
1-
![cs course graph](https://github.com/OrderFromChaos/classflow/blob/master/example.png)
1+
# CLASSFLOW
2+
### Help students plan their courses by generating flow maps of UC Riverside major paths.
3+
###### (Designed at [Cutie Hack 2018](https://www.cutiehack.io/).)
4+
5+
Course scheduling has frustrated me for a while. To think about your academic plans at a high level, you have to be aware of all of the classes available in your major and related majors, and the proscriptive guides given by the university usually say something like "if you're a major, be sure to take CS100" without it being clear what classes you need to do before getting there.
6+
7+
To deal with this before this project, I spent about an hour per major exhaustively searching all classes of a major on Banner (our course scheduler) and tying them together in [XMind](https://www.xmind.net/). You can see an example of this here with Computer Science:
8+
9+
![handmade cs course graph](https://github.com/OrderFromChaos/classflow/blob/master/handmade/compsci_v2.png)
10+
11+
While it looks nice (and deals with the frustrations mentioned above), it is an uphill battle to generate these. Each year, the department will usually shift courses around a little bit, and sometimes new courses will be added or fail to be offered that year. I wanted to come up with a robust way to create these based on new offerings each year.
12+
13+
We did it! [William Shiao](https://github.com/willshiao) made this repo's git submodule ucr-course-graph, which allows us to use JS to scan Banner for courses and their prerequisites, and I wrote a program using graphviz and dot to replicate the handmade results. See here:
14+
15+
![generated cs course graph](https://github.com/OrderFromChaos/classflow/blob/master/smallphys.png)
16+
17+
Some caveats:
18+
1. The data pull only worked properly for one quarter, so this ignores two quarters of series classes. This is why you only see Phys135A, for example. We're working on partnering with UCR IT and Special Projects to get limited access to the Banner database, and this repo will be updated accordingly as the project proceeds.
19+
2. Some prerequisites are "AND" groups, which means you have to complete each of them, and some are "OR" groups, which means you have the option of completing a couple different courses, each of which satisfy the requirements. This program deals with these by drawing dotted lines for the OR groups, and solid lines for the AND groups. You can see OR groups in the same node as a class.
20+
3. There is, of course, more graphic work to go. There are some fairly complicated rules I used as a human to make the chart nicer looking (ignore honors courses - assume people understand that, etc.), so these still need to be implemented. [You can track our progress on our Trello here](https://trello.com/b/R8BMbjK5).
21+
22+
Note that this system works quickly for generating large graphs - this combination of `{'PHYS','CS','MATH','ECON','BIOL'}` generated in about a second:
23+
24+
![{'PHYS','CS','MATH','ECON','BIOL'} graph](https://github.com/OrderFromChaos/classflow/blob/master/hugegraph.png)
25+
26+
Some extension ideas we have:
27+
1. Pull the UCR catalog for that year, and grab the prerequisites from it. Unfortunately, we can't guarantee the catalog will be regularly structured, but we did come up with a decent regex for this: `^[A-Z]{3,4}\s?[0-9]{3}[A-Z]?\s.+\n?.+\([12345]\)`
28+
2. Reduce graph crossing as much as possible. [This might be an NP-hard problem](https://cs.stackexchange.com/questions/14901/how-to-reduce-the-number-of-crossing-edges-in-a-diagram), or we could use other data, like when people tend to take classes (this would let us deal with series classes elegantly).
29+
3. Combine lecture and lab sections that are meant to be taken concurrently.
30+
31+
Thanks to everyone else who helped out in the project (G. Mata, J. Shin).

example.png

-806 KB
Binary file not shown.

generated/out

+1,224-36
Large diffs are not rendered by default.

generated/out.png

2.36 MB
Loading

handmade/compsci_v2.png

588 KB
Loading

hugegraph.png

2.4 MB
Loading

main.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@
44

55
### Hyperparameters
66
# The set of majors you want to draw a graph for.
7-
MAJOR = {'PHYS'}
7+
MAJOR = {'PHYS','CS','MATH','ECON','BIOL'}
88
SPECIALFLAG = None # If SPECIALFLAG is set to 'all' instead of None, you can get a graph of every class at UCR.
99

1010
# Whether to remove classes that aren't a part of the requested major and instead list them as prereqs under
1111
# the specific class box they're for.
12-
REMOVENONMAJOR = True
12+
REMOVENONMAJOR = False
13+
if REMOVENONMAJOR:
14+
assert len(MAJOR) <= 1
1315

1416
# Whether to remove 2xx+ (grad) classes
1517
REMOVEGRADCLASS = True
1618

1719
# Whether to color classes provided in the REQUIRED set.
1820
# REQUIRED classes are colored gold, else colored light blue.
19-
REQUIREMENTCOLOR = True
21+
REQUIREMENTCOLOR = False
2022
REQUIRED = {'PHYS039','MATH009A','MATH009B','MATH009C','CHEM001A',
2123
'CHEM001B','CHEM001C','CS010','MATH010A','MATH010B','MATH046',
2224
'PHYS041A','PHYS041B','PHYS041C','PHYS130A','PHYS130B','PHYS132',

smallphys.png

60.7 KB
Loading

0 commit comments

Comments
 (0)