Published
Edited
Jul 8, 2021
Insert cell
md`# Población estimada indec 2020 vs Renaper`
Insert cell
Object.values(indec).filter(d=>d.denominacion == "Arrecifes")
Insert cell
Plot.plot({
grid: true,
width: width,
height: 800,
inset:60,
marginLeft:70,
color: {
domain:[-30,60],
type: "diverging",
scheme: "RdBu"
},
x: {
label: "Población 2010 →",
//tickFormat: t=>d3.format(".1r")(t*1e5),
grid:null
},
y: {
label: "↑ porcentaje de crecimiento 2010 → 2021",
tickFormat:"%",
grid:null


},
marks: [
Plot.ruleY([0]),
Plot.dot(renaperCleaned, {
x: d=>d.indec,
y: d=>d.renaper-d.indec,
fill: "silver",
stroke: "white"
}),
// Plot.text(renaperCleaned, {
// //filter: f=>(f["2010"]>4e5 || (f["2021"]-f["2010"])/f["2010"]>0.4 || (f["2021"]-f["2010"])/f["2010"]<-0.2 ) ,
// x: d=>d.indec,
// y: d=>(d.renaper-d.indec)/d.indec,
// text: t=>t.denominacion + "("+t.parent+")",
// dy: -6
// }
// )

]
})
Insert cell
Insert cell
renaperCleaned.filter(d=>d.denominacion == "La Matanza")
Insert cell
renaperCleaned = renaper.map(d=>{
var val = Object.values(indec).filter(e=>e.parent == d.ndp).filter(r=>r.denominacion==d.ndd)[0]
return{
parent: d.ndp,
denominacion : d.ndd,
renaper: (+d.ca3_18a59 + (+d.ca3_60ym))/0.68,
indec : val?val.hasOwnProperty('personas')?val.personas:1:1
}
})
Insert cell
renaper= FileAttachment("Poblacion_x_Dpto2020_MinInterior@1.csv").csv()
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