3

Is there any good way/workaround to get disciplines and subfields hierarchy information?

For example, Optics is Sub discipline of Physics and it got subfields like Gemology, Optical physics. Which intern might have another child field of studies? enter image description here enter image description here

1 Answers1

1

First, get yourself a key to use the API using these instructions. Then use the Evaluate function to retrieve the fields of study. If you want to download the entire field graph use the query Ty='6', manipulating Evaluate's count and offset parameters as appropriate. If you have a specific field of study ID in hand (e.g. from a paper) use the query Id=xxx (where xxx is the field of study Id) to get details about it. If you have a collection of identifiers, you can fetch them all together using a query like Or(Id=xxx,Id=yyy,Id=zzz).

In either case you have to supply a list of attributes that you want returned by Evaluate. To get all the attributes, use Id,FN,DFN,CC,ECC,FL,FP,FC. The list of field names and contents is here in the documentation.

Addressing your question directly, FP and FC list the parent and children fields of study. Note that both fields are lists. This is because the structure is a directed graph, not a tree. Surprisingly, there are cycles in the graph, so don't go traversing recursively without checking for revisits!

You can play with the Evaluate API here without having to write any code.

Example:

Using curl, this query returns the first 1000 (max limit of evaluate) field of studies. The result would contain name, id, parent id, parent name, child id and child name.

curl -X POST \
  https://api.labs.cognitive.microsoft.com/academic/v1.0/evaluate \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Ocp-Apim-Subscription-Key: API_KEY' \
  -d 'expr=Ty%3D'\''6'\''&attributes=Id%2CFN%2CFC.FN%2CFP.FN%2CFC.FId%2CFP.FId&count=1000'
Yan Foto
  • 10,850
  • 6
  • 57
  • 88
GdV
  • 21
  • 4