map1 = {
const quantile = d3.scaleQuantile()
.domain(data.features.map(d => d.properties[culture]))
.range(d3.schemeBlues[5])
function style(feature) {
return {
fillColor: quantile(feature.properties[culture]),
weight: 2,
opacity: .7,
color: 'white',
dashArray: '3',
fillOpacity: 0.7,
stroke: false
};
}
const container = yield htl.html`<div style="height: 600px;">`;
const map = L.map(container).setView([46.5, 2.33], 6);
L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
attribution: "© <a href=https://www.openstreetmap.org/copyright>OpenStreetMap</a> contributors"
}).addTo(map);
L.geoJSON(data, {style: style}).addTo(map);
return(map)
}