Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
front
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
epi-species
front
Commits
de6d12af
Commit
de6d12af
authored
Apr 19, 2023
by
vida092
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
arbol emisiones
parent
3e7f192e
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
113 additions
and
6 deletions
+113
-6
javascripts/histogram_module.js
+4
-0
javascripts/language_module.js
+1
-0
javascripts/utils_module.js
+6
-2
javascripts/variable_module.js
+98
-4
plugins/i18n/in/bundle/nicho_en_EN.properties
+1
-0
plugins/i18n/in/bundle/nicho_es_ES.properties
+1
-0
plugins/i18n/in/nicho.properties
+1
-0
plugins/i18n/in/nicho_es.properties
+1
-0
No files found.
javascripts/histogram_module.js
View file @
de6d12af
...
@@ -1223,6 +1223,10 @@ var histogram_module = (function (verbose) {
...
@@ -1223,6 +1223,10 @@ var histogram_module = (function (verbose) {
function
createBarChart
(
idComponent
,
data
,
f_legend
)
{
function
createBarChart
(
idComponent
,
data
,
f_legend
)
{
_VERBOSE
?
console
.
log
(
"createBarChart"
)
:
_VERBOSE
;
_VERBOSE
?
console
.
log
(
"createBarChart"
)
:
_VERBOSE
;
console
.
log
(
"<--------------------------------data----------------------->"
)
console
.
log
(
data
)
console
.
log
(
"<----------------------------idComponent-------------------->"
)
console
.
log
(
idComponent
)
$
(
"#"
+
idComponent
.
id
).
empty
();
$
(
"#"
+
idComponent
.
id
).
empty
();
// _VERBOSE ? console.log($(window).width()) : _VERBOSE;
// _VERBOSE ? console.log($(window).width()) : _VERBOSE;
...
...
javascripts/language_module.js
View file @
de6d12af
...
@@ -334,6 +334,7 @@ var language_module = (function (verbose) {
...
@@ -334,6 +334,7 @@ var language_module = (function (verbose) {
$
(
"#a_taxon_fuente"
).
text
(
$
.
i18n
.
prop
(
'a_taxon'
));
$
(
"#a_taxon_fuente"
).
text
(
$
.
i18n
.
prop
(
'a_taxon'
));
$
(
"#a_raster_fuente"
).
text
(
$
.
i18n
.
prop
(
'a_raster'
));
$
(
"#a_raster_fuente"
).
text
(
$
.
i18n
.
prop
(
'a_raster'
));
$
(
"#a_socio_fuente"
).
text
(
$
.
i18n
.
prop
(
'a_socio'
));
$
(
"#a_socio_fuente"
).
text
(
$
.
i18n
.
prop
(
'a_socio'
));
$
(
"#a_emisiones_fuente"
).
text
(
$
.
i18n
.
prop
(
'a_emisiones'
));
$
(
"#a_topo_fuente"
).
text
(
$
.
i18n
.
prop
(
'a_topo'
));
$
(
"#a_topo_fuente"
).
text
(
$
.
i18n
.
prop
(
'a_topo'
));
$
(
"#a_taxon_sumidero"
).
text
(
$
.
i18n
.
prop
(
'a_taxon'
));
$
(
"#a_taxon_sumidero"
).
text
(
$
.
i18n
.
prop
(
'a_taxon'
));
...
...
javascripts/utils_module.js
View file @
de6d12af
...
@@ -76,6 +76,8 @@ var utils_module = (function (verbose) {
...
@@ -76,6 +76,8 @@ var utils_module = (function (verbose) {
function
processDataForFreqCell
(
data
)
{
function
processDataForFreqCell
(
data
)
{
console
.
log
(
data
)
var
min_scr
=
d3
.
min
(
data
.
map
(
function
(
d
)
{
var
min_scr
=
d3
.
min
(
data
.
map
(
function
(
d
)
{
return
parseFloat
(
d
.
tscore
);
return
parseFloat
(
d
.
tscore
);
}));
}));
...
@@ -121,6 +123,7 @@ var utils_module = (function (verbose) {
...
@@ -121,6 +123,7 @@ var utils_module = (function (verbose) {
var
index
=
0
;
var
index
=
0
;
var
index_bucket
=
0
;
var
index_bucket
=
0
;
console
.
log
(
data_freq
)
while
(
index_bucket
<
buckets
)
{
while
(
index_bucket
<
buckets
)
{
...
@@ -179,13 +182,13 @@ var utils_module = (function (verbose) {
...
@@ -179,13 +182,13 @@ var utils_module = (function (verbose) {
return
data_freq
;
return
data_freq
;
}
}
// TODO: Tomar en cuenta cuando se ejecuta el proceso con apriori o prob
// TODO: Tomar en cuenta cuando se ejecuta el proceso con apriori o prob
// Esta sumando cada uno de los analisis que ya lo contienen
// Esta sumando cada uno de los analisis que ya lo contienen
function
reduceScoreCell
(
data
,
val_apriori
=
0
,
numr
=
1
)
{
function
reduceScoreCell
(
data
,
val_apriori
=
0
,
numr
=
1
)
{
var
cross_cells
=
crossfilter
(
data
)
var
cross_cells
=
crossfilter
(
data
)
console
.
log
(
"<---------0--------->"
)
console
.
log
(
data
)
cross_cells
.
groupAll
();
cross_cells
.
groupAll
();
var
cells_dimension
=
cross_cells
.
dimension
(
function
(
d
)
{
var
cells_dimension
=
cross_cells
.
dimension
(
function
(
d
)
{
...
@@ -220,6 +223,7 @@ var utils_module = (function (verbose) {
...
@@ -220,6 +223,7 @@ var utils_module = (function (verbose) {
_VERBOSE
?
console
.
log
(
"processDataForScoreCell"
)
:
_VERBOSE
;
_VERBOSE
?
console
.
log
(
"processDataForScoreCell"
)
:
_VERBOSE
;
var
cells_array
=
data
.
map
(
function
(
d
)
{
var
cells_array
=
data
.
map
(
function
(
d
)
{
return
{
cells
:
d
.
cells
,
score
:
parseFloat
(
d
.
score
)}
return
{
cells
:
d
.
cells
,
score
:
parseFloat
(
d
.
score
)}
});
});
...
...
javascripts/variable_module.js
View file @
de6d12af
...
@@ -113,7 +113,7 @@ var variable_module = (function (verbose, url_zacatuche) {
...
@@ -113,7 +113,7 @@ var variable_module = (function (verbose, url_zacatuche) {
// se comentan variables topograficas por expansión de terreno
// se comentan variables topograficas por expansión de terreno
var
tags
=
abio_tab
?
[
'a_taxon'
,
'a_raster'
,
'a_socio'
]
:
[
'a_taxon'
];
var
tags
=
abio_tab
?
[
'a_taxon'
,
'a_raster'
,
'a_socio'
,
'a_emisiones'
]
:
[
'a_taxon'
];
//var tags = ['a_taxon', 'a_raster', 'a_socio'];
//var tags = ['a_taxon', 'a_raster', 'a_socio'];
...
@@ -293,11 +293,10 @@ var variable_module = (function (verbose, url_zacatuche) {
...
@@ -293,11 +293,10 @@ var variable_module = (function (verbose, url_zacatuche) {
var
_url
=
"https://covid19.c3.unam.mx/gateway/api/nodes/"
var
_url
=
"https://covid19.c3.unam.mx/gateway/api/nodes/"
let
nodo
=
agent_selected
.
toLowerCase
()
let
nodo
=
agent_selected
.
toLowerCase
()
console
.
log
(
"<=======nodo=========>"
)
console
.
log
(
nodo
)
//var query = "query{occurrences_by_taxon_"+ nodo + "(query: \"nombreenfermedad='"+ disease_text_selected +"'\"){reino phylum clase orden familia genero nombrecientifico}}"
//var query = "query{occurrences_by_taxon_"+ nodo + "(query: \"nombreenfermedad='"+ disease_text_selected +"'\"){reino phylum clase orden familia genero nombrecientifico}}"
console
.
log
(
"-*/-*/-*/-*/-*/-*/-*/-*/-*/"
)
switch
(
tax_root
){
switch
(
tax_root
){
case
"familia"
:
case
"familia"
:
_module_toast
.
showToast_CenterCenter
(
"El árbol taxonómico se está cargando, espere unos segundos..."
,
"info"
)
_module_toast
.
showToast_CenterCenter
(
"El árbol taxonómico se está cargando, espere unos segundos..."
,
"info"
)
...
@@ -531,6 +530,50 @@ var variable_module = (function (verbose, url_zacatuche) {
...
@@ -531,6 +530,50 @@ var variable_module = (function (verbose, url_zacatuche) {
}
}
self
.
getTreeFuturo
=
function
(){
console
.
log
(
"self.getTreeFuturo"
)
var
root
=
[
'2021-2040'
,
'2041-2060'
,
'2061-2080'
,
'2081-2100'
];
var
firstchilds
=
[
'ssp126'
,
'ssp245'
,
'ssp370'
,
'ssp585'
];
var
secondchilds
=
[
'ACCESS-ESM1-5'
,
'CNRM-CM6-1'
,
'GFDL-ESM4'
,
'GISS-E2-1-H'
,
'HadGEM3-GC31-LL'
,
'MIROC6'
,
'MPI-ESM1-2-LR'
];
var
data
=
[];
for
(
var
i
=
0
;
i
<
root
.
length
;
i
++
)
{
var
root_node
=
{
'text'
:
root
[
i
],
'children'
:
[]};
for
(
var
j
=
0
;
j
<
firstchilds
.
length
;
j
++
)
{
var
firstchild_node
=
{
'text'
:
firstchilds
[
j
],
'children'
:
[]};
for
(
var
k
=
0
;
k
<
secondchilds
.
length
;
k
++
)
{
var
secondchild_node
=
{
'text'
:
secondchilds
[
k
]};
firstchild_node
[
'children'
].
push
(
secondchild_node
);
}
root_node
[
'children'
].
push
(
firstchild_node
);
}
data
.
push
(
root_node
);
}
$
(
"#jstree_variables_futurofuente"
).
jstree
({
"plugins"
:[
"wholerow"
,
"checkbox"
],
"core"
:{
"data"
:
data
,
"themes"
:{
"name"
:
"proton"
,
"responsive"
:
true
},
"check_callback"
:
true
}
})
$
(
function
()
{
$
(
'#jstree_variables_futurofuente'
).
jstree
();
});
}
self
.
getTreeFuturo
()
self
.
getTreeSocio
=
function
(){
self
.
getTreeSocio
=
function
(){
var
query
=
"query{all_censo_inegi_2020_covariables(limit: 2400, filter:
\"\"
){id name interval bin code}}"
var
query
=
"query{all_censo_inegi_2020_covariables(limit: 2400, filter:
\"\"
){id name interval bin code}}"
...
@@ -735,6 +778,7 @@ var variable_module = (function (verbose, url_zacatuche) {
...
@@ -735,6 +778,7 @@ var variable_module = (function (verbose, url_zacatuche) {
.
attr
(
'data-toggle'
,
'tab'
+
i
+
"_"
+
id
)
.
attr
(
'data-toggle'
,
'tab'
+
i
+
"_"
+
id
)
.
text
(
_iTrans
.
prop
(
tags
[
i
]))
.
text
(
_iTrans
.
prop
(
tags
[
i
]))
.
appendTo
(
li
);
tags
.
appendTo
(
li
);
tags
console
.
log
(
tags
[
i
])
}
}
});
});
...
@@ -1663,6 +1707,53 @@ var variable_module = (function (verbose, url_zacatuche) {
...
@@ -1663,6 +1707,53 @@ var variable_module = (function (verbose, url_zacatuche) {
.
appendTo
(
tab_pane
);
.
appendTo
(
tab_pane
);
}
}
else
if
(
i
===
3
){
var
tab_pane
=
$
(
'<div/>'
)
.
attr
(
'id'
,
'tab'
+
i
+
"_"
+
id
)
.
addClass
(
'tab-pane'
)
.
appendTo
(
tab_content
)
var
tree_nav_container
=
$
(
'<div/>'
)
.
addClass
(
'row nav_species_container'
)
.
appendTo
(
tab_pane
)
var
div_tree
=
$
(
'<div/>'
)
.
attr
(
'id'
,
"treeVariableFuturo"
+
id
)
.
addClass
(
'myScrollableBlockVar'
)
.
appendTo
(
tree_nav_container
);
var
tree
=
$
(
'<div/>'
)
.
attr
(
'id'
,
"jstree_variables_futuro"
+
id
)
.
appendTo
(
div_tree
);
var
btn_add
=
$
(
'<button/>'
)
.
attr
(
'id'
,
'add_group_bioclim'
+
"_"
+
id
)
.
attr
(
'type'
,
'button'
)
.
addClass
(
'btn btn-primary glyphicon glyphicon-plus pull-left'
)
// .click(function (e) {
// self.formQuery("jstree_variables_socio_" + id, self.arraySocioSelected2)
// self.addOtherGroup("jstree_variables_socio_" + id, self.arraySocioSelected, 'Socio', 'treeAddedPanel_' + id, _TYPE_ABIO);
// e.preventDefault();
// })
.
appendTo
(
tab_pane
);
var
btn_add
=
$
(
'<button/>'
)
.
attr
(
'id'
,
'clean_var_bioclim'
+
"_"
+
id
)
.
attr
(
'type'
,
'button'
)
.
addClass
(
'btn btn-primary glyphicon glyphicon-trash pull-left'
)
.
click
(
function
(
e
)
{
// self.groupbioclimvar_dataset = [];
self
.
cleanVariables
(
"jstree_variables_socio_"
+
id
,
'treeAddedPanel_'
+
id
,
_TYPE_ABIO
);
e
.
preventDefault
();
})
.
appendTo
(
tab_pane
);
}
});
});
...
@@ -2531,6 +2622,7 @@ var variable_module = (function (verbose, url_zacatuche) {
...
@@ -2531,6 +2622,7 @@ var variable_module = (function (verbose, url_zacatuche) {
// Realiza la actualización del grupo final con el cual se realizan los cálculos de épsilon y score.
// Realiza la actualización del grupo final con el cual se realizan los cálculos de épsilon y score.
self
.
updateVarSelArray
=
function
(
item
,
operacion
)
{
self
.
updateVarSelArray
=
function
(
item
,
operacion
)
{
// item - llega en forma de array, por tanto para obtener su valor se accede al primer valor
// item - llega en forma de array, por tanto para obtener su valor se accede al primer valor
console
.
log
(
"<----------->"
)
console
.
log
(
"updateVarSelArray"
)
console
.
log
(
"updateVarSelArray"
)
console
.
log
(
self
.
var_sel_array
)
console
.
log
(
self
.
var_sel_array
)
...
@@ -2551,6 +2643,8 @@ var variable_module = (function (verbose, url_zacatuche) {
...
@@ -2551,6 +2643,8 @@ var variable_module = (function (verbose, url_zacatuche) {
}
else
if
(
operacion
==
_AGREGADO
)
{
}
else
if
(
operacion
==
_AGREGADO
)
{
//checar
_VERBOSE
?
console
.
log
(
"elemento añadido"
)
:
_VERBOSE
;
_VERBOSE
?
console
.
log
(
"elemento añadido"
)
:
_VERBOSE
;
self
.
var_sel_array
.
push
({
"value"
:
item
.
elements
,
"type"
:
item
.
type
,
"groupid"
:
item
.
groupid
,
"title"
:
item
.
title
});
self
.
var_sel_array
.
push
({
"value"
:
item
.
elements
,
"type"
:
item
.
type
,
"groupid"
:
item
.
groupid
,
"title"
:
item
.
title
});
...
...
plugins/i18n/in/bundle/nicho_en_EN.properties
View file @
de6d12af
...
@@ -22,6 +22,7 @@ a_clima = Climatic
...
@@ -22,6 +22,7 @@ a_clima = Climatic
a_topo
=
Others
a_topo
=
Others
a_raster
=
Climatic
a_raster
=
Climatic
a_socio
=
Sociodemographic and economic
a_socio
=
Sociodemographic and economic
a_emisiones
=
Future climate
lb_occ
=
Species occurrences
lb_occ
=
Species occurrences
lb_occ_celda
=
Cells with species occurrences
lb_occ_celda
=
Cells with species occurrences
btn_variable
=
Choose Taxon
btn_variable
=
Choose Taxon
...
...
plugins/i18n/in/bundle/nicho_es_ES.properties
View file @
de6d12af
...
@@ -22,6 +22,7 @@ a_clima = Climáticas
...
@@ -22,6 +22,7 @@ a_clima = Climáticas
a_topo
=
Topográficas
a_topo
=
Topográficas
a_raster
=
Clima
a_raster
=
Clima
a_socio
=
Sociodemográficas y económicas
a_socio
=
Sociodemográficas y económicas
a_emisiones
=
Clima Futuro
lb_occ
=
Ocurrencias grupo
lb_occ
=
Ocurrencias grupo
lb_occ_celda
=
Área con ocurrencias del grupo (ni)
lb_occ_celda
=
Área con ocurrencias del grupo (ni)
btn_variable
=
Escoge Grupo
btn_variable
=
Escoge Grupo
...
...
plugins/i18n/in/nicho.properties
View file @
de6d12af
...
@@ -22,6 +22,7 @@ a_clima = Climatic
...
@@ -22,6 +22,7 @@ a_clima = Climatic
a_topo
=
Others
a_topo
=
Others
a_raster
=
Raster
a_raster
=
Raster
a_socio
=
Socioeconomics
a_socio
=
Socioeconomics
a_emisiones
=
Future Climate
lb_occ
=
Species occurrences
lb_occ
=
Species occurrences
lb_occ_celda
=
Cells with species occurrences
lb_occ_celda
=
Cells with species occurrences
btn_variable
=
Taxon
btn_variable
=
Taxon
...
...
plugins/i18n/in/nicho_es.properties
View file @
de6d12af
...
@@ -22,6 +22,7 @@ a_clima = Climáticas
...
@@ -22,6 +22,7 @@ a_clima = Climáticas
a_topo
=
Topográficas
a_topo
=
Topográficas
a_raster
=
Raster
a_raster
=
Raster
a_socio
=
Socioeconómicas
a_socio
=
Socioeconómicas
lb_occ
=
Ocurrencias especie
lb_occ
=
Ocurrencias especie
lb_occ_celda
=
Celdas con ocurrencias de la especie (ni)
lb_occ_celda
=
Celdas con ocurrencias de la especie (ni)
btn_variable
=
Taxon
btn_variable
=
Taxon
...
...
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