Public
Edited
May 14
Insert cell
Insert cell
Insert cell
d3 = require("d3@7")
Insert cell
{
window.d3 = d3
}
Insert cell
Insert cell
path = "https://docs.google.com/spreadsheets/d/e/2PACX-1vQ8uqJpL3D0YdvLdploiUzmbAFre8V0Vn5nUdemkDJ5pYl7UnPpLCUFu5OkhaEtiM8p07aSiGsrC8SN/pub?output=csv"
Insert cell
Insert cell
imgUrl = "https://lh3.googleusercontent.com/d/"
Insert cell
Insert cell
csvString = fetch(path).then((response) => response.text())
Insert cell
Insert cell
data = d3.csvParse(csvString, d3.autoType).map(e => ({
...e,
ID: e.n,
URL: e.repositorio,
IMGURL: imgUrl + e.id,
CONT: e.descripcion && e.descripcion.trim().length > 0 ? e.descripcion : "NI",
otros: e.otros === "False" ? false : e.otros == "True" ? true : e.otros

}))
Insert cell
Insert cell
tabla = Inputs.table(data)
Insert cell
Insert cell
Insert cell
Aventura = (await import(await FileAttachment("aventura-2.js").url())).default

Insert cell
Insert cell
aventura = new Aventura("es", {

adventureSlide: false,
typewriterSpeed: 0,
evalTags: true,
vizImageSize: 70,
urlWord: "Repositorio",
vizWidth: 1000,
vizHeight: 1000,
contenedorAventura: "contenedor-panel"
})
Insert cell
Insert cell
escenas = ({

"inicio": {
"titulo": "Comparar",
"texto": "Eso es",
"viz": {"filter":[[]], "type": "compare", "x": 1, "y": 2},
}
})
Insert cell
Insert cell
await aventura.fijarDatosEscenas(escenas, data);

Insert cell
Insert cell
aventura.iniciarAventura("inicio")
Insert cell
d3.scaleBand
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