Platform
Resources
Pricing
Sign in
Get started
Néstor Andrés Peña
📷 instagram.com/nestor2509
Workspace
Fork
Published
By
Néstor Andrés Peña
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chart
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
color_tipo
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
localidades
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
usaquen
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
sancristobal
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
santafe
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
chapi
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
lugares
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
lugares_pro
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
projection_barrios
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
projection
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
color
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML