Twitter map showcases power of Node.js
Tweetmap is one of the finest Twitter visualisations that we've seen to date. We chat to its creators about how it was put together.
Ever wondered how many tweeters reside in a certain country? Or how often a residents tweet? Well look no further. Tweetmap by Pete Smart and Rob Hawkes represents countries in the world proportionally based on numbers of tweets.
“Tweetmap brings together lots of clever technologies, including TopoJSON, D3.js, Node.js, PhantomJS, and an algorithm to construct contiguous cartograms in real-time," Hawkes explains. "We chose Node.js to power the server side of things as it’s quick, flexible and we already had experience using it to scrape tweets.
"For rendering and animating the map (in TopoJSON format) on the client we use D3, which is a fantastic library for data visualisation. Specifically, we extensively used the geo module, which allows you to do some complex geographic calculations and conversions”.
To prevent performance problems in the browser, Smart and Hawkes use D3.js on the server to render countries and generate contiguous cartograms. “However, we actually run it on the server using PhantomJS (a ‘headless’ WebKit rendering engine) and transmit the maps back to the client,” says Hawkes.
"This prevents the performance hit experienced when generating the cartograms on the client. “The browser locked up for four seconds,” explains Hawkes.
Like this? Read these!
- The best free web fonts for designers
- Useful and inspiring flyer templates
- The best 3D movies of 2013
What do you make of Tweetmap? Let us know in the comments box below!
Thank you for reading 5 articles this month* Join now for unlimited access
Enjoy your first month for just £1 / $1 / €1
*Read 5 free articles per month without a subscription
Join now for unlimited access
Try first month for just £1 / $1 / €1
Get top Black Friday deals sent straight to your inbox: Sign up now!
We curate the best offers on creative kit and give our expert recommendations to save you time this Black Friday. Upgrade your setup for less with Creative Bloq.
The Creative Bloq team is made up of a group of design fans, and has changed and evolved since Creative Bloq began back in 2012. The current website team consists of eight full-time members of staff: Editor Georgia Coggan, Deputy Editor Rosie Hilder, Ecommerce Editor Beren Neale, Senior News Editor Daniel Piper, Editor, Digital Art and 3D Ian Dean, Tech Reviews Editor Erlingur Einarsson and Ecommerce Writer Beth Nicholls and Staff Writer Natalie Fear, as well as a roster of freelancers from around the world. The 3D World and ImagineFX magazine teams also pitch in, ensuring that content from 3D World and ImagineFX is represented on Creative Bloq.
Related articles
- First Impressions: freelance illustrator Marie-Alice Harel loves "the freedom" her work offers
- New York was recreated on a virtual set for the Dakota Johnson and Sean Penn movie Daddio, and nobody knew
- 2D art of the week: Deborah Saez
- Creating the subtle VFX behind Here, the new movie from Robert Zemeckis and Tom Hanks