
Chapter 3. Getting to Grips with Visualization
Sometimes, we don't know how valuable data is until we look at it. In this chapter, we will look into a JavaScript-based web visualization framework called D3 (Data-Driven Documents) to create visualizations that make complex information easier to understand. We will cover the following topics:
- What is visualization?
- The visualization lifecycle
- Visualizing different types of data
- Data from social networks
- An overview of visualization analytics
Exploratory Data Analysis (EDA), as mentioned in Chapter 2, Preprocessing Data, is a critical part of the data analysis process because it helps us to detect mistakes, determinate relationships, and tendencies, identify outliers, trends, and patterns, or check assumptions. In this chapter, we will present some examples of visualization methods for EDA with discrete and continuous data.
The four types of EDA are univariate nongraphical, multivariate nongraphical, univariate graphical, and multivariate graphical. The nongraphical methods refer to the calculation of summary statistics or the outlier detection. In this book, we will focus on the univariate and multivariate graphical models, using a variety of visualization tools such as bar charts, pie charts, scatter plots, line charts, and multiple line charts, all implemented in D3.js.
In this chapter, we will work with two types of data: discrete data with a list of summarized Pokemon types (see Chapter 2, Preprocessing Data), and, on the other hand, continuous data using historical exchange rates from March 2008 to March 2013. We will also explore the creation of a random dataset.
Working with web-based visualization
A data journalist and information designer David McCandless stated in his TED talk:
"By visualizing information, we turn it into a landscape that you can explore with your eyes, a sort of information map. And when you're lost in information, an information map is kind of useful."
The World Wide Web (WWW) is an information space, which publishes and displays information via the Internet. The accessibility of information through online information services and the WWW is increasing day by day. A vast amount of information is available on websites, which can be accessed through the Internet. But the user may find the information difficult to read, and hence spends a lot of time on the web. Therefore, on websites, the information should be user friendly and reading through it should not take too much time.
Most people prefer pictures over text, so the use of graphical representation of information is increasing daily, leading us to an understanding of how information is structured. We can create and post graphs for the visualization of information in a highly interactive manner all over the web.
To understand the concept well, let's look at the following screenshot that was created and posted interactively on a website:

In this chapter, we will discuss and use D3, the web-based visualization tool.