UWFlow / rmc

Flow is a website that lets you plan courses with friends.
https://uwflow.com
MIT License
233 stars 73 forks source link

Question: is there an API I can use to query course difficulty? #243

Closed nathanv closed 8 years ago

nathanv commented 8 years ago

I'm trying to make a visualization that cross references current course enrolment for the current term vs # of tutors available (from University of Waterloo's Open Data) via course difficulty. I'd prefer not to screen scrape. Any way I can get the course difficulty data (api method)?

JGulbronson commented 8 years ago

Hey Nathan!

I thought we included course difficulty in the API already, though I could be wrong on that. I'll check tonight (Pacific time) whether or not we do, and if it turns out we don't I'll put in a fix for that ASAP.

Is that the only extra info you need?

JGulbronson commented 8 years ago

Sorry for not replying to this sooner, you can get course difficulty through the API, but I should've updated here regardless.

For example, a GET request to https://uwflow.com/api/v1/courses/cs135 will get back a response where the start looks like:

{
    "ratings": [
        {
            "count": 203,
            "rating": 0.9261083743842364,
            "name": "usefulness"
        },
        {
            "count": 232,
            "rating": 0.6853448275862069,
            "name": "easiness"
        },
        {
            "count": 270,
            "rating": 0.8777777777777778,
            "name": "interest"
        }
    ],

I'm assuming easiness is the metric you were hoping for?

nathanv commented 8 years ago

Awesome! found the api... https://github.com/UWFlow/rmc/blob/master/server/api/v1.py so I can figure out how it works now :).

nathanv commented 8 years ago

FYI... I'm using https://uwflow.com/api/v1/search/courses?count=500&sort_mode=easy&direction=1