Public
Edited
Nov 5, 2022
1 fork
Insert cell
Insert cell
Insert cell
viewof table = Inputs.table(data.features.map(d => d.properties))
Insert cell
Insert cell
Insert cell
Insert cell
d3.toto = ss.ckmeans(data.features.map(d => d.properties[culture]), 5);
Insert cell
d3.toto = ss.ckmeans
Insert cell
d3['toto'](data.features.map(d => d.properties[culture]), 5)
Insert cell
Insert cell
map1 = {
//let culture = "Prairies permanentes"
const quantile = d3.scaleQuantile()
//const quantile = d3.scaleCluster()
.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)
}
Insert cell
import {view} from "@neocartocnrs/geoverview"
Insert cell
view(data)
Insert cell
import {choroplethMap} from "@armollica/reusable-choropleth-map"
Insert cell
Insert cell
d3 = require("d3-array@2", "d3-format@2", "d3-scale@3", "d3-selection@2", "d3-scale-chromatic")
Insert cell
ss = require('simple-statistics')
Insert cell
toto = require("d3-scale-cluster")
Insert cell
toto()
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