course-network / degree-requirement-dag

3 stars 0 forks source link

Create network dataset #2

Open mintzj opened 5 years ago

mintzj commented 5 years ago

Parse course requirement text and create an edge dataset and vertex dataset. The vertex dataset contains all the information we know about each course (name, number). The edge dataset will contain all edges between nodes. The source node will be the prerequisite class and the target will be the course of interest. For now we won't worry about OR conditions, and treat all pre-requisites the same.

Example CS160 -> CS161

Example:

{
  "CS 162": "CS161"
}

will become something like this:

{
  "nodes": [
    {"id": "CS161", "group": 1},
    {"id": "CS162", "group": 1},
  ],
  "links": [
    {"source": "CS161", "target": "CS162", "value": 1}
  ]
}

An example data structure (JSON edge and vertex arrays) used for inputting graphical networks to D3 is available here, in the file data.json:

https://observablehq.com/@d3/force-directed-graph

wilsonia commented 5 years ago

This issue is addressed in PR 6. There is an intermediate Python object, as well as nodes and edges .csv files