Learn practical skills, build real-world projects, and advance your career

Image of Yaktocat

Data Visualization

Data visualization is the graphic representation of data. It involves producing images that communicate relationships among the represented data to viewers. Visualizing data is an esstential part of data analysis and machine learning, but choosing the right type of visualization is often challenging. This guide provides an introduction to popluar data visualization techniques, by presenting sample use cases and providing code examples using Python.

Types of graphs covered:

  • Line graph
  • Scatter plot
  • Histogram and Frequency Distribution
  • Heatmap
  • Contour Plot
  • Box Plot
  • Bar Chart

Import libraries

  • Matplotlib: Plotting and visualization library for Python. We'll use the pyplot module from matplotlib. As convention, it is often imported as plt.
  • Seaborn: An easy-to-use visualizetion library that builds on top of Matplotlib and lets you create beautiful charts with just a few lines of code.
# Uncomment the next line to install the required libraries
# !pip install matplotlib seaborn --upgrade --quiet
# Import libraries
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns