avatarNaina Chaturvedi

Summary

The provided content outlines Day 10 of a 30-day data analytics series, focusing on data visualization techniques and the importance of choosing the right charts for data representation, with a preview of upcoming topics in data science and system design.

Abstract

The article is part of a comprehensive 30-day series on data analytics, with Day 10 dedicated to the fundamentals of data visualization. It emphasizes the significance of selecting appropriate charts to convey the intended message from the data, such as line charts for trends, bar charts for comparisons, and scatter plots for relationships. The author provides examples and Python code snippets using libraries like Matplotlib and Seaborn to illustrate various visualization types, including histograms, pie charts, and KDE charts. The post also previews upcoming content in the series, such as advanced visualization techniques, system design concepts, and practical projects. Additionally, the author encourages readers to subscribe to a newly launched YouTube channel, "Ignito," for video content related to the series and invites readers to engage with the material by asking questions and following for updates.

Opinions

  • The author believes that understanding the basics of data visualization is crucial for effective data communication.
  • There is a clear emphasis on the practical application of data visualization techniques, as evidenced by the inclusion of Python code examples.
  • The author is enthusiastic about sharing knowledge and encourages active participation from the audience, suggesting a community-oriented approach to learning.
  • The mention of a wide range of upcoming topics indicates the author's commitment to providing a holistic educational experience in data analytics and related fields.
  • By launching a YouTube channel and offering a newsletter, the author shows a proactive approach to content delivery and audience engagement.

Day 10 of 30 days of Data Analytics with Projects Series

Pic credits : Naina

Welcome back peeps. This is Day 10 of 30 days of data analytics.

What’s covered in the Data Analytics Series till now —

Day 1 : Data Analytics basics and kickstart of Data analytics with projects series

Day 2: Business Understanding — Data Driven Decision Making, Descriptive Analysis, Predictive Analysis, Diagnostic Analysis, Prescriptive Analysis

Day 3 : Data Analytics Ecosystem — Data Life Cycle, Data Analysis complete process ( most important things)

Day 4 : Probability, Conditional Probability, Binomial Distribution, Probability Density Function, Sampling Distribution

Day 5 : Statistics

Day 6 : Basic and Advanced SQL

Day 7 : Data Collection, Data Cleaning and Python

Day 8 : Pandas and Numpy

Day 9 : Data Manipulation

Day 10 : Data Visualization — Part 1

Day 11 : Data Visualization — Part 2

In this post we will cover data visualization — part 1 as follows —

Data Visualization — Part 1

Data Visualization basics

Which chart to choose and when?

Data Visualization — Part 2

Data Visualization using Matplotlib and Seaborn

Data Visualization using Plotly and Folium

Data Visualization using Bokeh

Let’s get started with Data Visualization — Part 1.

  • Choosing the right chart for your data depends on the type of data you have and the message you want to convey.
  • For example, a bar chart is good for comparing different categories, a line chart is good for showing trends over time, and a scatter plot is good for showing the relationship between two variables.
  • Matplotlib and Seaborn are both popular libraries for creating static data visualizations in Python. Matplotlib is a low-level library for creating plots, while Seaborn is built on top of Matplotlib and is designed to make it easier to create more complex visualizations.
  • Plotly and Folium are both libraries that can be used to create interactive data visualizations. Plotly is a library for creating interactive plots, while Folium is a library for creating interactive maps.
  • Bokeh is another popular library for creating interactive data visualizations in Python. It is similar to Plotly, but it is focused more on creating visualizations for the web, and has a more complex architecture.

Projects Videos —

All the projects, data structures, SQL, algorithms, system design, Data Science and ML , Data Analytics, Data Engineering, , Implemented Data Science and ML projects, Implemented Data Engineering Projects, Implemented Deep Learning Projects, Implemented Machine Learning Ops Projects, Implemented Time Series Analysis and Forecasting Projects, Implemented Applied Machine Learning Projects, Implemented Tensorflow and Keras Projects, Implemented PyTorch Projects, Implemented Scikit Learn Projects, Implemented Big Data Projects, Implemented Cloud Machine Learning Projects, Implemented Neural Networks Projects, Implemented OpenCV Projects,Complete ML Research Papers Summarized, Implemented Data Analytics projects, Implemented Data Visualization Projects, Implemented Data Mining Projects, Implemented Natural Leaning Processing Projects, MLOps and Deep Learning, Applied Machine Learning with Projects Series, PyTorch with Projects Series, Tensorflow and Keras with Projects Series, Scikit Learn Series with Projects, Time Series Analysis and Forecasting with Projects Series, ML System Design Case Studies Series videos will be published on our youtube channel ( just launched).

Subscribe today!

In this post we will first cover the different ( important) charts in the visualization libraries stack —

Line Chart —

