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