Book Image

Mastering D3.js

By : Pablo Navarro Castillo, Pablo Navarro Castillo
Book Image

Mastering D3.js

By: Pablo Navarro Castillo, Pablo Navarro Castillo

Overview of this book

Table of Contents (19 chapters)
Mastering D3.js
About the Author
About the Reviewers


In the last chapter of the book, we learned how to use D3 and Socket.IO to create a real-time visualization of geotagged tweets. In this chapter, we described two applications: the streaming server and the client application.

We implemented the streaming server in Node. The streaming server keeps a persistent connection to the Twitter-streaming endpoints and supports several connected users at the same time, with each user adding topics to be tracked on the Twitter-streaming API. When the tweets match one of the user topics, they are delivered to the corresponding client.

In the client application, we used Backbone, Socket.IO, and D3 to create a visualization of where the topics are defined by the user in the world. The user can add topics at any given time; the server will add the topic to its list and begin to send tweets that match the topic to the client.

Through this book, we learned how to use D3 to create several kinds of charts, but mostly, we learned how to create visual components...