Line chart are used to show trends over the period time or categories i.e to show changes in one variable value relative to another..

Example :

Pic credits : Google dev

Column Chart —

Column charts are used to show to show comparison between different variables or multiple categories over time. It’s plotted using vertical bars.

Example :

Pic credits : excelest

Stacked Column Chart —

Stacked Column Chart is used to show relative percentage of multiple data categories or variables in stacked columns. It’s plotted using vertical bars.

Example :

Pic credits : OriginalLabs

Pie Chart —

Pie charts are used to show data as a percentage of a whole i.e to let user compare the relationship between different categories/dimension in some context.

Example :

Pic credits : ResearchGate

Donut Chart —

Just like pie chart but with a hole in the centre; donut chart is used to visualize the categories as arcs.

Example :

Pic credits : fintrain

Area Chart —

Area Charts are used to present the accumulative value changes over time and draw attention to the total value across a trend.

Example :

Pic credits : Anycharts

Bar Chart —

Bar charts are used to show to show values across different data variables/categories where values are represented on the x-axis and categories on the y-axis.

Example :

Pic credits : displayr

Scatter Plot —

Scatter plot are used to show distribution, correlation analysis and clustering trends.

Example :

Pic credits : DataViz

Box plot —

Box plots are used to show data using the median (middle value) of the data and the quartiles, or 25% divisions of the data as shown in the image below.These charts are powerful to spot the outliers and the overall distribution of the data.

The middle line is nothing but the median value of the data.

Pic credits : Onlinemathlearning

KDE Chart —

Kernel Density Estimation ( KDE) chart is used to show the the distribution of data points/values i.e. project the probability density of a continuous variable in more interpretable format.

Example :

Histograms —

Histogram is one of the most important chart which is largely used to represent analytics and projections. It is used to show frequency over a distribution.

Example :

Pic credits : Googledev

Code Implementation —

import numpy as np
import matplotlib.pyplot as plt

# Line Chart
x = np.linspace(0, 10, 100)
y = np.sin(x)
plt.plot(x, y)
plt.title('Line Chart')
plt.xlabel('X')
plt.ylabel('Y')
plt.show()

# Column Chart
x = ['A', 'B', 'C', 'D']
y = [10, 15, 7, 12]
plt.bar(x, y)
plt.title('Column Chart')
plt.xlabel('Categories')
plt.ylabel('Values')
plt.show()

# Histogram
data = np.random.randn(1000)
plt.hist(data, bins=30)
plt.title('Histogram')
plt.xlabel('Values')
plt.ylabel('Frequency')
plt.show()

# Bar Chart
x = ['A', 'B', 'C', 'D']
y = [10, 15, 7, 12]
plt.barh(x, y)
plt.title('Bar Chart')
plt.xlabel('Values')
plt.ylabel('Categories')
plt.show()

# Stacked Column Chart
x = ['A', 'B', 'C', 'D']
y1 = [10, 15, 7, 12]
y2 = [5, 8, 10, 6]
plt.bar(x, y1)
plt.bar(x, y2, bottom=y1)
plt.title('Stacked Column Chart')
plt.xlabel('Categories')
plt.ylabel('Values')
plt.legend(['Y1', 'Y2'])
plt.show()

# Pie Chart
labels = ['A', 'B', 'C', 'D']
sizes = [30, 25, 15, 30]
plt.pie(sizes, labels=labels, autopct='%1.1f%%')
plt.title('Pie Chart')
plt.show()

# Donut Chart
sizes = [30, 25, 15, 30]
plt.pie(sizes, labels=labels, autopct='%1.1f%%', wedgeprops={'edgecolor': 'white'})
plt.title('Donut Chart')
plt.show()

# Area Chart
x = np.linspace(0, 10, 100)
y = np.sin(x)
plt.fill_between(x, y, alpha=0.3)
plt.title('Area Chart')
plt.xlabel('X')
plt.ylabel('Y')
plt.show()

# Scatter Plot
x = np.random.randn(100)
y = np.random.randn(100)
plt.scatter(x, y)
plt.title('Scatter Plot')
plt.xlabel('X')
plt.ylabel('Y')
plt.show()

# Box Plot
data = [np.random.normal(0, std, 100) for std in range(1, 4)]
plt.boxplot(data)
plt.title('Box Plot')
plt.xlabel('Data')
plt.ylabel('Values')
plt.show()

# KDE Chart
data = np.random.randn(1000)
plt.hist(data, bins=30, density=True)
plt.title('Histogram with KDE')
plt.xlabel('Values')
plt.ylabel('Density')

# KDE
kde = scipy.stats.gaussian_kde(data)
x = np.linspace(data.min(), data.max(), 100)
plt.plot(x, kde(x))
plt.legend(['KDE'])
plt.show()

