Logo Gov.co



Observatorio Ambiental de Bogotá


Herramienta digital para consultar datos, cifras y estadísticas sobre la calidad ambiental de Bogotá. ¡Más de 400 indicadores!

Suscribirme al boletín
Estado de actualización de indicadores Estado de actualización de indicadores
...

'); ventana.document.close(); ventana.focus(); ventana.print(); ventana.close(); return true; } document.getElementById('div_dashboard').addEventListener('fullscreenchange', (event) => { if (document.fullscreenElement) { document.getElementById("div_dashboard").style.display = "block"; } else { document.getElementById("div_dashboard").style.display = "none"; } }); function dashboard() { var elem = document.getElementById("div_dashboard") if (elem.requestFullscreen) { elem.requestFullscreen(); } else if (elem.webkitRequestFullscreen) { /* Safari */ elem.webkitRequestFullscreen(); } else if (elem.msRequestFullscreen) { /* IE11 */ elem.msRequestFullscreen(); } document.getElementById("rotulo").innerHTML = `

${metadato.nombre} - ${metadato.sigla}

` let mostrarValorIdicador = false let mostrarVariables = false // Despliegue según configuración en Arrow if (metadato.tipo_grafica_nombre == "Indicadores por periodo") { dashboard_mostrarGrafica_indicadores_por_periodo(this.out_valores, valor_objetivo_value, unidad_valores) mostrarValorIdicador = true } if (metadato.tipo_grafica_nombre == "Líneas") { dashboard_mostrarGrafica_lineas(this.out_valores, valor_objetivo_value, unidad_valores) mostrarValorIdicador = true } if (metadato.tipo_grafica_nombre == "Variables") { dashboard_mostrarGrafica_variables(variables, this.out_valores, unidades_medida_iguales ? valor_objetivo_value : '', unidad_medida_comun) mostrarVariables = true } if (metadato.tipo_grafica_nombre == "Variables (Barras vertical)") { dashboard_mostrarGrafica_variables(variables, this.out_valores, unidades_medida_iguales ? valor_objetivo_value : '', unidad_medida_comun) mostrarVariables = true } // Despliegue gráfico adicional if (this.valores[0].valor !== '' && mostrarValorIdicador == false) { // Si tiene valor y no se ha desplegado dashboard_mostrarGrafica_lineas(this.out_valores, valor_objetivo_value, unidad_valores) mostrarValorIdicador = true } if (variables.length && mostrarVariables == false) { // Si tiene variables y no se han desplegado dashboard_mostrarGrafica_variables(variables, this.out_valores, unidades_medida_iguales ? valor_objetivo_value : '', unidad_medida_comun) mostrarVariables = true } if (this.valores[this.valores.length - 1].valor !== '') { if (unidad_valores == '%') { dashboard_porcentaje(this.valores[this.valores.length - 1].valor * 1) } else { let b1_valor = number_format_js(this.valores[this.valores.length - 1].valor, 2, '.', ',') b1_valor = b1_valor.replace(".00", "") // Retira decimales en cero document.getElementById("b1").style.fontSize = "5em" document.getElementById("b1").style.paddingBottom = "3%" document.getElementById("b1").style.lineHeight = "0.8em" document.getElementById("b1").innerHTML = `
${b1_valor}
` } document.getElementById("b1-label").innerHTML = "Último valor reportado" } document.getElementById("b2-label").innerHTML = "Último periodo reportado" document.getElementById("b2").innerHTML = `
${this.valores[this.valores.length - 1].periodo}
` indicador.url_mapa ? document.getElementById("b-map").innerHTML = `` : document.getElementById("navVisorTab").style.display = 'none' if (!indicador.url_mapa) { console.log(removerAcentos(localidad_nombre)) document.getElementById("b-map").innerHTML = `` } document.getElementById("b-localidad").innerHTML = `

${localidad_nombre}

` if (mostrarVariables === false) { document.getElementById("b-chart-2").style.display = "none" document.getElementById("b-chart").style.height = "60%" document.getElementById("b1").style.top = "71%" document.getElementById("b2").style.top = "71%" document.getElementById("b1-label").style.top = "95%" document.getElementById("b2-label").style.top = "95%" } if (mostrarValorIdicador === false) { document.getElementById("b-chart").style.display = "none" document.getElementById("b-chart-2").style.top = "10%" document.getElementById("b-chart-2").style.height = "60%" document.getElementById("b1").style.top = "71%" document.getElementById("b2").style.top = "71%" document.getElementById("b1-label").style.top = "95%" document.getElementById("b2-label").style.top = "95%" document.getElementById("b1").style.fontSize = "3em" document.getElementById("b1").style.paddingBottom = "3%" document.getElementById("b1").style.lineHeight = "0.8em" // VARIABLES let b_valores = [] let b_variables = [] let b_i = 0 for (let v = 0; v < variables.length; v++) { b_variables.push(`Últimpo valor ${variables[v].sigla} reportado`) b_valores.push(getValorSigla(this.valores[this.valores.length - 1].variables, variables[v].sigla)) if (b_valores[v] != null) { b_valores[v] = number_format_js(b_valores[v], 2, '.', ',') // Da formato b_valores[v] = b_valores[v].replace(".00", "") // Retira decimales en cero } else { b_valores[v] = '' b_variables[v] = (`Últimpo valor ${variables[v].sigla} no aplica, no disponible o no representativo`) } } setInterval(function () { document.getElementById("b1").innerHTML = `
${variables[b_i].sigla}: ${b_valores[b_i]}
` document.getElementById("b1-label").innerHTML = b_variables[b_i] b_i++ if (b_i >= variables.length) { b_i = 0 } }, 4000); } } const removerAcentos = (str) => { return str.normalize("NFD").replace(/[\u0300-\u036f]/g, ""); }
Ir al contenido
×
OSZAR »