Commit 9b5350b4 authored by david Chavalarias's avatar david Chavalarias

clinical data explorer

parent 6027f399
This diff is collapsed.
{
"Distributionnal.gexf": {
"node0": {
"name": "term",
"reldbs": {
"csv": {
"file": "../clinicaltrials.csv",
"qcols": ["title","abstract"],
"template": "bib_details"
}
}
}
}
}
This diff is collapsed.
{
"Conditionnal.gexf": {
"node0": {
"name": "term",
"reldbs": {
"csv": {
"file": "../clinicaltrials.csv",
"qcols": ["title","abstract"],
"template": "bib_details"
}
}
}
}
}
This diff is collapsed.
{
"Distributional.gexf": {
"node0": {
"name": "term",
"reldbs": {
"csv": {
"file": "../clinicaltrials.csv",
"qcols": ["title","abstract"],
"template": "bib_details"
}
}
}
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"Conditionnal.gexf": {
"node0": {
"name": "term",
"reldbs": {
"csv": {
"file": "../clinicaltrials.csv",
"qcols": ["title","abstract"],
"template": "bib_details"
}
}
}
}
}
This diff is collapsed.
explorerjs.html
\ No newline at end of file
This diff is collapsed.
{
"data/ClimateChange": [
"Maps_S_800.gexf"
"data/Treatments_": [
"Conditionnal.gexf"
],"data/Treatments": [
"Distributional.gexf"
],
"data/gargistex": [
"shale_and_ice.gexf",
"model_calibration.gexf"
"data/All_": [
"Conditionnal.gexf"
],
"data/comexjsons": [
"graph_example.json",
"graph_example2.gexf"
"data/All": [
"Distributional.gexf"
],
"data/test": [
"mini.gexf"
],
"data/politoscope": [
"ProgrammeDesCandidats.gexf"
],
"first_project": "data/politoscope"
"first_project": "data/Treatments_"
}
......@@ -6,8 +6,8 @@ TW.conf = (function(TW){
let TWConf = {}
TWConf.branding = 'ProjectExplorer' // <--- name displayed in upper left
TWConf.brandingLink = 'http://iscpif.fr' // <--- link to "home"
TWConf.branding = 'Coronavirus Clinical Trials' // <--- name displayed in upper left
TWConf.brandingLink = 'https://iscpif.fr/projects/coronavirus-related-projects' // <--- link to "home"
// ==========================
......@@ -21,7 +21,7 @@ TW.conf = (function(TW){
// ...or remote bridge to default source api ajax queries
TWConf.sourceAPI={}
TWConf.sourceAPI["nodetypes"] = {"node0": "Keywords", "node1": "Scholars" }
TWConf.sourceAPI["nodetypes"] = {"node0": "NGram", "node1": "Document" }
TWConf.sourceAPI["forNormalQuery"] = "services/api/graph"
TWConf.sourceAPI["forFilteredQuery"] = "services/api/graph"
......@@ -73,13 +73,12 @@ TW.conf = (function(TW){
'auto-outdegree' : {'col': "heatmap", 'n': 7, 'binmode': 'samepop', 'legend': 'Auto OutDegree'},
'cluster_index' : {'col': "cluster" , 'binmode': 'off' },
'clust_louvain' : {'col': "cluster" , 'binmode': 'off',
'legend':'Louvain clustering', 'titlingMetric': 'auto-size'},
'legend':'Louvain clustering' },
'country':{
'col':"cluster" ,
'binmode': 'off',
'legend': 'Country',
'titlingMetric': 'off'
},
'legend': 'Country'
},
'total_occurrences':{
'col':"heatmap" ,
'binmode': 'samerange',
......@@ -119,7 +118,7 @@ TW.conf = (function(TW){
TWConf.catSoc = "Document";
// NB: these labels may be superseded by:
// - the input data's node types values cf. sortNodeTypes()
// - in project_conf.md the node0 & node1 properties
// - in servermenu mode, by the node0 & node1 properties
// Modules path
// ------------
......@@ -139,13 +138,13 @@ TW.conf = (function(TW){
// flag name is div class to be removed if false
// *and* subdirectory of modules path to import if true
// see also activateModules()
TWConf.ModulesFlags["multivacV1HistogramModule"] = true ;
TWConf.ModulesFlags["multivacV1HistogramModule"] = false;
// cf. twmodules/multivacV2HistogramModule/multivacV2Settings.js for settings
TWConf.ModulesFlags["multivacV2HistogramModule"] = false ;
// cf. twmodules/crowdsourcingModule/README.md to initialize the associated db
TWConf.ModulesFlags["crowdsourcingModule"] = true ;
TWConf.ModulesFlags["crowdsourcingModule"] = false ;
// Other GUI options
// ------------------
......@@ -175,14 +174,13 @@ TW.conf = (function(TW){
// Layout options
// --------------
TWConf.disperseAvailable=true; // show/hide disperseButton
TWConf.fa2Available=true; // show/hide fa2Button
TWConf.disperseAvailable=true; // show/hide disperseButton
// if fa2Available, the auto-run config:
TWConf.fa2Enabled= true; // fa2 auto-run at start and after graph modified ?
TWConf.fa2Enabled= false; // fa2 auto-run at start and after graph modified ?
TWConf.fa2Milliseconds=4000; // duration of auto-run
TWConf.fa2AdaptDuration=true; // duration of auto-run proportional log(nEdges)
TWConf.minNodesForAutoFA2 = 5 // graph size threshold to auto-run
......@@ -191,7 +189,7 @@ TW.conf = (function(TW){
TWConf.maxSearchResults = 10 // how many "top papers" to display
TWConf.minLengthAutoComplete = 1 // how many chars to type for autocomp
TWConf.maxSuggestionsAutoComplete = 10 // how many suggestions by autocomp
TWConf.strSearchBar = "Select topics"
TWConf.strSearchBar = "Search"
// ===================
......@@ -237,7 +235,7 @@ TW.conf = (function(TW){
// selected nodes <=> special label
twSelectedColor: "default", // "node" for a label bg like the node color,
// "default" for white background
// "default" for note-like yellow
// not selected <=> (1-greyness)
twNodesGreyOpacity: .5, // smaller value: more grey
......@@ -252,15 +250,15 @@ TW.conf = (function(TW){
// -----------------------------------
// normal and meso level background colors
TWConf.normalBackground = '#fff' // <= should match css default
TWConf.mesoBackground = '#fcfcd5'
TWConf.mesoBackground = '#fcfcea'
// mouse captor zoom limits
TWConf.zoomMin = 1/64 // for zoom IN (ex: 1/64 to allow zoom x64)
TWConf.zoomMax = 8 // for zoom OUT
TWConf.zoomMin = .015625 // for zoom IN (ex: 1/64 to allow zoom x64)
TWConf.zoomMax = 4 // for zoom OUT
// circle selection cursor
TWConf.circleSizeMin = 0;
TWConf.circleSizeMax = 200;
TWConf.circleSizeMax = 100;
TWConf.moreLabelsUnderArea = true; // show 3x more labels under area (/!\ costly)
// em size range for neighbor nodes "tagcloud" (1 = "normal size")
......
......@@ -49,8 +49,8 @@
}
/* legend re-positioned */
#legend-for-facets {
bottom: calc(40% - 100px);
.my-legend {
bottom: calc(40% - 105px);
/* bot just above #sidebar which has top at calc(105px + 60%); */
}
......@@ -97,20 +97,17 @@
}
/* legend reduction */
#legend-for-facets {
max-width: 25%;
}
.my-legend {
max-width: 27%;
max-height: 25%;
padding: 0 2px;
font-size: 85%;
margin: 0;
padding: 0 1px 3px 1px;
margin: 0 0 5px 0;
}
.my-legend .legend-title {
margin-bottom: 0;
font-size: 85%;
font-size: 90%;
}
.my-legend .legend-scale ul {
margin-bottom: 0;
......
......@@ -33,55 +33,44 @@
}
/* LEGEND PANEL */
#legend-for-facets {
bottom: 10px;
left:0;
position:fixed;
/* width: we set it a bit more than #lefttopbox width */
max-width: 20%;
max-height: 40%;
font-size:120%;
cursor: default;
overflow-y:auto;
overflow-x: hidden;
}
.my-legend {
position: relative;
height: 100%;
width: 100%;
margin: 0;
padding: 0 5px 5px 5px;
opacity:1;
background-color: white;
position:fixed;
/* width: we set it equal or smaller than #lefttopbox width */
max-width:20%;
max-height: 30%;
padding: 0 5px;
overflow-y:scroll;
bottom:18px;
left:0;
border:solid 1px black;
background-color:white;
opacity: 0.8;
color:#250587;
overflow: hidden;
z-index: 5;
margin: 7px;
font-size:120%;
cursor: default;
}
.my-legend .legend-title {
text-align: left;
margin-bottom: 5px;
font-weight: bold;
font-size: 75%;
}
font-size: 90%;
}
.my-legend .legend-scale ul {
margin: 0;
margin-bottom: 5px;
padding: 0;
float: left;
list-style: none;
}
}
.my-legend .legend-scale ul li {
font-size: 80%;
list-style: none;
margin-left: 0;
line-height: 16px;
margin-bottom: 2px;
}
}
.my-legend ul.legend-labels li span.lgdcol {
display: block;
float: left;
......
......@@ -165,13 +165,6 @@ html.waiting {
display: none; /* initial display off but turned on if bipartite */
}
.pseudo-optgroup {
color: #555;
text-align: center;
font-size: 90%;
padding: 1.5em 0 .5em 0;
}
.tagcloud-item{
display:inline-block;
border:solid 1px;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -96,10 +96,8 @@ function isUndef(variable){
function stringToSomeInt (anyString) {
let charCodeSum = 0
if (anyString && anyString.length) {
for (let i = 0 ; i < anyString.length ; i++) {
charCodeSum += anyString.charCodeAt(i)
}
for (let i = 0 ; i < anyString.length ; i++) {
charCodeSum += anyString.charCodeAt(i)
}
return charCodeSum
}
......
......@@ -2,10 +2,9 @@
// ======= [ main TW properties initialization ] ======== //
TW.APIQuery // remember the source query
TW.File = "" // or remember the currently opened file
TW.Project = "" // and the project of currently opened file
TW.File = "" // remember the currently opened file
TW.Project = "" // remember the project of currently opened file
// a system state is the summary of tina situation
TW.initialSystemState = {
......@@ -90,7 +89,7 @@ else {
// - choose the source and format
var [inFormat, inData, mapLabel] = syncRemoteGraphData()
mainStartGraph(inFormat, inData, TW.instance)
writeLabel(mapLabel)
//writeLabel(mapLabel)
}
// === [ / what to do at start ] === //
......@@ -112,7 +111,8 @@ function syncRemoteGraphData () {
// the only API format, cf. inData
inFormat = 'json'
var sourceinfo = getUrlParam.srcparams
// TODO-rename: s/nodeidparam/srcparams
var sourceinfo = getUrlParam.nodeidparam
var qtype = getUrlParam.type
if(isUndef(sourceinfo) || isUndef(qtype)) {
console.warn("missing nodes filter/id param to transmit to source api");
......@@ -129,8 +129,6 @@ function syncRemoteGraphData () {
// < === DATA EXTRACTION === >
theurl = TW.conf.sourceAPI["forNormalQuery"]
TW.APIQuery = sourceinfo
// NB before also passed it for Fa2 iterations (useless?)
thedata = "qtype=uid&unique_id="+sourceinfo;
mapLabel = "unique scholar";
......@@ -144,9 +142,10 @@ function syncRemoteGraphData () {
// json is twice URI encoded by whoswho to avoid both '"' and '%22'
var json_constraints = decodeURIComponent(sourceinfo)
// console.log("multipleQuery RECEIVED", json_constraints)
// safe parsing of the URL's untrusted JSON
TW.APIQuery = JSON.parse( json_constraints)
var filteringKeyArrayPairs = JSON.parse( json_constraints)
// INPUT json: <= { keywords: ['complex systems', 'something'],
// countries: ['France', 'USA'], laboratories: []}
......@@ -159,30 +158,20 @@ function syncRemoteGraphData () {
// => mapLabel (for user display):
// ("complex systems" or "something") and ("France" or "USA")
// console.log("decoded filtering query", TW.APIQuery)
// console.log("decoded filtering query", filteringKeyArrayPairs)
var restParams = []
var nameElts = []
// build REST parameters from filtering arrays
// and name from each filter value
for (var fieldName in TW.APIQuery) {
// a nodetype
if (/^_node[0-1]$/.test(fieldName)) {
let itype = fieldName.charAt(fieldName.length-1)
let typeName = TW.APIQuery[fieldName]
restParams.push("type"+itype+"="+typeName)
}
// an array of filters
else {
var nameSubElts = []
for (var value of TW.APIQuery[fieldName]) {
// exemple: "countries[]=France"
restParams.push(fieldName+'[]='+encodeURIComponent(value))
nameSubElts.push ('"'+value+'"')
}
nameElts.push("("+nameSubElts.join(" or ")+")")
for (var fieldName in filteringKeyArrayPairs) {
var nameSubElts = []
for (var value of filteringKeyArrayPairs[fieldName]) {
// exemple: "countries[]=France"
restParams.push(fieldName+'[]='+encodeURIComponent(value))
nameSubElts.push ('"'+value+'"')
}
nameElts.push("("+nameSubElts.join(" or ")+")")
}
if (restParams.length) {
......@@ -424,9 +413,6 @@ function mainStartGraph(inFormat, inData, twInstance) {
TW.ByType = dicts.byType // useful for loops
// init the rendering flags (after we got types, before we first render)
TW.gui.handpickedcolorsReset(TW.categories)
// in-place: pre-compute all color/unselected color/size properties
prepareNodesRenderingProperties(TW.Nodes)
prepareEdgesRenderingProperties(TW.Edges, TW.Nodes)
......@@ -457,12 +443,8 @@ function mainStartGraph(inFormat, inData, twInstance) {
TW.graphData = {nodes: [], edges: []}
TW.graphData = sigma_utils.FillGraph( initialActivetypes , initialActivereltypes, TW.catDict , TW.Nodes , TW.Edges , TW.graphData );
if (TW.graphData.edges.length == 0) console.warn("no edges in graph")
if (TW.graphData.nodes.length == 0) {
console.error("empty graph")
alert("This query returned no nodes. The graph is empty")
return false
}
if (TW.graphData.nodes.length == 0) console.error("empty graph")
if (TW.graphData.edges.length == 0) console.error("no edges in graph")
// our final sigma params (cf github.com/jacomyal/sigma.js/wiki/Settings)
TW.customSettings = Object.assign(
......@@ -564,6 +546,29 @@ function mainStartGraph(inFormat, inData, twInstance) {
}
}
TW.FA2Params = {
// adapting speed -------------
slowDown: 1.5,
startingIterations: 2, // keep it an even number to reduce visible oscillations at rendering
iterationsPerRender: 4, // idem
barnesHutOptimize: false,
// barnesHutTheta: .5,
// global behavior -----------
linLogMode: true,
edgeWeightInfluence: .3,
gravity: .8,
strongGravityMode: false,
scalingRatio: 1,
adjustSizes: false, // ~ messy but sort of in favor of overlap prevention
// favors global centrality
// (but rather not needed when data already shows topic-centered
// node groups and/nor when preferential attachment type of data)
outboundAttractionDistribution: false
}
if (TW.conf.debug.logSettings) console.info("FA2 settings", TW.FA2Params)
// init FA2 for any future forceAtlas2 calls
......
......@@ -25,9 +25,6 @@ TW.pushGUIState = function( args ) {
if (!isUndef(args.level)) newState.level = args.level;
if (!isUndef(args.sels)) newState.selectionNids = args.sels;
// this one just needed for changeType "comeback" case
if (!isUndef(args.comingFromType)) newState.comingFromType = args.comingFromType
// neighbors (of any type) and their edges in an .selectionRels[type] slot
if(!isUndef(args.rels)) newState.selectionRels = args.rels;
......@@ -100,6 +97,7 @@ TW.resetGraph = function() {
// reset rendering gui flags
TW.gui.selectionActive = false
TW.gui.handpickedcolor = false
// reset circle size and cursor
TW.gui.circleSize = 0
......@@ -109,9 +107,6 @@ TW.resetGraph = function() {
TW.gui.checkBox=false
TW.gui.lastFilters = {}
// reset colors legends
updateColorsLegend()
// forget the states
TW.states = [TW.initialSystemState]
......@@ -305,7 +300,7 @@ function cancelSelection (fromTagCloud, settings) {
TW.gui.selectionActive = false
// hide all selection panels
if(!fromTagCloud){
if(fromTagCloud==false){
// POSS give them all a common class
$("#names").html("");
$("#topPapers").html("");
......@@ -739,7 +734,7 @@ function prepareNodesRenderingProperties(nodesDict) {
// default unselected color
defgrey_color : "rgba("+rgbStr+","+TW.conf.sigmaJsDrawingProperties.twNodesGreyOpacity+")",
// will be used for repainting (read when TW.gui.handpickedcolors flags)
// will be used for repainting (read when TW.gui.handpickedcolor flag)
alt_color: null,
altgrey_color: null,
}
......@@ -752,7 +747,7 @@ function prepareEdgesRenderingProperties(edgesDict, nodesDict) {
for (var eid in edgesDict) {
var e = edgesDict[eid]
e.weight = Math.round(e.weight*100000)/100000
e.weight = Math.round(e.weight*1000)/1000
// e.size = e.weight // REFA s/weight/size/ ?
var rgbStr = sigmaTools.edgeRGB(nodesDict[e.source].color, nodesDict[e.target].color)
......@@ -806,7 +801,7 @@ function add1Elem(id) {
} else { // It's an edge!
if(!isUndef(TW.partialGraph.graph.edges(id))) return;
var e = TW.Edges[id]
if(e){
if(e && !e.lock){
// var anedge = {
// id: id,
// source: e.source,
......
......@@ -211,8 +211,8 @@ function scanGexf(gexfContent) {
// ex: terms
// ex: ISItermsriskV2_140 & ISItermsriskV2_140
// optional arg optionalNodeConf should contain keys of the form:
// "node0": "Keywords",
// "node1": "Scholars"
// "node0": "NGram",
// "node1": "Document"
// etc.
// (it's read from project_conf.json)
function sortNodeTypes(observedTypesDict, optionalNodeConf) {
......@@ -220,14 +220,6 @@ function sortNodeTypes(observedTypesDict, optionalNodeConf) {
observedTypes.sort(function(a,b) {return observedTypesDict[b] - observedTypesDict[a]})
let nbNodeTypes = 2
if (observedTypes.length > nbNodeTypes) {
console.warn(`The graph source data has more different node types than
supported. Less frequent node types will be ignored.
Max allowed types: ${nbNodeTypes},
Found: ${observedTypes.length} (namely: ${observedTypes})`)
}
var declaredTypes = []
for (var i = 0 ; i < nbNodeTypes ; i++ ) {
if (optionalNodeConf && optionalNodeConf["node"+i]) {
......@@ -242,14 +234,10 @@ function sortNodeTypes(observedTypesDict, optionalNodeConf) {
}
}
// console.log("observedTypes", observedTypes)
// console.log("declaredTypes", declaredTypes)
var newcats = [] // will become TW.categories
var catDict = {} // will become TW.catDict
var newcats = []
var catDict = {}
var nTypes = observedTypes.length
if(nTypes==0) {
newcats[0]="Terms";
catDict["Terms"] = 0;
......@@ -263,72 +251,43 @@ function sortNodeTypes(observedTypesDict, optionalNodeConf) {
console.log(`cat unique (${observedTypes[0]}) =>0`)
}
if(nTypes>1) {
// allows multiple node types even if not well declared
// ----------------------------------------------------
// POSSIBLE: an "all the rest" last nodeType ?
let alreadyUsed = {}
// try declared cats in declared position, independantly from each other
for (var i = 0 ; i < nbNodeTypes; i++) {
if (observedTypesDict[declaredTypes[i]]) {
let validatedType = declaredTypes[i]
newcats[i] = validatedType;
alreadyUsed[validatedType] = true
}
// allows multiple node types, with an "all the rest" node1
// try stipulated cats, then fallbacks
// possible: loop
if (observedTypesDict[declaredTypes[0]]) {
newcats[0] = declaredTypes[0];
catDict[declaredTypes[0]] = 0;
}
if (observedTypesDict[declaredTypes[1]]) {
newcats[1] = declaredTypes[1];
catDict[declaredTypes[1]] = 1;
}
// console.log("found stipulated cats", newcats, catDict)
// fallbacks: if some or all stipulated cats are not found
// ---------
// heuristic A: fill missing ones, by frequence
// (eg if nodes0 was not found, then type for nodes0 will be the
// majoritary observed one, unless taken where we move one up)
for (var i = 0 ; i < nbNodeTypes; i++) {
if (typeof newcats[i] == "undefined") {
for (var j = 0 ; j < nTypes ; j++) {
if (!alreadyUsed[observedTypes[j]]) {
newcats[i] = observedTypes[j]
alreadyUsed[observedTypes[j]] = true
break
}
}
// NB: type for nodes0 will be the majoritary by default, unless taken
if (!newcats[0]) {
if (observedTypes[0] != newcats[1]) {
newcats[0] = observedTypes[0] // 0 is the most frequent here
catDict[observedTypes[0]] = 0;
}
}
// console.log("after filling majority cats", newcats, catDict)
// all the rest (heuristic B)
if (!newcats[nbNodeTypes-1]) {
for(var i in observedTypes) {
// without a group others: if there is more than two cats altogether,
// only the last cat counts as node1 cat
let c = observedTypes[i]
// -------------------------------------------- for a group "others"
// with a group "others": if there is more than two cats altogether,
// all the non majoritary or non-stipulated
// are grouped here as node1 cat
// but problem: it break the symetry b/w TW.categories and TW.catDict
//
// // c is in "all the rest" group (POSS extend to multitypes)
// if (c != newcats[0] && c != newcats[1]) {
// if (!newcats[1]) newcats[1] = c;
// else newcats[1] += '/'+c
// catDict[c] = 1;
// }
// -------------------------------------------/ for a group "others"
else {
newcats[0] = observedTypes[1] // 1 is second most frequent
catDict[observedTypes[1]] = 0;
}
}
}
// reverse lookup
for (var i in newcats) {
catDict[newcats[i]] = i
// all the rest
for(var i in observedTypes) {
let c = observedTypes[i]
// or c is in "all the rest" group
// (POSS extend to multitypes)
if (c != newcats[0] && c != newcats[1]) {
if (!newcats[1]) newcats[1] = c;
else newcats[1] += '/'+c
catDict[c] = 1;
}
}
}
return {'categories': newcats, 'lookup_dict': catDict}
}
......@@ -691,18 +650,10 @@ function dictfyGexf( gexf , categories ){
for(var i in categories) {
nodesByType[i] = []
// without a group "others" -------------------
catDict[categories[i]] = i
// POSS subCats for cat "others" if open types mapped to n types
//
// ----------------------- with a group "others"
// let subCats = categories[i].split(/\//g)
// for (var j in subCats) {
// catDict[subCats[j]] = i
// }
// ---------------------- /with a group "others"
let subCats = categories[i].split(/\//g)
for (var j in subCats) {
catDict[subCats[j]] = i
}
}
......@@ -1126,17 +1077,11 @@ function dictfyJSON( data , categories ) {
for(var i in categories) {
nodesByType[i] = []
// without a group "others" -------------------
catDict[categories[i]] = i
let subCats = categories[i].split(/\//g)
for (var j in subCats) {
catDict[subCats[j]] = i
}
// POSS subCats for cat "others" if open types mapped to n types
//
// ----------------------- with a group "others"
// let subCats = categories[i].split(/\//g)
// for (var j in subCats) {
// catDict[subCats[j]] = i
// }
// ---------------------- /with a group "others"
}
// normalization, same as parseGexf
......
This diff is collapsed.
......@@ -21,7 +21,7 @@ TW.conf = (function(TW){
// ...or remote bridge to default source api ajax queries
TWConf.sourceAPI={}
TWConf.sourceAPI["nodetypes"] = {"node0": "Keywords", "node1": "Scholars" }
TWConf.sourceAPI["nodetypes"] = {"node0": "NGram", "node1": "Document" }
TWConf.sourceAPI["forNormalQuery"] = "services/api/graph"
TWConf.sourceAPI["forFilteredQuery"] = "services/api/graph"
......@@ -59,7 +59,7 @@ TW.conf = (function(TW){
TWConf.scanAttributes = true
// use a facet for default color
TWConf.defaultColoring = "country"
TWConf.defaultColoring = "clust_louvain"
// facetOptions: choose here the default visual result of your node attributes
// ---------------------------------------------------------------------------
......@@ -73,13 +73,12 @@ TW.conf = (function(TW){
'auto-outdegree' : {'col': "heatmap", 'n': 7, 'binmode': 'samepop', 'legend': 'Auto OutDegree'},
'cluster_index' : {'col': "cluster" , 'binmode': 'off' },
'clust_louvain' : {'col': "cluster" , 'binmode': 'off',
'legend':'Louvain clustering', 'titlingMetric': 'auto-size'},
'legend':'Louvain clustering' },
'country':{
'col':"cluster" ,
'binmode': 'off',
'legend': 'Country',
'titlingMetric': 'off'
},
'legend': 'Country'
},
'normfactor':{
'col':"heatmap" ,
......@@ -90,8 +89,7 @@ TW.conf = (function(TW){
'ACR':{
'col':"cluster" ,
'binmode': 'off',
'legend': 'Affiliation',
'titlingMetric': 'off'
'legend': 'Affiliation'
},
'nbjobs':{
'col':"heatmap" ,
......@@ -136,17 +134,17 @@ TW.conf = (function(TW){
// =============
// Node typology: categories (resp. 0 and 1) will get these default labels
TWConf.catSem = "Keywords";
TWConf.catSoc = "Scholars";
TWConf.catSem = "NGram";
TWConf.catSoc = "Document";
// NB: these labels may be superseded by:
// - the input data's node types values cf. sortNodeTypes()
// - in project_conf.md the node0 & node1 properties
// - in servermenu mode, by the node0 & node1 properties
// Modules path
// ------------
TWConf.paths = {
'ourlibs': 'static/tinawebJS/twlibs',
'modules': 'static/tinawebModuleComexLayout',
'modules': 'static/tinawebJS/twmodules',
'templates': 'static/tinawebJS/twlibs/default_hit_templates',
'sourceFile': null, // server: 1 default gexf|json graph source
......@@ -160,7 +158,13 @@ TW.conf = (function(TW){
// flag name is div class to be removed if false
// *and* subdirectory of modules path to import if true
// see also activateModules()
TWConf.ModulesFlags["comexTopBarLoader"] = true ;
TWConf.ModulesFlags["multivacV1HistogramModule"] = false ;
// cf. twmodules/multivacV2HistogramModule/multivacV2Settings.js for settings
TWConf.ModulesFlags["multivacV2HistogramModule"] = false ;
// cf. twmodules/crowdsourcingModule/README.md to initialize the associated db
TWConf.ModulesFlags["crowdsourcingModule"] = false ;
// Other GUI options
// ------------------
......@@ -183,14 +187,13 @@ TW.conf = (function(TW){
// Layout options
// --------------
TWConf.disperseAvailable=true; // show/hide disperseButton
TWConf.fa2Available=true; // show/hide fa2Button
TWConf.disperseAvailable=true; // show/hide disperseButton
// if fa2Available, the auto-run config:
TWConf.fa2Enabled= true; // fa2 auto-run at start and after graph modified ?
TWConf.fa2Milliseconds=4000; // duration of auto-run
TWConf.fa2AdaptDuration=true; // duration of auto-run proportional log(nEdges)
TWConf.minNodesForAutoFA2 = 5 // graph size threshold to auto-run
......@@ -248,7 +251,7 @@ TW.conf = (function(TW){
// "default" for white background
// not selected <=> (1-greyness)
twNodesGreyOpacity: .5, // smaller value: more grey
twNodesGreyOpacity: .4, // smaller value: more grey
twBorderGreyColor: "rgba(100, 100, 100, 0.5)",
twEdgeGreyColor: "rgba(100, 100, 100, 0.25)",
};
......@@ -260,18 +263,15 @@ TW.conf = (function(TW){
// -----------------------------------
// normal and meso level background colors
TWConf.normalBackground = '#fff' // <= should match css default
TWConf.mesoBackground = '#fcfcd5'
TWConf.mesoBackground = '#fcfcea'
// mouse captor zoom limits
TWConf.zoomMin = 1/64 // for zoom IN (ex: 1/64 to allow zoom x64)
TWConf.zoomMax = 8 // for zoom OUT
// NB these "inverted" semantics are based on sigma's own zoomMin and zoomMax
// cf. https://github.com/jacomyal/sigma.js/wiki/Settings#captors-settings
TWConf.zoomMin = .015625 // for zoom IN (ex: 1/64 to allow zoom x64)
TWConf.zoomMax = 4 // for zoom OUT
// circle selection cursor
TWConf.circleSizeMin = 0;
TWConf.circleSizeMax = 200;
TWConf.circleSizeMax = 100;
TWConf.moreLabelsUnderArea = true; // show 3x more labels under area (/!\ costly)
// em size range for neighbor nodes "tagcloud" (1 = "normal size")
......
......@@ -21,7 +21,7 @@ TW.conf = (function(TW){
// ...or remote bridge to default source api ajax queries
TWConf.sourceAPI={}
TWConf.sourceAPI["nodetypes"] = {"node0": "Keywords", "node1": "Scholars" }
TWConf.sourceAPI["nodetypes"] = {"node0": "NGram", "node1": "Document" }
TWConf.sourceAPI["forNormalQuery"] = "services/api/graph"
TWConf.sourceAPI["forFilteredQuery"] = "services/api/graph"
......@@ -73,13 +73,12 @@ TW.conf = (function(TW){
'auto-outdegree' : {'col': "heatmap", 'n': 7, 'binmode': 'samepop', 'legend': 'Auto OutDegree'},
'cluster_index' : {'col': "cluster" , 'binmode': 'off' },
'clust_louvain' : {'col': "cluster" , 'binmode': 'off',
'legend':'Louvain clustering', 'titlingMetric': 'auto-size'},
'legend':'Louvain clustering' },
'country':{
'col':"cluster" ,
'binmode': 'off',
'legend': 'Country',
'titlingMetric': 'off'
},
'legend': 'Country'
},
'total_occurrences':{
'col':"heatmap" ,
'binmode': 'samerange',
......@@ -119,7 +118,7 @@ TW.conf = (function(TW){
TWConf.catSoc = "Document";
// NB: these labels may be superseded by:
// - the input data's node types values cf. sortNodeTypes()
// - in project_conf.md the node0 & node1 properties
// - in servermenu mode, by the node0 & node1 properties
// Modules path
// ------------
......@@ -175,14 +174,13 @@ TW.conf = (function(TW){
// Layout options
// --------------
TWConf.disperseAvailable=true; // show/hide disperseButton
TWConf.fa2Available=true; // show/hide fa2Button
TWConf.disperseAvailable=true; // show/hide disperseButton
// if fa2Available, the auto-run config:
TWConf.fa2Enabled= true; // fa2 auto-run at start and after graph modified ?
TWConf.fa2Milliseconds=4000; // duration of auto-run
TWConf.fa2AdaptDuration=true; // duration of auto-run proportional log(nEdges)
TWConf.minNodesForAutoFA2 = 5 // graph size threshold to auto-run
......@@ -237,12 +235,12 @@ TW.conf = (function(TW){
// selected nodes <=> special label
twSelectedColor: "default", // "node" for a label bg like the node color,
// "default" for white background
// "default" for note-like yellow
// not selected <=> (1-greyness)
twNodesGreyOpacity: .5, // smaller value: more grey
twBorderGreyColor: "rgba(100, 100, 100, 0.5)",
twEdgeGreyColor: "rgba(100, 100, 100, 0.25)",
twEdgeGreyColor: "rgba(100, 100, 100, 0.3)",
};
// NB: sigmaJsDrawingProperties are available as 'settings' in all renderers
// cf. https://github.com/jacomyal/sigma.js/wiki/Settings#renderers-settings
......@@ -252,15 +250,15 @@ TW.conf = (function(TW){
// -----------------------------------
// normal and meso level background colors
TWConf.normalBackground = '#fff' // <= should match css default
TWConf.mesoBackground = '#fcfcd5'
TWConf.mesoBackground = '#fcfcea'
// mouse captor zoom limits
TWConf.zoomMin = .015625 // for zoom IN (ex: 1/64 to allow zoom x64)
TWConf.zoomMax = 8 // for zoom OUT
TWConf.zoomMax = 4 // for zoom OUT
// circle selection cursor
TWConf.circleSizeMin = 0;
TWConf.circleSizeMax = 200;
TWConf.circleSizeMax = 100;
TWConf.moreLabelsUnderArea = true; // show 3x more labels under area (/!\ costly)
// em size range for neighbor nodes "tagcloud" (1 = "normal size")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment