{"id":1707,"date":"2018-10-01T09:06:00","date_gmt":"2018-10-01T09:06:00","guid":{"rendered":"https:\/\/www.htmlgoodies.com\/uncategorized\/bring-your-data-to-life-with-d3-js\/"},"modified":"2021-04-23T20:21:10","modified_gmt":"2021-04-23T20:21:10","slug":"bring-your-data-to-life-with-d3-js","status":"publish","type":"post","link":"https:\/\/www.htmlgoodies.com\/javascript\/bring-your-data-to-life-with-d3-js\/","title":{"rendered":"Bring Your Data to Life with D3.js"},"content":{"rendered":"
Let’s face it, raw data is boring. Moreover, it can be a challenge to spot patterns in reams of textual format. Visuals are far easier to interpret. Humans tend to be visual by nature, so putting data in a graphical context makes it much easier to spot trends.<\/p>\n
There are a few data visualization libraries, but one in particular that has been gaining a lot of traction of late is D3. Short for Data-Driven Documents, D3 is a JavaScript library for producing dynamic, interactive data visualizations in any web browser. It makes use of the widely implemented SVG, HTML5, and CSS standards. In contrast to many other libraries, D3.js gives you tremendous control over the final result.<\/p>\n
In today’s tutorial we’ll use the D3.js library to display the contents of a CSV data file within a dynamically generated HTML table.<\/p>\n
Our data is a CSV dump of the films from the Sakila Sample Database<\/a>. It’s one of my favorite data sources because its content is entertaining as heck!<\/p>\n “film_id”,”title”,”description”,”release_year”,”rental_rate”,”length”,”rating” “1”,”ACADEMY DINOSAUR”,”A Epic Drama of a Feminist And…”,”2006″,”0.99″,”86″,”PG” “47”,”BABY HALL”,”A Boring Character Study of a A Shark And a Girl who must…”,”2006″,”4.99″,”153″,”NC-17″ “110”,”CABIN FLASH”,”A Stunning Epistle of a Boat And a Man who…”,”2006″,”0.99″,”53″,”NC-17″<\/p>\n <\/pre>\n