Public
Edited
Nov 12, 2024
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
redes = d3.json("https://racimo-api.mpsig.com/racimohub/v110prod/redes")
Insert cell
estaciones = d3.json("https://racimo-api.mpsig.com/racimohub/v110prod/estaciones?filtro=id_red="+red)
Insert cell
estMediciones = d3.json("https://racimo-api.mpsig.com/racimohub/v110prod/mediciones/"+estacion+"/pm25_a,pm10_a,t,h,p/2020-01-01/2024-12-31?mt=d")
Insert cell
mediciones = estMediciones[0].mediciones
Insert cell
allData = {
var med_arr = sql("select fecha_hora_med as fecha, id_parametro, [valor] from ? pivot ( max(valor) for id_parametro ) order by fecha asc", [mediciones]);
return med_arr;
}
Insert cell
// allData____ = Object.assign(d3.csvParse(await FileAttachment("duration.csv").text(), d3.autoType))
Insert cell
// allData.columns
Insert cell
Insert cell
max = d3.max(data, d => d.value)
Insert cell
Insert cell
Insert cell
Insert cell
sql = require("alasql")
Insert cell
sql.options.cache = false
Insert cell
sql.fn.dia = function(d){return d.substring(0, 10)};
Insert cell
import {Select} from "@observablehq/inputs"
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more