Published
Edited
Mar 26, 2022
1 fork
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
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
city_f = select({
title: "",
options: Object.keys(cities),
selected: "Philadelphia",
selectStyle: {
background: "#CFCFCF",
"font-size": "20px",
height: "40px"
},
})
Insert cell
fd_grp_f = select({
title: "",
options: {"🍔 Burger":"Burger",
"🥗 Salad":"Salad",
"🍕 Pizza":"Pizza",
"🍣 Sushi":"Sushi",
"🍦 Ice Cream":"Ice Cream"},
selectStyle: {
background: "#FAFAB8",
"font-size": "20px",
height: "40px"
},
// onchange: ({ select, value }) =>
// d3
// .select(select)
// .style("background", fd_color[value])
})
Insert cell
clustering_f = select({
title: "",
options: {"Restaurants": "Restaurants",
"User Traffic": "Reviews"},
selectStyle: {
background: "blue",
"font-size": "20px",
height: "40px"
},
onchange: ({ select, value }) =>
d3
.select(select)
.style("background", color_category[value])
})
Insert cell
createMap_new = function(L, view = [46.99758, 2.81834], zoom = 5) {
const container = html`<div style="height:550px;">`;
const map = L.map(container).setView(view, zoom);
L.tileLayer(
"https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}{r}.png",
{
attribution:
"| &copy; <a href='http://osm.org/copyright'>OpenStreetMap</a> contributors"
}
).addTo(map);

container.value = map;
return container;
}
Insert cell
Insert cell
Insert cell
Insert cell
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