Published
Edited
Sep 16, 2020
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
usaquen = {
let resp = await fetch('https://raw.githubusercontent.com/nestorandrespe/datos-bogota/master/usaquen_barrios.geojson')
let json = await resp.json()
return json
}
Insert cell
sancristobal = {
let resp = await fetch('https://raw.githubusercontent.com/nestorandrespe/datos-bogota/master/sancristobal_barrios.geojson')
let json = await resp.json()
return json
}
Insert cell
santafe = {
let resp = await fetch('https://raw.githubusercontent.com/nestorandrespe/datos-bogota/master/santafe_barrios.geojson')
let json = resp.json()
return json
}
Insert cell
chapi = {
let resp = await fetch('https://raw.githubusercontent.com/nestorandrespe/datos-bogota/master/chapinero_barrios.geojson')
let json = resp.json()
return json
}
Insert cell
lugares = d3.csv('https://raw.githubusercontent.com/nestorandrespe/datos-bogota/master/nosebien.csv')
Insert cell
lugares_pro = {
let resp = []
lugares.map(l => {
const loc = resp.find(d=>d.nombre === l['LocNombre'])
if(loc) {
loc.value++
} else {
let obj = {
nombre: l['LocNombre'],
value: 1
}
resp.push(obj)
}
})
return resp
}
Insert cell
projection_barrios = d3.geoMercator()
.translate([width/2,width/2])
.scale(90000)
.center([-74.176,4.310])
Insert cell
Insert cell
color = d3.scaleSequential(d3.interpolateOranges)
Insert cell
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