Public
Edited
Aug 18, 2022
Insert cell
Insert cell
ss = ss1.concat(ss2).concat(ss3).concat(ss4).concat(ss5).concat(ss6)
Insert cell
Inputs.table(ss)
Insert cell
Insert cell
map = {
let container = DOM.element("div", {
style: `width:${width}px;height:${width / 1.5}px`
});

yield container;

let map = L.map(container).setView([53.4727, -2.2213], 11);
let osmLayer = L.tileLayer(
"https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}@2x.png",
{
attribution: "CARTO"
}
).addTo(map);

let ssPoints = ss.map((record) => [record.Latitude, record.Longitude, 0.2]);

let ssLayer = heatLayer(ssPoints, {
blur: 20,
radius: 30,
max: 0.8
}).addTo(map);
}
Insert cell
Insert cell
L = require("leaflet@1.7.1")
Insert cell
html`<link href='${resolve(
"leaflet@1.7.1/dist/leaflet.css"
)}' rel='stylesheet' />`
Insert cell
heatLayer = (L, require("leaflet.heat").catch(() => L.heatLayer))
Insert cell
ss1 = FileAttachment("2019-01-greater-manchester-stop-and-search.csv").csv()
Insert cell
ss2 = FileAttachment("2019-02-greater-manchester-stop-and-search.csv").csv()
Insert cell
ss3 = FileAttachment("2019-03-greater-manchester-stop-and-search.csv").csv()
Insert cell
ss4 = FileAttachment("2019-04-greater-manchester-stop-and-search.csv").csv()
Insert cell
ss5 = FileAttachment("2019-05-greater-manchester-stop-and-search.csv").csv()
Insert cell
ss6 = FileAttachment("2019-06-greater-manchester-stop-and-search.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