Published
Edited
Jul 1, 2022
3 forks
Insert cell
Insert cell
Insert cell
viewof variable = Inputs.select(["casos_dx","fallecidos"], {label: "Seleccionar indice"})
Insert cell
Insert cell
viewof overlap = Range([0, 30], {value: 8, step:0.5, label: "Superposición"})
Insert cell
Insert cell
colorea = d3.scaleOrdinal()
.range(["#003f5c","#bc5090"])
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
//endpointToLoad = "https://covidstats.com.ar/ws/evolucioncaba?edaddesde=&edadhasta=&comprimido=1&porprovincia=false&porbarrio=true&provincias%5B%5D=2"

endpointToLoad = "https://covidstats.com.ar/ws/evolucion?edaddesde=&edadhasta=&comprimido=1&porprovincia=true&pordepartamento=false"


Insert cell
Insert cell
Insert cell
fechaInicio = "2020-01-01"
Insert cell
data = {
const dates = d3.timeDay.range(new Date(fechaInicio), new Date(), 1);
return {
dates: dates,
series: Object.values(dataLoaded).sort((a, b) => d3.descending(a.casos_dx[a.casos_dx.length-1], b.casos_dx[b.casos_dx.length-1]))
};
}
Insert cell
import { movingAverage } from "@d3/moving-average"
Insert cell
import {Toggle, Range} from "@observablehq/inputs"

Insert cell
import {detectPeaks} from '@yurivish/peak-detection'

Insert cell
esp2 = d3.timeFormatDefaultLocale(espTime)
Insert cell
espTime = d3.json(
"https://raw.githubusercontent.com/d3/d3-time-format/master/locale/es-ES.json"
)
Insert cell
d3 = require("d3@5", "d3-array@2")
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