Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Przemyslaw Kaminski
haskell-gargantext
Commits
b1bbfaea
Commit
b1bbfaea
authored
May 28, 2019
by
qlobbe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working on level links
parent
d30dd753
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
Cluster.hs
src/Gargantext/Viz/Phylo/Aggregates/Cluster.hs
+2
-1
LevelMaker.hs
src/Gargantext/Viz/Phylo/LevelMaker.hs
+5
-2
LinkMaker.hs
src/Gargantext/Viz/Phylo/LinkMaker.hs
+2
-2
No files found.
src/Gargantext/Viz/Phylo/Aggregates/Cluster.hs
View file @
b1bbfaea
...
...
@@ -80,7 +80,8 @@ phyloToClusters lvl clus p = Map.fromList
--------------------------------------
graphs
::
[([
GroupNode
],[
GroupEdge
])]
graphs
=
traceGraph
lvl
(
getThreshold
prox
)
$
map
(
\
prd
->
groupsToGraph
(
periodsToNbDocs
[
prd
]
p
)
prox
(
getGroupsWithFilters
lvl
prd
p
))
periods
$
map
(
\
prd
->
groupsToGraph
(
periodsToNbDocs
[
prd
]
p
)
prox
(
getGroupsWithFilters
lvl
prd
p
))
$
trace
(
show
(
map
(
\
prd
->
(
prd
,
length
$
getGroupsWithFilters
lvl
prd
p
))
periods
))
periods
--------------------------------------
prox
::
Proximity
prox
=
getProximity
clus
...
...
src/Gargantext/Viz/Phylo/LevelMaker.hs
View file @
b1bbfaea
...
...
@@ -21,7 +21,7 @@ module Gargantext.Viz.Phylo.LevelMaker
import
Control.Lens
hiding
(
both
,
Level
)
import
Data.List
((
++
),
sort
,
concat
,
nub
,
zip
,
last
)
import
Data.Map
(
Map
,
(
!
),
empty
,
singleton
)
import
Data.Map
(
Map
,
(
!
),
empty
,
singleton
,
mapWithKey
)
import
Data.Text
(
Text
)
import
Data.Tuple.Extra
import
Gargantext.Prelude
...
...
@@ -151,9 +151,12 @@ toNthLevel lvlMax prox clus p
$
setPhyloBranches
(
lvl
+
1
)
$
transposePeriodLinks
(
lvl
+
1
)
$
setLevelLinks
(
lvl
,
lvl
+
1
)
$
trace
(
show
(
mapWithKey
(
\
k
v
->
(
k
,
length
v
))
clusters
))
$
addPhyloLevel
(
lvl
+
1
)
(
phyloToClusters
lvl
clus
p
)
p
(
clusters
)
p
where
--------------------------------------
clusters
=
phyloToClusters
lvl
clus
p
--------------------------------------
lvl
::
Level
lvl
=
getLastLevel
p
...
...
src/Gargantext/Viz/Phylo/LinkMaker.hs
View file @
b1bbfaea
...
...
@@ -240,7 +240,7 @@ toLevelUp lst p = Map.toList
where
--------------------------------------
pointers
::
[
Pointer
]
pointers
=
map
(
\
(
id
,
v
)
->
(
getGroupLevelParentId
$
getGroupFromId
id
p
,
v
))
lst
pointers
=
trace
(
show
(
map
(
\
(
id
,
_
)
->
length
$
getGroupLevelParentId
$
getGroupFromId
id
p
)
lst
))
$
map
(
\
(
id
,
v
)
->
(
getGroupLevelParentId
$
getGroupFromId
id
p
,
v
))
lst
--------------------------------------
...
...
@@ -250,7 +250,7 @@ transposePeriodLinks lvl p = alterGroupWithLevel
(
\
g
->
--------------------------------------
let
childs
=
getGroupsFromIds
(
map
fst
$
getGroupLevelChilds
g
)
p
ascLink
=
toLevelUp
(
concat
$
map
getGroupPeriodParents
childs
)
p
ascLink
=
t
race
(
show
(
length
childs
))
$
t
oLevelUp
(
concat
$
map
getGroupPeriodParents
childs
)
p
desLink
=
toLevelUp
(
concat
$
map
getGroupPeriodChilds
childs
)
p
--------------------------------------
in
g
&
phylo_groupPeriodParents
%~
(
++
ascLink
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment