-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Would be useful to visualize /quantify when most classes take place, and when most people are free.
A way to filter the most common classes as well.
Would be useful for planning the best times for events/workshops/etc. Would be able to see when ppl are most likely available without having to do surveys .
Graphs
Going to update this with more ideas while more ideas are thought of. Can be used later when making graphs.
Data Sets
- S_all : set of all classes
- S_common : set of "common" classes, ie. those required for major and ge
X-axis
- X_axis = minute 0 -> minute max (maybe 1 week? 5-days?)
- x = t = iterator of 5 minute increments
Y-axis
- Y_classes_in_session : number of classes in set S that are 'in session' at time t
- Y_students_in_session : sum of (number of students currently enrolled in (each class that is currently in session))
let x_axis be an iterator where t_next = t + 5
let class[start] be the start time of the class in minutes since t = 0
let class[end] be the end time of the class in minutes since t = 0
for each value t in x_axis :
classes_in_session[t] = {class ∈ (Set of all classes) such that (class[start] < t < class[end])}
y[t] 🡐 0
for each class in classes_in_session[t]:
y[t] 🡐 y[t] + class[students_enrolled]
Note that this does not account for students who didn't show up to class ;)
programs
There could be an Updater, which fetches the data from the API and saves it into a Json file with filename based on date/time, into a folder called cache
There could be another program called data pre proccessor, which does any intermediate calculations. It outputs a new file with the data in such a way that it can be used directly by the grapher.
File_renamer could be a program that generates a list of all the cache and data filenames, which could be used by the HTML file to determine where all the data is. This might be helpful because filenames would be based on date/times, and it will be hard to predict what the next one is called. (Alternatively, make the filenames easily predictable, like data1, data2, data3 ... , and save the timestamp in the content)
The graph.html can then simply load the prepared data, and display it.
how to use
One possibility is to just have the updater call the data proccessor directly.
./program <cache directory> <processed data directory>
Externally, you would just call the program and give the directory names where you want to store the output files (the filenames will be automatically generated).