]> Git — Sourcephile - gargantext.git/blob - src/Gargantext/Core/Viz/Graph/Legend.hs
[DEMO] read any file to get annuaire
[gargantext.git] / src / Gargantext / Core / Viz / Graph / Legend.hs
1 {-|
2 Module : Gargantext.Core.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.Core.Viz.Graph.Legend
14 where
15
16 {-
17 import Data.Ord (Down(..))
18 import Gargantext.Prelude
19 import Data.Map (Map, fromListWith, lookup, toList, mapWithKey, elems)
20 import qualified Data.Map as DM
21 import Data.Maybe (catMaybes)
22 import Data.List (concat, sortOn)
23 import Gargantext.Core.Viz.Graph.Louvain (LouvainNodeId, CommunityId, comId2nodeId)
24
25
26
27 [LouvainNode] -> Map CommunityId LouvainNodeId
28 [(CommunityId, [LouvainNodeId])]
29 sort by length LouvainNodeIds
30
31
32 Cooc -> DGI.Graph
33 sort [LouvainNodeId]
34
35 subgraph with [LouvainNodeId]
36 -> prendre le noeud le mieux connecté (degree to start with)
37
38 Map NodeId Label
39 -> map [LouvainNodeId] -> [(CommunityId, take 3 [Label])]
40
41 use specGen incExc score to order the labels
42
43 take 7 [(CommunityId, take 3 [Label])]
44
45
46
47 -}
48
49
50
51