Linux Format

Turn your data plots into visual information

 This month’s coding tutorial is on D3.js, a powerful low-level JavaScript library that can create unique, highly customisable and impressive graphical output based on your data. For reasons of simplicity most of the examples shown here will include the data that will be visualised in the HTML file that contains the JavaScript code. However, D3.js enables you to read data from text files that reside either on your local machine or online.

The D3.js (Data Driven Documents) library can be downloaded using a script tag in the HTML page that contains the JavaScript code. The code processes and creates your visualisations, so there’s no need to download it locally. Additionally, you’re free to read the JavaScript code of D3.js and make any changes or improvements you want to it!

There are several advantages to using D3.js. First, it can create professional output on the fly without the need to store PNG and PDF files that you’ll have to embed into HTML code. Second, if you’re reading data from the Internet or from a local file that changes, a page refresh is enough to obtain the new data and automatically update the plots. Third, D3 can create animated and interactive graphics – and there are plenty of visualisations that can benefit from these two features. Finally, if

You’re reading a preview, subscribe to read more.

More from Linux Format

Linux Format4 min read
Linux
The #1 open source mag Future Publishing Limited, Quay House, The Ambury, Bath, BA1 1UA Email contact@linuxformat.com EDITORIAL Editor-in-chief Neil Mohr Art editor Fraser McDermott Production editor Katharine Davies Group editor-in-chief Graham Bar
Linux Format2 min read
Suitability For Beginners
These distros are focused on a technical area of computer use, penetration testing, but that doesn’t mean they’re T not suitable for beginners in this discipline. It’s not much of a surprise that a Gentoo-based distro like Pentoo is more complicated
Linux Format3 min read
Hacker Distros
Kali has it all if you want a pre-made networkhacking distribution. It has an impressive number K of editions to cover most installation scenarios, plus a slick-looking lightweight desktop and a huge set of built-in, well-categorised hacking tools. I

Related