filter_map = {
const [t0, t1] = [chartB[0][0].getTime(), chartB[1][0].getTime()];
const [m1, m0] = [chartB[0][1], chartB[1][1]];
d3.select(chartA).selectAll("circle")
.attr("r", d => d.datum.properties.mag)
.attr("fill-opacity", 0.5)
.attr("stroke", "#f00")
.attr("visibility", d => (d.datum.properties.time > t0 && d.datum.properties.time < t1
&& d.datum.properties.mag > m0 && d.datum.properties.mag < m1)
? "visible" : "hidden");
const n = d3.select(chartA).selectAll("circle")
.filter(function() { return d3.select(this).attr("visibility") == "visible" })
.nodes().length;
return md`${n} earthquakes are visible on the map.`
}