Published
Edited
Mar 27, 2021
Insert cell
Insert cell
Insert cell
L = {
const L = await require("leaflet@1/dist/leaflet.js");
if (!L._style) {
const href = await require.resolve("leaflet@1/dist/leaflet.css");
document.head.appendChild(L._style = html`<link href=${href} rel=stylesheet>`);
}
return L;
}
Insert cell
chroma = require('chroma-js')
Insert cell
lodesMap = {
const lodesCSV = await FileAttachment("lodes_va_distance_h_tract.csv").csv({typed: true});
const lodesMap = {};
for (let row of lodesCSV) {
lodesMap[row.h_tract] = row.median_distance;
}
return lodesMap;
}
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