I am trying to use this example http://bl.ocks.org/gisminister/10001728
Most of it works so far, at least on the leaflet part, which resulted in a few issues in my setup.
Now that I solved this, I have a problem with the used version of D3, I am using v.7.3.0 and therefore cannot use nest() or layout(). I alread tried to use the d3-array library for using group() but it does not seem to work.
I am loading the libraries like this:
import * as L from "leaflet/dist/leaflet-src";
import * as d3 from "d3";
import "d3-array";
import "leaflet.markercluster/dist/leaflet.markercluster.js";
import "leaflet.markercluster/dist/MarkerCluster.css";
import "leaflet.markercluster/dist/MarkerCluster.Default.css";
and try to use the functionalities here:
data = d3
.group() //Build a dataset for the pie chart
.key(function (d) {
return d.feature.properties[categoryField];
})
.entries(children, d3.map),
Logging d3.group() just outputs undefined. All of the libraries have been installed using npm and are up-to-date.
Any idea on how I could solve this issue? Thanks in advance for your help.