O'Reilly logo

Expert Data Visualization by Jos Dirksen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Showing the information on the map

In the showSubscription function, we first add a circle on the location of the meetup:

function showSubscription(lat, lon, rsvp, image, name) {      var position = projection([lon, lat]);     mapGroup.append("g")         .append("circle")         .attr("cx",position[0])         .attr("cy",position[1])         .attr("class", "rsvp-" + rsvp)         .transition().duration(1500).attr("r",circleSize*3)         .transition().duration(1000).attr("r",circleSize)         .transition().duration(1500).delay(60000)             .attr("r",0)             .on("end", function() {                 d3.select(this).remove()             })     ... }

We first use the projection function to determine the x and y coordinates where to place the circle. Next, based on the rsvp value, we assign a different CSS class. The rsvp-yes class ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required