Public
Edited
Mar 28
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
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
semanas = d3.max(
dataLoadedCABA.filter((d) => d.ano == 2024),
(d) => d.semana_epidemiologica
)
Insert cell
Insert cell
Insert cell
Insert cell
fechaInicioDataset = d3.min(
dataLoadedCABA,
(d) => d.fecha_inicio_semana_epidemiologica
)
Insert cell
ultimafecha = d3.max(xlsCasosPorDia, (d) => d.fecha)
Insert cell
fechas = d3.utcWeek.range(
new Date(fechaInicio),
d3.max(dataLoadedCABA, (d) => d.fecha_inicio_semana_epidemiologica),
1
)
Insert cell
fechaInicio = "2024-01-01"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
xlsCasosPorComunaEneAbr = d3.rollup(
xlsCasos2.filter((d) => d.ano == 2024 && 13 > d.semana_epidemiologica),
(v) => d3.sum(v, (vv) => vv.n_notificaciones),
(d) => d.departamento_residencia
)
Insert cell
dengue2025 = FileAttachment("casos_dengue@18.csv") .arrayBuffer()
.then((buffer) => {
// Intentamos decodificar con ISO-8859-1, una codificación común en archivos en español.
const text = new TextDecoder("iso-8859-1").decode(buffer);
return d3.dsvFormat(";").parse(text);
})
.then((importedData) => {
return importedData.map((row) => {
// Make a copy of the row to avoid modifying the original
const transformedRow = { ...row };

// // // Add or modify fields as needed
// transformedRow.año = +transformedRow.año;
// transformedRow.cantidad_ciclistas = +transformedRow.cantidad_ciclistas;
// transformedRow.esCiclovia = puntosciclovia.filter(
// (e) => e.CENTROIDE == transformedRow.centroide
// ).length
// ? 1
// : 0;
// transformedRow.esTucuman = transformedRow.cruce.search("TUCUMAN") >= 0;

return transformedRow;
});
})
Insert cell
workbook = FileAttachment("casos_dengue@47.xlsx").xlsx()
Insert cell
workbook.sheetNames
Insert cell
data1 = workbook.sheet(0, {
headers: true
// range: "A1:J10"
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import { Scrubber } from "@mbostock/scrubber"
Insert cell
workbook1 = FileAttachment("Desinsectaciones de enero a marzo 24.xlsx").xlsx()
Insert cell
workbook1.sheetNames
Insert cell
data2 = workbook1.sheet(0, {
headers: true
// range: "A1:J10"
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data2
Type Table, then Shift-Enter. Ctrl-space for more options.

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