Chapter 2. Creating Attractive Data Visualizations

In this chapter, we will cover:

  • Graphing Anscombe's quartet
  • Choosing seaborn color palettes
  • Choosing matplotlib color maps
  • Interacting with IPython notebook widgets
  • Viewing a matrix of scatterplots
  • Visualizing with d3.js via mpld3
  • Creating heatmaps
  • Combining box plots and kernel density plots with violin plots
  • Visualizing network graphs with hive plots
  • Displaying geographical maps
  • Using ggplot2-like plots
  • Highlighting data points with influence plots

Introduction

Data analysis is more of an art than a science. Creating attractive visualizations is an integral part of this art. Obviously, what one person finds attractive, other people may find completely unacceptable. Just as in art, in the rapidly evolving world of data analysis, opinions, and taste change over time; however, in principle, nobody is absolutely right or wrong. As data artists and Pythonistas, we can choose from among several libraries of which I will cover matplotlib, seaborn, Bokeh, and ggplot. Installation instructions for some of the packages we use in this chapter were already covered in Chapter 1, Laying the Foundation for Reproducible Data Analysis, so I will not repeat them. I will provide an installation script (which uses pip only) for this chapter; you can even use the Docker image I described in the previous chapter. I decided to not include the Proj cartography library and the R-related libraries in the image because of their size. So for the two recipes involved in this chapter, you may have to do extra work.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset