1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{-|
Module : Gargantext.Core.Viz.Graph.Legend
Description :
Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3
Maintainer : team@gargantext.org
Stability : experimental
Portability : POSIX
-}
module Gargantext.Core.Viz.Graph.Legend
where
{-
import Data.Ord (Down(..))
import Gargantext.Prelude
import Data.Map.Strict (Map, fromListWith, lookup, toList, mapWithKey, elems)
import qualified Data.Map.Strict as DM
import Data.Maybe (catMaybes)
import Data.List (concat, sortOn)
import Gargantext.Core.Viz.Graph.Louvain (LouvainNodeId, CommunityId, comId2nodeId)
[LouvainNode] -> Map CommunityId LouvainNodeId
[(CommunityId, [LouvainNodeId])]
sort by length LouvainNodeIds
Cooc -> DGI.Graph
sort [LouvainNodeId]
subgraph with [LouvainNodeId]
-> prendre le noeud le mieux connecté (degree to start with)
Map NodeId Label
-> map [LouvainNodeId] -> [(CommunityId, take 3 [Label])]
use specGen incExc score to order the labels
take 7 [(CommunityId, take 3 [Label])]
-}