-
Book Overview & Buying
-
Table Of Contents
Learn D3.js - Second Edition
By :
In this chapter, you learned how to l oad and parse an external data source for a data visualization, transforming it from tabular and hierarchical formats into an array or object you can use in your code.
We introduced the functions from the d3-fetch module that fetch data via asynchronous HTTP requests, handle responses, and load and parse text and binary data in a single step, returning a JavaScript promise.
This chapter also described the d3-dsv module, which contains parsers that convert tabular delimiter-separated string datasets into arrays and vice versa. They give you greater control over how your data is structured. You learned how to choose the best parser for each format, configure it with a row function, and use it to transform a tabular data string into an array of objects or an array of arrays.
To put into practice what you have learned here, we applied the tools learned so far in a complete visualization, presented as an online step-by-step tutorial...