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.
Start your free 30 days