We are going into plotting graphs and creating visualizations within Jupyter notebook.

Before attempting to do any visualization, the best practice is to clean your data as much as possible first. That’s because noise can occur within your visualization as a result of not cleaning data.

  • It may not be possible to clean data at 100%, as we may not notice noise until we visualize them.
  • As you can select and run code cells within Jupyter notebook at will, use that to your advantage since you can always go back to a specific cell to introduce more code for cleaning easily.

In this lesson, we are focusing on the different chart types you can create, and not so much on the data itself. In future lessons, we will also focus on the data.

Introduction to Matplotlib

Let’s open up the file(s) in the 01-Ins_BasicLineGraphs folder to get started.

From here on, you are really using a lot of pre-built functions that simplify how we can visualize code.

The functions obfuscate the complexity of drawing graphs, and we just need to follow the official documentation to plot data.

As you spent time visualizing data on Jupyter Notebook, you will find yourself referring to the documentation a lot. As times go by, it will be easier and easier.

Students Do: New Jersey Weather Line Plots

Configuring Line Plots

Let’s open up the file in the 03-Ins_ConfiguringLinePlots folder to get started.

Students Do: Legendary Temperature

Aesthetics

Let’s open up the file in the 05-Ins_Aesthetics to get started.

Design is a solution, and not merely aesthetical reasons. The bottomline is, can I extract actionable insights from the visualization based on the business context?

Different business context matters.

  • If your visualization is for fast response, you don’t really want details that dwarf what you need to get things done.
  • If your visualization is for science, is it easy for you to self-service insights and draw conclusions accurately?

Students Do: Coaster Speed: Styling Line Plots

Bar Charts

Look at the file(s) in the 07-Ins_BarCharts folder.

From here on out, we assumed that you have done some cleaning and processing of the data already. If you have not done some of the processing work prior to visualization stage, you might find your graphs looking weird.

Students Do: Cars Bar Chart

Pie Charts

Let’s open up the file in the 09-Ins_PieCharts to get started.

Students Do: Pies Pie Chart

Scatter Plots

Let’s open up the file in the 11-Ins_ScatterPlots to get started.

Students Do: Scatter Py

Students Do: Average Rainfall with Pandas