Statistics

Compute graph statistics and network metrics for a set of nodes and edges. Uses NetworkX for centrality, PageRank, and Louvain community detection. Pass the same node/edge shape returned by the search endpoints.

POST/api/statistics

Compute graph statistics and network metrics for a set of nodes and edges. Uses NetworkX for centrality, PageRank, and Louvain community detection. Pass the same node/edge shape returned by the search endpoints.

Parameters

FieldTypeNotes
nodesarrayRequired. Node objects with id and optional data (including date_decision or date_judgment).
edgesarrayRequired. Edge objects with source and target.

Computed metrics (per node)

FieldDescription
degreeTotal degree (in + out).
in-degreeNumber of incoming citations.
out-degreeNumber of outgoing citations.
degree centralityDegree centrality score.
in-degree centralityIn-degree centrality score.
out-degree centralityOut-degree centrality score.
relative in-degreeIn-degree normalized by network size at node's publication date.
pageRankPageRank score.
betweenness centralityBetweenness centrality score.
closeness centralityCloseness centrality score.
communityCommunity ID (Louvain algorithm on undirected graph).
parentRepresentative node ECLI for the community.
yearPublication year (from date_decision > date_judgment > ECLI pattern).
  • Returns empty object {} if nodes or edges array is empty.

Examples

Request

{
  "nodes": [
    { "id": "ECLI:NL:HR:2018:1234", "data": { "date_decision": "2018-05-01" } },
    { "id": "ECLI:NL:HR:2017:5678", "data": { "date_decision": "2017-11-15" } },
    { "id": "ECLI:NL:RBAMS:2019:9012", "data": { "date_decision": "2019-02-20" } }
  ],
  "edges": [
    { "source": "ECLI:NL:HR:2018:1234", "target": "ECLI:NL:HR:2017:5678" },
    { "source": "ECLI:NL:RBAMS:2019:9012", "target": "ECLI:NL:HR:2018:1234" }
  ]
}

Response

{
  "ECLI:NL:HR:2018:1234": {
    "parent": "ECLI:NL:HR:2018:1234",
    "degree": 2,
    "in-degree": 1,
    "out-degree": 1,
    "degree centrality": 1.0,
    "in-degree centrality": 0.5,
    "out-degree centrality": 0.5,
    "relative in-degree": 0.5,
    "pageRank": 0.4,
    "betweenness centrality": 1.0,
    "closeness centrality": 1.0,
    "community": 0,
    "year": 2018
  },
  "ECLI:NL:HR:2017:5678": { ... },
  "ECLI:NL:RBAMS:2019:9012": { ... }
}