From eaf76ceb1d377a12f86759f4179de541498b4bf5 Mon Sep 17 00:00:00 2001 From: victor barbier Date: Mon, 28 Oct 2024 12:03:47 +0100 Subject: [PATCH] feat(netwroks): add citations weight --- client/src/api/networks/network/network.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/api/networks/network/network.ts b/client/src/api/networks/network/network.ts index 9ecb0feb..0423fe86 100644 --- a/client/src/api/networks/network/network.ts +++ b/client/src/api/networks/network/network.ts @@ -83,7 +83,11 @@ export default async function networkCreate( y: attr.y, label: attr.label, cluster: attr?.community + 1, - weights: { Weight: attr.weight, Degree: graph.degree(key) }, + weights: { + Weight: attr.weight, + Degree: graph.degree(key), + ...(attr?.citationsCount !== undefined && { Citations: attr.citationsCount || 0 }), + }, scores: { "Last publication": attr?.maxYear }, page: configGetItemUrl(model, key, attr.label), ...(attr?.publicationsCount !== undefined && { publicationsCount: attr?.publicationsCount }),