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 Format2 min read
OBS Studio
Version: 30.0.2 Web: https://obsproject.com There are lots of good options for recording screencasts, but if you want to live-stream T your desktop, one of the best options is OBS Studio. The app works with all the major online streaming providers, s
Linux Format1 min read
Kaki Pi
Another Pi-like SBPC appears! From Yuridenk-Shokai in Japan, this packs a Renesas RZ/V2H Coretex-A55/R8/M33 MPU with 80 TOPS of AI. It’s aimed at robotics and has four CSI video inputs along with a PCIe 3 connection. Find out more in Japanese: www.ka
Linux Format2 min read
Back Issues Missed One?
ISSUE 313 April 2024 Product code: LXFDB0313 In the magazine Discover how to use the ultimate hacker’s toolkit, staying out of trouble while doing so. And join us as we take the Puppy Linux developer’s new distro for a run and explore its container

Related