Calculating the distribution of attributes from academic entities
Another feature of the academic API is the ability to calculate the distribution of attribute values for a set of paper entities. This can be done by calling the calchistogram
API endpoint.
This is a GET
request, so we start by creating a query string, as follows:
string queryString = $"expr={QueryExpression}&attributes=Y,F.FN"; //queryString += "&model=latest"; //queryString += "&count=10"; //queryString += "&offset=0";
The parameters we can specify are the same as with Evaluate
, except that we do not have the orderby
parameter. For this call, we want to get the year of publication (Y
) and the name of the field of study (F.FN
).
We make the call to the API without specifying any request bodies, as shown in the following code:
HistogramResponse response = await _webRequest.MakeRequest<object, HistogramResponse>(HttpMethod.Get, $"calchistogram?{queryString}"); if (response == null...