The D3 Fetch API is built off the Fetch specification also implemented in vanilla JavaScript as fetch(). It’s an alternative to Asynchronous Javascript and XML (AJAX), which was used in previous versions of D3 to retrieve external data. Like AJAX, Fetch allows the developer to obtain data from the background of the web page. This technique is extremely useful in map development because geographic datasets can be very large. Acquiring the data from the background will help produce a refined user experience. In addition, in Chapter 6, Finding and Working with Geographic Data, we will cover techniques to compress the size of geographic data.
Separating the data from the code base will also provide the following advantages:
- A lighter code base that is easier to manage
- The ability to update the data without making code changes
- The ability to use third-party providers...