Commit d785276e authored by PkSM3's avatar PkSM3

changes php

parent 69216c20
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
# Logs and databases #
######################
*.log
*.sql
*.db
*.sqlite
*.gexf
*.json
# OS generated files #
######################
.DS_Store
.DS_Store?
.Spotlight-V100
.Trashes
data/*
......@@ -14,7 +14,7 @@ $elems = json_decode($query);
$table = "";
$column = "";
$id="";
$twjs="API_CNRS/"; // submod path of TinaWebJS
$twjs="LOCALDB/"; // submod path of TinaWebJS
if($type=="social"){
$table = "ISIAUTHOR";
......
......@@ -2,22 +2,11 @@
$gexf_db = array();
$gexf_db["data/medq1/20141208_MED_01_bi.gexf"] = "data/medq1/01_medline-query1.db";
$gexf_db["data/medq2/20141128_MED_02_bi.gexf"] = "data/medq2/02_medline-query2.db";
$gexf_db["data/medq2/20141128_MED_03_bi.gexf"] = "data/medq2/02_medline-query2.db";
$gexf_db["data/medq2/20141208_MED_Author_name-ISItermsjulien_index.gexf"] = "data/medq2/02_medline-query2.db";
$gexf_db["data/20141128_GPs_03_bi.gexf"] = "data/00_grantproposals.db";
$gexf_db["data/20141215_GPs_04.gexf"] = "data/00_grantproposals.db";
# new stuff
$gexf_db["data/terrorism/terrorism_mono.gexf"] = "data/terrorism/data.db";
$gexf_db["data/terrorism/terrorism_bi.gexf"] = "data/terrorism/data.db";
# new stuff2
$gexf_db["data/ClimateChange/hnetwork-2014_2015hhn-wosclimatechange2014_2015top509-ISItermsListV3bis-ISItermsListV3bis-distributionalcooc-99999-oT0.36-20-louTrue.gexf"] = "data/ClimateChange/wosclimatechange-61715-1-wosclimatechange-db(2).db";
$gexf_db["data/ClimateChange/ClimateChangeV1.gexf"] = "data/ClimateChange/wosclimatechange-61715-1-wosclimatechange-db(2).db";
$gexf_db["data/ClimateChange/hnetwork-2014_2015hn-wosclimatechange2014_2015top509-ISItermsListV3bis-ISItermsListV3bis-distributionalcooc-99999-oT0.36-20-louTrue.gexf"] = "data/ClimateChange/wosclimatechange-61715-1-wosclimatechange-db(2).db";
# $gexf_db["data/terrorism/terrorism_bi.gexf"] = "data/terrorism/data.db";
# $gexf_db["data/ClimateChange/ClimateChangeV1.gexf"] = "data/ClimateChange/wosclimatechange-61715-1-wosclimatechange-db(2).db";
$gexf_db["data/ClimateChange/Maps_S_800.gexf"] = "data/ClimateChange/wos_climate-change_title_2014-2015.db";
$gexf= str_replace('"','',$_GET["gexf"]);
......
{
"data/ClimateChange": {
"dbname":"wosclimatechange-61490-1-wosclimatechange-db.db",
"dbname":"wos_climate-change_title_2014-2015.db",
"title":"ISITITLE",
"date":"ISIpubdate",
"abstract":"ISIABSTRACT",
"gexfs": {
"hnetwork-2014_2015hn-wosclimatechange2014_2015top509-ISItermsListV3bis-ISItermsListV3bis-distributionalcooc-99999-oT0.36-20-louTrue.gexf": {
"Maps_S_800.gexf": {
"social": { "table":"ISIAUTHOR" , "textCol":"data","forkeyCol":"id"},
"semantic": { "table":"ISItermsListV3bis" , "textCol":"data","forkeyCol":"id"}
},
"ClimateChangeV1.gexf": {
"social": { "table":"ISIAUTHOR" , "textCol":"data","forkeyCol":"id"},
"semantic": { "table":"ISItermsListV3bis" , "textCol":"data","forkeyCol":"id"}
"semantic": { "table":"ISItermsWhitelistV2Oct_5" , "textCol":"data","forkeyCol":"id"}
}
}
},"data/terrorism": {
......
......@@ -193,6 +193,8 @@ function dictfyGexf( gexf , categories ){
var nodesNodes = gexf.getElementsByTagName('nodes') // The list of xml nodes 'nodes' (plural)
labels = [];
minNodeSize=999.00;
maxNodeSize=0.001;
numberOfDocs=0;
numberOfNGrams=0;
for(i=0; i<nodesNodes.length; i++) {
......@@ -279,10 +281,42 @@ function dictfyGexf( gexf , categories ){
// console.log(node)
}
if(parseInt(node.size) < parseInt(minNodeSize))
minNodeSize= node.size;
if(parseInt(node.size) > parseInt(maxNodeSize))
maxNodeSize= node.size;
}
}
var attention = false
if( Clusters.length == 0 ) {
if( nodes[1].attributes["cluster_index"] ) {
attention = true;
}
}
Clusters = {}
//New scale for node size: now, between 2 and 5 instead [1,70]
for(var it in nodes){
nodes[it].size = desirableNodeSizeMIN+ (parseInt(nodes[it].size)-1)*((desirableNodeSizeMAX-desirableNodeSizeMIN) / (maxNodeSize-minNodeSize));
if(attention) {
var t_type = nodes[it].type
var t_cnumber = nodes[it].attributes["cluster_index"]
nodes[it].attributes["clust_default"] = t_cnumber;
var t_label = (nodes[it].attributes["cluster_label"])?nodes[it].attributes["cluster_label"]:"cluster_"+nodes[it].attributes["cluster_index"]
if(!Clusters[t_type]) {
Clusters[t_type] = {}
Clusters[t_type]["clust_default"] = {}
}
Clusters[t_type]["clust_default"][t_cnumber] = t_label
}
// partialGraph._core.graph.nodesIndex[it].size=Nodes[it].size;
}
var edgeId = 0;
var edgesNodes = gexf.getElementsByTagName('edges');
for(i=0; i<edgesNodes.length; i++) {
......
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