To summarize —

  1. When you want to show distribution , then use -
  • For single variable with few data points — Use column histogram
  • For Single Variable with many data points — Use Histogram
  • For two variable s— Use Scatter Chart
  • For three variables — 3 D Area Chart

2. When you want to show composition, then use —

  • For static composition, to show share of total — Use pie chart
  • For static composition, to show accumulation or total over a period of time — Use waterfall
  • For dynamic composition, to show many periods — Use Stacked Area Chart
  • For Dynamic composition, to show only few periods — Use Stacked Column Chart

3. When you want to show relationship, then use —

  • When you want to show relationship between two variables — Use scatter chart
  • When you want to show relationship between three variables — Use Bubble Chart

4. When you want to show Comparison, then use —

  • When you want to show comparison, and have many items for few categories — Use bar chart
  • When you want to show comparison, and have few items for few categories — Use Column Chart
  • When you want to show comparison, and have many periods over time for cynical data — Use Area Chart
  • When you want to show comparison, and have many periods over time for non- cynical data — Use Line Chart

Tips and Tricks —

  • When you want to show the main point of the entire data over time — Use Tables
  • When you want to show color intensity and changes — Use heatmap
  • When you want to show categorical Data — Use bar charts
  • When you want to show two baselines for comparisons — Use stacked horizontal bar charts
  • When you want to show the proportions of the population in different age and gender categories — Use Population Pyramid
  • When you want to show multiple data for different categories — Use divided bar chart

That’s it for now. Day 11: Data Visualization — Part 2 !

Let me know if you have questions in the comment section below. Subscribe/ Follow, Like/Clap as it would encourage me to write more in my free time

Stay Tuned!!

Read More —

11 most important System Design Base Concepts

1. System design basics

2. Horizontal and vertical scaling

3. Load balancing and Message queues

4. High level design and low level design, Consistent Hashing, Monolithic and Microservices architecture

5. Caching, Indexing, Proxies

6. Networking, How Browsers work, Content Network Delivery ( CDN)

7. Database Sharding, CAP Theorem, Database schema Design

8. Concurrency, API, Components + OOP + Abstraction

9. Estimation and Planning, Performance

10. Map Reduce, Patterns and Microservices

11. SQL vs NoSQL and Cloud

12. Most Popular System Design Questions

13. System Design Template — How to solve any System Design Question

14. Quick RoundUp : Solved System Design Case Studies

System Design Case Studies — In Depth

Design Instagram

Design Messenger App

Design Twitter

Design URL Shortener

Design Dropbox

Design Youtube

Design API Rate Limiter

Design Web Crawler

Design Facebook’s Newsfeed

Design Yelp

Design Uber

Design Tinder

Design Tiktok

Design Whatsapp

Most Popular System Design Questions

Mega Compilation : Solved System Design Case studies

Complete Data Structures and Algorithm Series

Complexity Analysis

Backtracking

Sliding Window

Greedy Technique

Two pointer Technique

Arrays

Linked List

Strings

Stack

Queues

Hash Table/Hashing

Binary Search

1- D Dynamic Programming

Divide and Conquer Technique

Recursion

Some of the other best Series —

60 days of Data Science and ML Series with projects

30 Days of Natural Language Processing ( NLP) Series

30 days of Machine Learning Ops

30 days of Data Structures and Algorithms and System Design Simplified

60 Days of Deep Learning with Projects Series

30 days of Data Engineering with projects Series

Data Science and Machine Learning Research ( papers) Simplified **

100 days : Your Data Science and Machine Learning Degree Series with projects

23 Data Science Techniques You Should Know

Tech Interview Series — Curated List of coding questions

Complete System Design with most popular Questions Series

Complete Data Visualization and Pre-processing Series with projects

Complete Python Series with Projects

Complete Advanced Python Series with Projects

Kaggle Best Notebooks that will teach you the most

Complete Developers Guide to Git

Exceptional Github Repos — Part 1

Exceptional Github Repos — Part 2

All the Data Science and Machine Learning Resources

210 Machine Learning Projects

Tech Newsletter —

If you are interested, you can join my newsletter through which I send tech interview tips, techniques, patterns, hacks — Software Development, ML, Data Science, Startups and Technology projects to more than 30K readers. You can subscribe to Tech Brew :

For Python Projects —

For complete 60 days of Data Science and ML : Day 1 — Day 60 : Quick Recap of 60 days of Data Science and ML

Follow for more updates. Stay tuned and keep coding!

For other projects, tune to —

Build Machine Learning Pipelines( With Code)

Recurrent Neural Network with Keras

Clustering Geolocation Data in Python using DBSCAN and K-Means

Facial Expression Recognition using Keras

Hyperparameter Tuning with Keras Tuner

Custom Layers in Keras

Data Science
Machine Learning
Tech
Programming
Artificial Intelligence
Recommended from ReadMedium