Skip to content

Data visualization and some of the best practices when creating plots and visuals. The history and architecture of Matplotlib, and how to do basic plotting with Matplotlib. Generating different visualization tools using Matplotlib such as line plots, area plots, histograms, bar charts, box plots, and pie charts. Seaborn, another data visualizati…

License

Notifications You must be signed in to change notification settings

camara94/Data-Visualization-with-Python

Repository files navigation

Data Visualization with Python

Learning Objectives

In this course you will learn about:

  • Data visualization and some of the best practices when creating plots and visuals.
  • The history and architecture of Matplotlib, and how to do basic plotting with Matplotlib.
  • Generating different visualization tools using Matplotlib such as line plots, area plots, histograms, bar charts, box plots, and pie charts.
  • Seaborn, another data visualization library in Python, and how to use it to create attractive statistical graphics.
  • Folium, and how to use to create maps and visualize geospatial data.

Syllabus

Module 1 - Introduction to Visualization Tools

  • Introduction to Data Visualization
  • Introduction to Matplotlib
  • Basic Plotting with Matplotlib
  • Dataset on Immigration to Canada
  • Line Plots

Module 2 - Basic Visualization Tools

  • Area Plots
  • Histograms
  • Bar Charts

Module 3 - Specialized Visualization Tools

  • Pie Charts
  • Box Plots
  • Scatter Plots
  • Bubble Plots

Module 4 - Extra Visualization Tools

  • Waffle Charts
  • Word Clouds
  • Seaborn and Regression Plots

Module 5 - Creating Maps and Visualizing Geospatial Data

  • Introduction to Folium and Map Styles
  • Maps with Markers
  • Choropleth Maps

Module 1 - Introduction to Visualization Tools

Learning Objectives

In this lesson you will learn about:

  • Data visualization and some of the best practices to keep in mind when creating plots and visuals.
  • The history and the architecture of Matplotlib.
  • Basic plotting with Matplotlib.
  • The dataset on immigration to Canada, which will be used extensively throughout the course.
  • Generating line plots using Matplotlib.

Introduction to Data Visualization

Why Build Visuals ?

whybuild

Best Practices

bestpractice

Example

example

Example - Remove Background

example remove bg

Example - Remove Border

example remove bg

Example - Remove Redundant Legend

example remove bg

Example - Remove 3D

example remove bg

Example - Remove Text Bolding

example remove bg

Example - Reduce Color

reduce colr

Example - Remove Wedges

remove wedges

Example - Thicken Lines

thicken lines

Example - Emphasize Bacon

emphasizebacon

Comparaison

comparaison

More Examples

more example https://www.darkhorseanalytics.com/

Introduction to Matplotlib

Matplotlib - History

mat

Matplotlib - Archictecture

mat

Backend Layer

backend layer

Artist Layer

artist layer

Putting the Artist Layer to Use

putting artist figure

Scripting Layer

scriptinglayer

Further Reading

further https://aosabook.org/en/matplotlib.html

Basic Plotting with Matplotlib

Matplotlib - Jupyter Notebook

Jupyter notebook is open source web application that allows you to create and share documents that contain live code visualizations and some explonatory text as well. Jupyter has some specialized support for Matplotlib import matplotlib

Matplotlib - Plot Function

In this cours, you can already create visuals tools such as:

  • histograms
  • bar charts
  • box plots
  • and any more using one function Plot

Matplotlib - Backends - inline

magic function %matplotlib inline, the limitation of this backend is we can not modify figure when it is rendered. plot function

Matplotlib - Backends - Notebook

With a notebook backend in place, if a plt function is called, it checks if an active figure exists, and any functions you call will be applied to this active figure. If figure does not exist, it renders a news figure. notebook backend

Matplotlib - Pandas

Pandas is also a built-in implementation of it. there, plotting in pandas is as simple as calling the plot function on a given pandas series or dataframe.

Matplotlib - Pandas - Line

pandas built-in

Matplotlib - Pandas - Histogram

pandas built-in

Dataset on Immigration to Canada

Dataset

dataset

Immigration Data to Canada

immigration data to canada

Read Data into Pandas DataFrame

read data

Display DataFrame

display dataset

Line Plots

lineplot

Dataset - Recap

data recap

Dataset - Precessed

processed

Creating Line Plot

creating line plot

Module 2 - Basic Visualization Tools

Learning Objectives

In this lesson you will learn about:

  • Area plots, and how to create them with Matplotlib.
  • Histograms, and how to create them with Matplotlib.
  • Bar charts, and how to create them with Matplotlib.

Area Plots

areaplot

Dataset - Recap

datasetrecap

Dataset - Processed

datasetprocessed

Generating Area Plots

generatingareaplot generatingareaplot

Area Plots

generatingareaplot

Histograms

hist

Dataset Recap

data

Dataset - Processed

processed

Histograms

hist

Numpy - Histograms

nphist

Bar Charts

barchart

Dataset - Recap

data

Dataset - Processed

dataset

Bar Chart

bar chart

Module 3 - Specialized Visualization Tools

Learning Objectives

In this lesson you will learn about:

  • Pie charts, and how to create them with Matplotlib.
  • Box plots, and how to create them with Matplotlib.
  • Scatter plots and bubble plots, and how to create them with Matplotlib.

Pie Charts

piechart

Dataset - Recap

data

Dataset - Processed

dataset

Pie Chart

df_continent piechar

Outcomes

outcomes

Pie Charts Flows

piechartflows https://www.surveygizmo.com/survey-blog/pie-chart-or-bar-graph

Box Plots

boxplot

Dataset - Recap

data

Dataset - Processed

dataset

Box Plots

boxplot

Scatter Plots

scatter

Dataset - Recap

data

Dataset - Processed

dataset

Scatter Plots

scatter plots

Module 4 - Extra Visualization Tools

Learning Objectives

In this lesson you will learn about:

  • Generating advanced visualization tools such waffle charts and word clouds.
  • Seaborn, and how to use it to generate attractive regression plots.

Waffle Charts

waffle

Word Clouds

wordcloud

Seaborn and Regression Plots

seaborn

Regression Plots

seaborn

Module 5 - Creating Maps and Visualizing

Learning Objectives

In this lesson you will learn about:

  • Folium, a data visualization library in Python.
  • Creating maps of different regions of the world and how to superimpose markers on top of a map.
  • Creating Choropleth maps with Folium

Introduction to Folium

folium

Creating a World Map

worldmap

Creating a Map of Canada

mapofcanada

Map Styles - Stamen Toner

stamen toner

Map Styles - Stamen Terrain

stamenterrain

Maps with Markers

Add a Marker

marker

Label the Marker

makerpup

Choropleth Maps

Geojson File

geaojson

Creating the Map

map

Dataset - Recap

data

Dataset - Processed

dataset

Creating the Map

creatingmap creatingmap

About

Data visualization and some of the best practices when creating plots and visuals. The history and architecture of Matplotlib, and how to do basic plotting with Matplotlib. Generating different visualization tools using Matplotlib such as line plots, area plots, histograms, bar charts, box plots, and pie charts. Seaborn, another data visualizati…

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published