Subitize

[SOO-bee-tahyz] (v.) - to rapidly, accurately, and confidently perceive the number of objects without counting

Introduction

The data used by Subitize is available in two forms: as a SQL dump on Github, and as a GET JSON endpoint that also supports queries. The endpoint is used by the app itself, and is available at:

/json

The parameters and the returned object are described below, with an example at the end.

Parameters

The JSON endpoint supports the following parameters. All other parameters are ignored:

Results

The endpoint returns a JSON object with the following structure:


    {
        "metadata": {
            "parameters": "query=computer+science", 
            "sorted": "semester"
        }, 
        "results": [...]
    }
    

metadata.parameters contains the GET parameters that generated the result, while metadata.sorted contains the field by which the results are sorted.

results contains the list of up to 200 search results as JSON objects. Each object has the following keys:

Example

All Computer Science courses taught by Justin Li during the Fall 2017 semester can be found by the following request:

/json?department=COMP&instructor=Justin Li&semester=201801

It results in the following response (ellipses inserted for readability where appropriate):


{
    "metadata":{
        "parameters":"department=COMP&instructor=Justin+Li&semester=201801",
        "sorted":"semester"
    },
    "results":[
        {
            "id":"201801_COMP_131_1",
            "semester":{
                "code":"201801",
                "year":2017
                "season":"Fall",
            },
            "department":{
                "code":"COMP",
                "name":"Computer Science"
            },
            "number":{
                "number":131,
                "string":"131"
            },
            "section":"1",
            "title":"Fundamentals of Computer Science",
            "units":4,
            "instructors":[
                {
                    "system_name":"Justin Li"
                    "first_name":"Justin",
                    "last_name":"Li",
                },
                ...
            ],
            "meetings":[
                {
                    "building":{
                        "code":"MOSHER",
                        "name":"Norris/Mosher Hall"
                    },
                    "room":"3",
                    "weekdays":{
                        "codes":"MWF",
                        "names":"Monday, Wednesday, Friday"
                    },
                    "us_start_time":"9:35am",
                    "us_end_time":"10:30am"
                    "iso_start_time":"09:35",
                    "iso_end_time":"10:30",
                },
                ...
            ],
            "cores":[
                {
                    "code":"CPLS",
                    "name":"Core Laboratory Science"
                },
                ...
            ],
            "info":{
                "description":"...",
                "prerequisites":null,
                "corequisites":"COMP 131L ",
                "url":"..."
            },
            "num_seats":30
            "num_reserved":7,
            "num_reserved_open":0,
            "num_enrolled":31
            "num_waitlisted":0
        },
        ...
    ]
}