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
| Field | Type | Notes |
|---|---|---|
nodes | array | Required. Node objects with id and optional data (including date_decision or date_judgment). |
edges | array | Required. Edge objects with source and target. |
Computed metrics (per node)
| Field | Description |
|---|---|
degree | Total degree (in + out). |
in-degree | Number of incoming citations. |
out-degree | Number of outgoing citations. |
degree centrality | Degree centrality score. |
in-degree centrality | In-degree centrality score. |
out-degree centrality | Out-degree centrality score. |
relative in-degree | In-degree normalized by network size at node's publication date. |
pageRank | PageRank score. |
betweenness centrality | Betweenness centrality score. |
closeness centrality | Closeness centrality score. |
community | Community ID (Louvain algorithm on undirected graph). |
parent | Representative node ECLI for the community. |
year | Publication 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": { ... } }