SlideShare uma empresa Scribd logo
1 de 63
A picture speaks a thousand words
Data Visualisation with R
Barbara Fusinska
@BasiaFusinska
About me
Programmer
Machine Learning
Data Solutions Architect
@BasiaFusinska
Agenda
• Exploratory Data Analysis
• Elements of EDA
• Visual artifacts
• R Visualisation ecosystem
• Base/Lattice/ggplot2 comparison
• Layers in ggplot2
• Interesting visualisations
https://github.com/BasiaFusinska
https://katacoda.com/BasiaFusinska
Exploratory Data Analysis (EDA) is an
approach to analysing data sets to
summarize their main characteristics, often
with visual methods.
A statistical model can be used or not, but
primarily EDA is for seeing what the data
can tell us beyond the formal modelling or
hypothesis testing task.
Why do we need visualisations?
Insight Impress
Use Case - Online Learning Platform
User
Area
Vendor
Course
Course
Taken
Cloud (25%)
Data Science (50%)
Web (15%)
Software Engineering
(10%)
Software Mind (20%)
Cloud Solutions (3%)
InfraNet (12%)
DataLearn (7%)
WWW Way (11%)
Soft Skills (4%)
Edu Zen (10%)
Data Foundation (25%)
Learning Island (5%)
Design Your Way (3%)
2014
2015
2016
Prices:
10$ (25%) 99$ (20%)
19$ (15%) 250 (15%)
49$ (20%) 500 (5%)
courses.aggregate
Name Area Vendor Year Month Price [$]
Perez, Lisa Data Science Data Foundation 2015 7 99
Tran, Janiro Software Engineering DataLearn 2016 2 10
Bajwa, John Cloud InfraNet 2015 9 250
Lindsey, Aaron Web Software Mind 2014 6 19
Cooper, Duncan Software Engineering Learning Island 2014 7 250
Grumbach, Alexander Web Design Your Way 2015 2 99
Categorical data - count occurrences
Cloud Data
Science
Software
Engineering
Web
693 2271 462 1574
# Count occurrences
courses.areas <-
table(courses.aggregate$area
Bar plot – Number of courses taken by Area
# Draw the plot
barplot(courses.areas,
ylab="Count",
main="Areas")
Categorical data count occurrences
# Count occurrences
vendor.area <- table(data.frame(
courses.aggregate$area,
courses.aggregate$vendor))
CSol DataF DataL DesYW EZen …
Cloud 0 263 49 28 0
Data
Science
91 636 90 0 192
Software 0 44 83 95 0
Web 0 267 207 0 158
Stacked Bar plot – Areas by Vendors
# Draw the plot
barplot(vendor.area, ylab="Count",
main="Areas by Vendor",
col=rainbow(4))
legend("topright", fill=rainbow(4),
legend=row.names(vendor.area
))
Stacked Beside Bar plot – Areas by Year
# Count occurrences
areas.year <- table(data.frame(
courses.aggregate$area,
courses.aggregate$year))
# Draw the plot
barplot(areas.year, ylab="Count",
main="Areas By Year",
col=rainbow(4), beside=TRUE)
legend("topleft", fill=rainbow(4),
legend=row.names(areas.year))
Stacked Bar plot – Areas by Year
# Draw the plot
barplot(areas.year, ylab="Count",
main="Areas by year",
col=rainbow(4))
legend("topright",
legend=row.names(areas.year),
fill=rainbow(4))
100% Stacked Bar plot – Areas by Year
# Draw the plot
barplot(prop.table(areas.year, 2)*100,
col=rainbow(4), ylab="%",
main="Years by Areas")
legend("topright",
legend=row.names(areas.year),
fill=rainbow(4))
Pie chart – Areas
# Areas occurrences
per_labels <- round(
courses.areas/sum(courses.areas) * 100, 1)
per_labels <- paste(per_labels, "%", sep="")
# Draw the plot
pie(courses.areas,
col=rainbow(4),
labels=per_labels)
legend("topleft", fill=rainbow(4)
legend=names(courses.areas))
Numerical data – summarise
# Calculate yearly revenue
revenue.year <-
aggregate(price~year,
data=courses.aggregate, sum)
Year Price
2014 139001
2015 159002
2016 180197
Bar plot – Revenue per year
# Draw the plot
barplot(revenue.year$price,
names.arg =
revenue.year$year,
ylab="Count [$]",
main="Revenue per year")
Categorical data - count occurrences
# Prepare data
library(reshape)
revenue.year.area <- aggregate(
price ~ year + area,
data=courses.aggregate, sum)
rya <- t(cast(revenue.year.area,
year ~ area, value="price"))
2014 2015 2016
Cloud 127474 17873 16819
Data
Science
65639 73645 74289
Software 8342 9976 11781
Web 52556 57508 77308
Stacked Bar plot – Revenue by Year and Area
# Draw the plot
barplot(rya, col=rainbow(4),
ylab="Count [$]",
main="Revenue by Year & Area")
legend("topright", fill=rainbow(4),
legend=row.names(rya))
Stacked Beside Bar plot – Areas Revenue by Year
# Draw the plot
barplot(rya, col=rainbow(4),
ylab="Count [$]",
main="Revenue by Year & Area",
beside=TRUE)
legend("topright", fill=rainbow(3),
legend=row.names(rya))
Histograms – Frequency & Density
Histogram – Course Prices
# Draw the plot
hist(courses.aggregate$price,
main="Ditribution of prices",
xlab="Course price",
breaks=20,
col=heat.colors(20))
Histogram – Course Prices per month
# Prepare the data
revenue.year.month <-
aggregate(price ~ year + month,
data=courses.aggregate, sum)
# Draw the plot
hist(revenue.year.month$price,
main="Distribution of revenue per month",
xlab="Revenue per month",
breaks=20,
col=heat.colors(20))
Density – Course Prices per month
# Probability density
hist(revenue.year.month$price,
main="Distribution of revenue per month",
xlab="Revenue per month", breaks=20,
col=heat.colors(20), prob=TRUE)
lines(density(revenue.year.month$price))
Bivariate graphs
Bar & line plot – Revenue by month
# Draw the plot
revenue.bar <- barplot(
revenue.month$price,
names.arg = labels ,
ylab="Revenue [$]",
main="2016 Revenue by month")
lines(x=revenue.bar,
y=revenue.month$units*100)
points(x=revenue.bar,
y=revenue.month$units*100)
Line plot & trend – Revenue by month
# Draw the plot
months <- 1:12
plot(price ~ month, data=revenue.month,
xaxt="n", type="l",
ylab="Revenue [$]", xlab="",
main="Revenue in 2016")
axis(1, at=months, labels=labels)
# Display the trend
lines(c(1,12), c(25000, 12000), type="l",
lty=2, col="blue")
legend("topright", c("Revenue", "Trend"),
col=c("black", "blue"), lty=1:2)
Line plot & trend – Revenue by Units
# Draw the plot
plot(price~units,
data=revenue.month,
xlab="Units",
ylab="Revenue [$]",
main="Revenue by Units in 2016")
lines(c(30, 380), c(3000, 35000),
type='l', lty=2, col="blue")
legend("topleft",
c("revenue/freq", "trend"),
col=c("black", "blue"),
lty=c(0,2), pch=c(21, -1))
Line plot & trend – Revenue by Units
# Draw the plot
plot(price~units,
data=revenue.month.area,
xlab="Units",
ylab="Revenue [$]",
col=area,
main="Revenue by Units (All years)")
legend("topleft",
legend=levels(revenue.month.area$area),
col=1:length(
levels(revenue.month.area$area)),
pch=21, text.width = 30)
base vs. lattice vs. ggplot2
Stacked Bar chart – base vs. lattice
barplot(rya, col=rainbow(4),
ylab="Count [$]",
main="Revenue by Year & Area")
legend("topright", fill=rainbow(4),
legend=row.names(rya))
barchart(Cloud + `Data Science` +
`Software Engineering` + Web ~ year
data=t(rya), auto.key=TRUE,
stack=TRUE, horizontal=FALSE,
ylab="Count [$]", main="Areas by Year")
Stacked Bar chart – base vs. ggplot2
barplot(rya, col=rainbow(4),
ylab="Count [$]",
main="Revenue by Year & Area")
legend("topright", fill=rainbow(4),
legend=row.names(rya))
ggplot(revenue.year.area,
aes(x = year, y=price, fill = area)) +
geom_bar(stat = "identity") +
ggtitle("Revenue by Year & Area") +
ylab("Count [$]")
Histogram – base vs. lattice
hist(revenue.year.month$price,
main="Ditribution of revenue per month",
xlab="Revenue per month",
breaks=20,
col=heat.colors(20))
histogram(~price, data=revenue.year.month,
main="Ditribution of revenue per month",
xlab="Revenue per month",
breaks = 20, type = "count",
col=heat.colors(20))
Histogram – base vs. ggplot2
hist(revenue.year.month$price,
main="Ditribution of revenue per month",
xlab="Revenue per month",
breaks=20,
col=heat.colors(20))
ggplot(revenue.year.month, aes(x = price)) +
geom_histogram(stat = "bin",
binwidth=2500, aes(fill=..count..)) +
ggtitle("Ditribution of revenue per month") +
xlab("Revenue per month")
Box plot – base vs. lattice
boxplot(price~year,
data=revenue.year.month,
col=2:4,
main="Revenue by Year",
xlab="Year", ylab="Revenue")
boxplot(price~year,
data=revenue.year.month,
col=2:4,
main="Revenue by Year",
xlab="Year", ylab="Revenue")
Box plot – base vs. ggplot
boxplot(price~year,
data=revenue.year.month,
col=2:4,
main="Revenue by Year",
xlab="Year", ylab="Revenue")
ggplot(revenue.year.month,
aes(x=factor(year), y=price)) +
geom_boxplot(aes(fill=factor(year))) +
ggtitle("Total by Year") +
ylab("Revenue") +
xlab("Year")
Scatter plot – base vs. lattice
plot(price~units, data=revenue.month.area,
xlab="Units", ylab="Revenue [$]",
col=area,
main="Revenue by Units (All years)")
# And you need legend manually created
xyplot(price~units, data=revenue.month.area,
xlab="Units", ylab="Revenue [$]",
pch=19,
group = area,
auto.key = TRUE)
Scatter plot – base vs. ggplot2
plot(price~units, data=revenue.month.area,
xlab="Units", ylab="Revenue [$]",
col=area,
main="Revenue by Units (All years)")
# And you need legend manually created
ggplot(revenue.month.area,
aes(x=units, y=price)) +
geom_point(aes(col=area)) +
ggtitle("Revenue by Units (All years)") +
ylab("Revenue [$]") + xlab("Units")
ggplot2 & layers
Scatter plot
# Draw the dots
ggplot(revenue.month,
aes(x=units, y=total)) +
geom_point()
Scatter plot – Colours per area
# Draw the dots
ggplot(revenue.month,
aes(x=units, y=total)) +
geom_point(aes(col=area))
Scatter plot – Labels
# Draw the dots
ggplot(revenue.month,
aes(x=units, y=total)) +
geom_point(aes(col=area)) +
ggtitle("Revenue by Units (All years)") +
ylab("Revenue [$]") +
xlab("Units")
Scatter plot – Dots’ size
# Draw the dots
ggplot(revenue.month,
aes(x=units, y=total)) +
geom_point(aes(col=area, size=dltotal)) +
ggtitle("Revenue by Units (All years)") +
ylab("Revenue [$]") +
xlab("Units")
Scatter plot – Lines
# Draw the dots
ggplot(revenue.month,
aes(x=units, y=total)) +
geom_point(aes(col=area)) +
geom_line() +
ggtitle("Revenue by Units (All years)") +
ylab("Revenue [$]") +
xlab("Units")
Scatter plot – ab line
# Draw the dots
ggplot(revenue.month,
aes(x=units, y=total)) +
geom_point(aes(col=area)) +
geom_abline(intercept = 0, slope = 110) +
ggtitle("Revenue by Units (All years)") +
ylab("Revenue [$]") +
xlab("Units")
Scatter plot – smooth line
# Draw the dots
ggplot(revenue.month,
aes(x=units, y=total)) +
geom_point(aes(col=area)) +
stat_smooth() +
ggtitle("Revenue by Units (All years)") +
ylab("Revenue [$]") +
xlab("Units")
Scatter plot – smooth line
# Draw the dots
ggplot(revenue.month,
aes(x=units, y=total)) +
geom_point(aes(col=area)) +
stat_smooth() +
ggtitle("Revenue by Units (All years)") +
ylab("Revenue [$]") +
xlab("Units") +
theme(legend.title=element_text(
colour="chocolate", size=16,
face="bold"))
Scatter plot – smooth line
# Draw the dots
ggplot(revenue.month,
aes(x=units, y=total)) +
geom_point(aes(col=area)) +
stat_smooth() +
ggtitle("Revenue by Units (All years)") +
ylab("Revenue [$]") +
xlab("Units") +
theme(legend.title=element_text(
colour="chocolate", size=16,
face="bold")) +
scale_color_discrete(
name="Learning Areas")
Scatter plot – smooth line
# Draw the dots
ggplot(revenue.month,
aes(x=units, y=total)) +
geom_point(aes(col=area)) +
...
theme(legend.title=element_text(
colour="chocolate", size=16,
face="bold")) +
scale_color_discrete(
name="Learning Areas") +
guides(colour = guide_legend(
override.aes = list(size=4)))
ggplot2 & maps (ggmap)
Treemap – Revenue by Vendor
# Draw the plot
library(treemap)
treemap(courses.aggregate,
index=c("vendor"),
vSize="price",
title="Revenue per vendor",
type="index")
Interactive and dynamic graphs
• plotly
• ggiraph
• D3.js
• streamgraph
• animation
plotly - Interactive graphs
# Draw the plot
library(plotly)
plot_ly(revenue.month.vendor,
x=~units, y=~total, mode="markers",
color = ~factor(area),
size=~dltotal/1000,
text=~paste("Units:",
units, "</br>Revenue", total,
"</br>DataLearn cut:", dltotal),
hoverinfo="text", type="scatter") %>%
layout(title="Revenue per vendor",
xaxis=list(title="Units"),
yaxis=list(title="Revenue [$]"))
Make an interactive graph from ggplot
# Draw the plot
library(plotly)
ggbar <- ggplot(revenue.year.area,
aes(x = year, y=price, fill = area)) +
geom_bar(stat = "identity")
ggplotly(ggbar)
Network visualisation
• igraph
• ggnet
• ggnetwork
• ggraph
• visNetwork
• sna
igraph – Courses taken by Users
# Draw the plot
user.area <- data.frame(
user=courses.aggregate$name,
area=courses.aggregate$area)
user.area <- user.area[
sample(1:500, 50, replace=FALSE),]
user.area <- aggregate(
cbind(user.area[0], width=1),
user.area, length)
# Build the graph
library(igraph)
user.area.graph <- graph.data.frame(
user.area, directed = FALSE,
vertices=vertices)
plot(user.area.graph, main="Courses taken by users")
visNetwork – Dynamic Networks
# Draw the plot
visNetwork(nodes, edges, main="Courses taken by users")
Circular graph – Area per Vendor
# Prepare the data
area.vendor <- data.frame(
area=courses.merge$areaname,
vendor=courses.merge$vname)
circular.data <- with(area.vendor,
table(vendor, area))
# Draw the plot
library(circlize)
chordDiagram(
as.data.frame(circular.data),
transparency = 0.5)
Keep in touch
BarbaraFusinska.com
@BasiaFusinska

Mais conteúdo relacionado

Destaque

Destaque (14)

Livro saber e fazer 7 º
Livro saber e fazer 7 ºLivro saber e fazer 7 º
Livro saber e fazer 7 º
 
Design Thinking
Design ThinkingDesign Thinking
Design Thinking
 
Ceph Day San Jose - Object Storage for Big Data
Ceph Day San Jose - Object Storage for Big Data Ceph Day San Jose - Object Storage for Big Data
Ceph Day San Jose - Object Storage for Big Data
 
Agência do Trabalho oferece 313 vagas nesta terça-feira (21)
 Agência do Trabalho oferece 313 vagas nesta terça-feira (21) Agência do Trabalho oferece 313 vagas nesta terça-feira (21)
Agência do Trabalho oferece 313 vagas nesta terça-feira (21)
 
презентация
презентацияпрезентация
презентация
 
Webinar - Marketing Metrics Madness in an Account Based World
Webinar - Marketing Metrics Madness in an Account Based WorldWebinar - Marketing Metrics Madness in an Account Based World
Webinar - Marketing Metrics Madness in an Account Based World
 
Pathologie des petits orteils
Pathologie des petits orteilsPathologie des petits orteils
Pathologie des petits orteils
 
pollacka_AMD
pollacka_AMDpollacka_AMD
pollacka_AMD
 
Chacabuco Cultural 27
Chacabuco Cultural 27Chacabuco Cultural 27
Chacabuco Cultural 27
 
Ілік септігі
Ілік септігіІлік септігі
Ілік септігі
 
ระบบเครือข่ายคอมพิวเตอร์เบื้องต้น
ระบบเครือข่ายคอมพิวเตอร์เบื้องต้นระบบเครือข่ายคอมพิวเตอร์เบื้องต้น
ระบบเครือข่ายคอมพิวเตอร์เบื้องต้น
 
Email marketing
Email marketingEmail marketing
Email marketing
 
1 listado miraflores tne 2017
1 listado miraflores tne 20171 listado miraflores tne 2017
1 listado miraflores tne 2017
 
Theories
TheoriesTheories
Theories
 

Semelhante a A picture speaks a thousand words - Data Visualisation with R

Let’s Talk About Ruby
Let’s Talk About RubyLet’s Talk About Ruby
Let’s Talk About Ruby
Ian Bishop
 

Semelhante a A picture speaks a thousand words - Data Visualisation with R (20)

Graph abstraction
Graph abstractionGraph abstraction
Graph abstraction
 
R training5
R training5R training5
R training5
 
JQuery Flot
JQuery FlotJQuery Flot
JQuery Flot
 
treemap package in R and examples.
treemap package in R and examples.treemap package in R and examples.
treemap package in R and examples.
 
Apache big-data-2017-scala-sql
Apache big-data-2017-scala-sqlApache big-data-2017-scala-sql
Apache big-data-2017-scala-sql
 
Foliumcheatsheet
FoliumcheatsheetFoliumcheatsheet
Foliumcheatsheet
 
Introduction to DAX Language
Introduction to DAX LanguageIntroduction to DAX Language
Introduction to DAX Language
 
Ssrs expressions
Ssrs expressionsSsrs expressions
Ssrs expressions
 
VSSML18. Introduction to WhizzML
VSSML18. Introduction to WhizzMLVSSML18. Introduction to WhizzML
VSSML18. Introduction to WhizzML
 
Basic Analysis using Python
Basic Analysis using PythonBasic Analysis using Python
Basic Analysis using Python
 
Introduction to R for data science
Introduction to R for data scienceIntroduction to R for data science
Introduction to R for data science
 
NCCU: Statistics in the Criminal Justice System, R basics and Simulation - Pr...
NCCU: Statistics in the Criminal Justice System, R basics and Simulation - Pr...NCCU: Statistics in the Criminal Justice System, R basics and Simulation - Pr...
NCCU: Statistics in the Criminal Justice System, R basics and Simulation - Pr...
 
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
Sassive Aggressive: Using Sass to Make Your Life Easier (Refresh Boston Version)
 
Let’s Talk About Ruby
Let’s Talk About RubyLet’s Talk About Ruby
Let’s Talk About Ruby
 
Power of functions in a typed world
Power of functions in a typed worldPower of functions in a typed world
Power of functions in a typed world
 
Jetpack Compose - A Lightning Tour
Jetpack Compose - A Lightning TourJetpack Compose - A Lightning Tour
Jetpack Compose - A Lightning Tour
 
Data visualization in python/Django
Data visualization in python/DjangoData visualization in python/Django
Data visualization in python/Django
 
SavvyData 'Ace of Charts' in FileMaker Pro 11
SavvyData 'Ace of Charts' in FileMaker Pro 11SavvyData 'Ace of Charts' in FileMaker Pro 11
SavvyData 'Ace of Charts' in FileMaker Pro 11
 
Data import-cheatsheet
Data import-cheatsheetData import-cheatsheet
Data import-cheatsheet
 
Using R for Building a Simple and Effective Dashboard
Using R for Building a Simple and Effective DashboardUsing R for Building a Simple and Effective Dashboard
Using R for Building a Simple and Effective Dashboard
 

Mais de Barbara Fusinska

Mais de Barbara Fusinska (20)

Hassle free, scalable, machine learning learning with Kubeflow
Hassle free, scalable, machine learning learning with KubeflowHassle free, scalable, machine learning learning with Kubeflow
Hassle free, scalable, machine learning learning with Kubeflow
 
Machine Learning with R
Machine Learning with RMachine Learning with R
Machine Learning with R
 
Deep learning with TensorFlow
Deep learning with TensorFlowDeep learning with TensorFlow
Deep learning with TensorFlow
 
Clean, Learn and Visualise data with R
Clean, Learn and Visualise data with RClean, Learn and Visualise data with R
Clean, Learn and Visualise data with R
 
TensorFlow in 3 sentences
TensorFlow in 3 sentencesTensorFlow in 3 sentences
TensorFlow in 3 sentences
 
Using Machine Learning and Chatbots to handle 1st line Technical Support
Using Machine Learning and Chatbots to handle 1st line Technical SupportUsing Machine Learning and Chatbots to handle 1st line Technical Support
Using Machine Learning and Chatbots to handle 1st line Technical Support
 
Machine Learning with Azure
Machine Learning with AzureMachine Learning with Azure
Machine Learning with Azure
 
Networks are like onions: Practical Deep Learning with TensorFlow
Networks are like onions: Practical Deep Learning with TensorFlowNetworks are like onions: Practical Deep Learning with TensorFlow
Networks are like onions: Practical Deep Learning with TensorFlow
 
Using Machine Learning and Chatbots to handle 1st line Technical Support
Using Machine Learning and Chatbots to handle 1st line Technical SupportUsing Machine Learning and Chatbots to handle 1st line Technical Support
Using Machine Learning and Chatbots to handle 1st line Technical Support
 
Deep Learning with Microsoft Cognitive Toolkit
Deep Learning with Microsoft Cognitive ToolkitDeep Learning with Microsoft Cognitive Toolkit
Deep Learning with Microsoft Cognitive Toolkit
 
Machine Learning with R
Machine Learning with RMachine Learning with R
Machine Learning with R
 
Clean, Learn and Visualise data with R
Clean, Learn and Visualise data with RClean, Learn and Visualise data with R
Clean, Learn and Visualise data with R
 
Using Machine Learning and Chatbots to handle 1st line technical support
Using Machine Learning and Chatbots to handle 1st line technical supportUsing Machine Learning and Chatbots to handle 1st line technical support
Using Machine Learning and Chatbots to handle 1st line technical support
 
Predicting the Future as a Service with Azure ML and R
Predicting the Future as a Service with Azure ML and R Predicting the Future as a Service with Azure ML and R
Predicting the Future as a Service with Azure ML and R
 
Getting started with R when analysing GitHub commits
Getting started with R when analysing GitHub commitsGetting started with R when analysing GitHub commits
Getting started with R when analysing GitHub commits
 
Analysing GitHub commits with R
Analysing GitHub commits with RAnalysing GitHub commits with R
Analysing GitHub commits with R
 
Analysing GitHub commits with R
Analysing GitHub commits with RAnalysing GitHub commits with R
Analysing GitHub commits with R
 
Breaking the eggshell: From .NET to Node.js
Breaking the eggshell: From .NET to Node.jsBreaking the eggshell: From .NET to Node.js
Breaking the eggshell: From .NET to Node.js
 
Analysing GitHub commits with R
Analysing GitHub commits with RAnalysing GitHub commits with R
Analysing GitHub commits with R
 
Analysing GitHub commits with R
Analysing GitHub commits with RAnalysing GitHub commits with R
Analysing GitHub commits with R
 

Último

Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
HyderabadDolls
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
gajnagarg
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
gajnagarg
 
Computer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfComputer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdf
SayantanBiswas37
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
nirzagarg
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Bertram Ludäscher
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
nirzagarg
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
nirzagarg
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
ahmedjiabur940
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Klinik kandungan
 

Último (20)

Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book nowVadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
Vadodara 💋 Call Girl 7737669865 Call Girls in Vadodara Escort service book now
 
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
Sonagachi * best call girls in Kolkata | ₹,9500 Pay Cash 8005736733 Free Home...
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Abortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get CytotecAbortion pills in Jeddah | +966572737505 | Get Cytotec
Abortion pills in Jeddah | +966572737505 | Get Cytotec
 
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Latur [ 7014168258 ] Call Me For Genuine Models We ...
 
Computer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdfComputer science Sql cheat sheet.pdf.pdf
Computer science Sql cheat sheet.pdf.pdf
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Satna [ 7014168258 ] Call Me For Genuine Models We ...
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubai
 
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...Top Call Girls in Balaghat  9332606886Call Girls Advance Cash On Delivery Ser...
Top Call Girls in Balaghat 9332606886Call Girls Advance Cash On Delivery Ser...
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
Statistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbersStatistics notes ,it includes mean to index numbers
Statistics notes ,it includes mean to index numbers
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
Top profile Call Girls In Bihar Sharif [ 7014168258 ] Call Me For Genuine Mod...
 
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
Top profile Call Girls In Hapur [ 7014168258 ] Call Me For Genuine Models We ...
 
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi ArabiaIn Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
In Riyadh ((+919101817206)) Cytotec kit @ Abortion Pills Saudi Arabia
 
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...Fun all Day Call Girls in Jaipur   9332606886  High Profile Call Girls You Ca...
Fun all Day Call Girls in Jaipur 9332606886 High Profile Call Girls You Ca...
 
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
Jual obat aborsi Bandung ( 085657271886 ) Cytote pil telat bulan penggugur ka...
 
Kings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about themKings of Saudi Arabia, information about them
Kings of Saudi Arabia, information about them
 

A picture speaks a thousand words - Data Visualisation with R

  • 1. A picture speaks a thousand words Data Visualisation with R Barbara Fusinska @BasiaFusinska
  • 2. About me Programmer Machine Learning Data Solutions Architect @BasiaFusinska
  • 3. Agenda • Exploratory Data Analysis • Elements of EDA • Visual artifacts • R Visualisation ecosystem • Base/Lattice/ggplot2 comparison • Layers in ggplot2 • Interesting visualisations
  • 5. Exploratory Data Analysis (EDA) is an approach to analysing data sets to summarize their main characteristics, often with visual methods. A statistical model can be used or not, but primarily EDA is for seeing what the data can tell us beyond the formal modelling or hypothesis testing task.
  • 6. Why do we need visualisations? Insight Impress
  • 7. Use Case - Online Learning Platform User Area Vendor Course Course Taken Cloud (25%) Data Science (50%) Web (15%) Software Engineering (10%) Software Mind (20%) Cloud Solutions (3%) InfraNet (12%) DataLearn (7%) WWW Way (11%) Soft Skills (4%) Edu Zen (10%) Data Foundation (25%) Learning Island (5%) Design Your Way (3%) 2014 2015 2016 Prices: 10$ (25%) 99$ (20%) 19$ (15%) 250 (15%) 49$ (20%) 500 (5%)
  • 8. courses.aggregate Name Area Vendor Year Month Price [$] Perez, Lisa Data Science Data Foundation 2015 7 99 Tran, Janiro Software Engineering DataLearn 2016 2 10 Bajwa, John Cloud InfraNet 2015 9 250 Lindsey, Aaron Web Software Mind 2014 6 19 Cooper, Duncan Software Engineering Learning Island 2014 7 250 Grumbach, Alexander Web Design Your Way 2015 2 99
  • 9.
  • 10. Categorical data - count occurrences Cloud Data Science Software Engineering Web 693 2271 462 1574 # Count occurrences courses.areas <- table(courses.aggregate$area
  • 11. Bar plot – Number of courses taken by Area # Draw the plot barplot(courses.areas, ylab="Count", main="Areas")
  • 12. Categorical data count occurrences # Count occurrences vendor.area <- table(data.frame( courses.aggregate$area, courses.aggregate$vendor)) CSol DataF DataL DesYW EZen … Cloud 0 263 49 28 0 Data Science 91 636 90 0 192 Software 0 44 83 95 0 Web 0 267 207 0 158
  • 13. Stacked Bar plot – Areas by Vendors # Draw the plot barplot(vendor.area, ylab="Count", main="Areas by Vendor", col=rainbow(4)) legend("topright", fill=rainbow(4), legend=row.names(vendor.area ))
  • 14. Stacked Beside Bar plot – Areas by Year # Count occurrences areas.year <- table(data.frame( courses.aggregate$area, courses.aggregate$year)) # Draw the plot barplot(areas.year, ylab="Count", main="Areas By Year", col=rainbow(4), beside=TRUE) legend("topleft", fill=rainbow(4), legend=row.names(areas.year))
  • 15. Stacked Bar plot – Areas by Year # Draw the plot barplot(areas.year, ylab="Count", main="Areas by year", col=rainbow(4)) legend("topright", legend=row.names(areas.year), fill=rainbow(4))
  • 16. 100% Stacked Bar plot – Areas by Year # Draw the plot barplot(prop.table(areas.year, 2)*100, col=rainbow(4), ylab="%", main="Years by Areas") legend("topright", legend=row.names(areas.year), fill=rainbow(4))
  • 17. Pie chart – Areas # Areas occurrences per_labels <- round( courses.areas/sum(courses.areas) * 100, 1) per_labels <- paste(per_labels, "%", sep="") # Draw the plot pie(courses.areas, col=rainbow(4), labels=per_labels) legend("topleft", fill=rainbow(4) legend=names(courses.areas))
  • 18.
  • 19. Numerical data – summarise # Calculate yearly revenue revenue.year <- aggregate(price~year, data=courses.aggregate, sum) Year Price 2014 139001 2015 159002 2016 180197
  • 20. Bar plot – Revenue per year # Draw the plot barplot(revenue.year$price, names.arg = revenue.year$year, ylab="Count [$]", main="Revenue per year")
  • 21. Categorical data - count occurrences # Prepare data library(reshape) revenue.year.area <- aggregate( price ~ year + area, data=courses.aggregate, sum) rya <- t(cast(revenue.year.area, year ~ area, value="price")) 2014 2015 2016 Cloud 127474 17873 16819 Data Science 65639 73645 74289 Software 8342 9976 11781 Web 52556 57508 77308
  • 22. Stacked Bar plot – Revenue by Year and Area # Draw the plot barplot(rya, col=rainbow(4), ylab="Count [$]", main="Revenue by Year & Area") legend("topright", fill=rainbow(4), legend=row.names(rya))
  • 23. Stacked Beside Bar plot – Areas Revenue by Year # Draw the plot barplot(rya, col=rainbow(4), ylab="Count [$]", main="Revenue by Year & Area", beside=TRUE) legend("topright", fill=rainbow(3), legend=row.names(rya))
  • 25. Histogram – Course Prices # Draw the plot hist(courses.aggregate$price, main="Ditribution of prices", xlab="Course price", breaks=20, col=heat.colors(20))
  • 26. Histogram – Course Prices per month # Prepare the data revenue.year.month <- aggregate(price ~ year + month, data=courses.aggregate, sum) # Draw the plot hist(revenue.year.month$price, main="Distribution of revenue per month", xlab="Revenue per month", breaks=20, col=heat.colors(20))
  • 27. Density – Course Prices per month # Probability density hist(revenue.year.month$price, main="Distribution of revenue per month", xlab="Revenue per month", breaks=20, col=heat.colors(20), prob=TRUE) lines(density(revenue.year.month$price))
  • 29. Bar & line plot – Revenue by month # Draw the plot revenue.bar <- barplot( revenue.month$price, names.arg = labels , ylab="Revenue [$]", main="2016 Revenue by month") lines(x=revenue.bar, y=revenue.month$units*100) points(x=revenue.bar, y=revenue.month$units*100)
  • 30. Line plot & trend – Revenue by month # Draw the plot months <- 1:12 plot(price ~ month, data=revenue.month, xaxt="n", type="l", ylab="Revenue [$]", xlab="", main="Revenue in 2016") axis(1, at=months, labels=labels) # Display the trend lines(c(1,12), c(25000, 12000), type="l", lty=2, col="blue") legend("topright", c("Revenue", "Trend"), col=c("black", "blue"), lty=1:2)
  • 31. Line plot & trend – Revenue by Units # Draw the plot plot(price~units, data=revenue.month, xlab="Units", ylab="Revenue [$]", main="Revenue by Units in 2016") lines(c(30, 380), c(3000, 35000), type='l', lty=2, col="blue") legend("topleft", c("revenue/freq", "trend"), col=c("black", "blue"), lty=c(0,2), pch=c(21, -1))
  • 32. Line plot & trend – Revenue by Units # Draw the plot plot(price~units, data=revenue.month.area, xlab="Units", ylab="Revenue [$]", col=area, main="Revenue by Units (All years)") legend("topleft", legend=levels(revenue.month.area$area), col=1:length( levels(revenue.month.area$area)), pch=21, text.width = 30)
  • 33. base vs. lattice vs. ggplot2
  • 34. Stacked Bar chart – base vs. lattice barplot(rya, col=rainbow(4), ylab="Count [$]", main="Revenue by Year & Area") legend("topright", fill=rainbow(4), legend=row.names(rya)) barchart(Cloud + `Data Science` + `Software Engineering` + Web ~ year data=t(rya), auto.key=TRUE, stack=TRUE, horizontal=FALSE, ylab="Count [$]", main="Areas by Year")
  • 35. Stacked Bar chart – base vs. ggplot2 barplot(rya, col=rainbow(4), ylab="Count [$]", main="Revenue by Year & Area") legend("topright", fill=rainbow(4), legend=row.names(rya)) ggplot(revenue.year.area, aes(x = year, y=price, fill = area)) + geom_bar(stat = "identity") + ggtitle("Revenue by Year & Area") + ylab("Count [$]")
  • 36. Histogram – base vs. lattice hist(revenue.year.month$price, main="Ditribution of revenue per month", xlab="Revenue per month", breaks=20, col=heat.colors(20)) histogram(~price, data=revenue.year.month, main="Ditribution of revenue per month", xlab="Revenue per month", breaks = 20, type = "count", col=heat.colors(20))
  • 37. Histogram – base vs. ggplot2 hist(revenue.year.month$price, main="Ditribution of revenue per month", xlab="Revenue per month", breaks=20, col=heat.colors(20)) ggplot(revenue.year.month, aes(x = price)) + geom_histogram(stat = "bin", binwidth=2500, aes(fill=..count..)) + ggtitle("Ditribution of revenue per month") + xlab("Revenue per month")
  • 38. Box plot – base vs. lattice boxplot(price~year, data=revenue.year.month, col=2:4, main="Revenue by Year", xlab="Year", ylab="Revenue") boxplot(price~year, data=revenue.year.month, col=2:4, main="Revenue by Year", xlab="Year", ylab="Revenue")
  • 39. Box plot – base vs. ggplot boxplot(price~year, data=revenue.year.month, col=2:4, main="Revenue by Year", xlab="Year", ylab="Revenue") ggplot(revenue.year.month, aes(x=factor(year), y=price)) + geom_boxplot(aes(fill=factor(year))) + ggtitle("Total by Year") + ylab("Revenue") + xlab("Year")
  • 40. Scatter plot – base vs. lattice plot(price~units, data=revenue.month.area, xlab="Units", ylab="Revenue [$]", col=area, main="Revenue by Units (All years)") # And you need legend manually created xyplot(price~units, data=revenue.month.area, xlab="Units", ylab="Revenue [$]", pch=19, group = area, auto.key = TRUE)
  • 41. Scatter plot – base vs. ggplot2 plot(price~units, data=revenue.month.area, xlab="Units", ylab="Revenue [$]", col=area, main="Revenue by Units (All years)") # And you need legend manually created ggplot(revenue.month.area, aes(x=units, y=price)) + geom_point(aes(col=area)) + ggtitle("Revenue by Units (All years)") + ylab("Revenue [$]") + xlab("Units")
  • 43. Scatter plot # Draw the dots ggplot(revenue.month, aes(x=units, y=total)) + geom_point()
  • 44. Scatter plot – Colours per area # Draw the dots ggplot(revenue.month, aes(x=units, y=total)) + geom_point(aes(col=area))
  • 45. Scatter plot – Labels # Draw the dots ggplot(revenue.month, aes(x=units, y=total)) + geom_point(aes(col=area)) + ggtitle("Revenue by Units (All years)") + ylab("Revenue [$]") + xlab("Units")
  • 46. Scatter plot – Dots’ size # Draw the dots ggplot(revenue.month, aes(x=units, y=total)) + geom_point(aes(col=area, size=dltotal)) + ggtitle("Revenue by Units (All years)") + ylab("Revenue [$]") + xlab("Units")
  • 47. Scatter plot – Lines # Draw the dots ggplot(revenue.month, aes(x=units, y=total)) + geom_point(aes(col=area)) + geom_line() + ggtitle("Revenue by Units (All years)") + ylab("Revenue [$]") + xlab("Units")
  • 48. Scatter plot – ab line # Draw the dots ggplot(revenue.month, aes(x=units, y=total)) + geom_point(aes(col=area)) + geom_abline(intercept = 0, slope = 110) + ggtitle("Revenue by Units (All years)") + ylab("Revenue [$]") + xlab("Units")
  • 49. Scatter plot – smooth line # Draw the dots ggplot(revenue.month, aes(x=units, y=total)) + geom_point(aes(col=area)) + stat_smooth() + ggtitle("Revenue by Units (All years)") + ylab("Revenue [$]") + xlab("Units")
  • 50. Scatter plot – smooth line # Draw the dots ggplot(revenue.month, aes(x=units, y=total)) + geom_point(aes(col=area)) + stat_smooth() + ggtitle("Revenue by Units (All years)") + ylab("Revenue [$]") + xlab("Units") + theme(legend.title=element_text( colour="chocolate", size=16, face="bold"))
  • 51. Scatter plot – smooth line # Draw the dots ggplot(revenue.month, aes(x=units, y=total)) + geom_point(aes(col=area)) + stat_smooth() + ggtitle("Revenue by Units (All years)") + ylab("Revenue [$]") + xlab("Units") + theme(legend.title=element_text( colour="chocolate", size=16, face="bold")) + scale_color_discrete( name="Learning Areas")
  • 52. Scatter plot – smooth line # Draw the dots ggplot(revenue.month, aes(x=units, y=total)) + geom_point(aes(col=area)) + ... theme(legend.title=element_text( colour="chocolate", size=16, face="bold")) + scale_color_discrete( name="Learning Areas") + guides(colour = guide_legend( override.aes = list(size=4)))
  • 53. ggplot2 & maps (ggmap)
  • 54. Treemap – Revenue by Vendor # Draw the plot library(treemap) treemap(courses.aggregate, index=c("vendor"), vSize="price", title="Revenue per vendor", type="index")
  • 55. Interactive and dynamic graphs • plotly • ggiraph • D3.js • streamgraph • animation
  • 56. plotly - Interactive graphs # Draw the plot library(plotly) plot_ly(revenue.month.vendor, x=~units, y=~total, mode="markers", color = ~factor(area), size=~dltotal/1000, text=~paste("Units:", units, "</br>Revenue", total, "</br>DataLearn cut:", dltotal), hoverinfo="text", type="scatter") %>% layout(title="Revenue per vendor", xaxis=list(title="Units"), yaxis=list(title="Revenue [$]"))
  • 57. Make an interactive graph from ggplot # Draw the plot library(plotly) ggbar <- ggplot(revenue.year.area, aes(x = year, y=price, fill = area)) + geom_bar(stat = "identity") ggplotly(ggbar)
  • 58. Network visualisation • igraph • ggnet • ggnetwork • ggraph • visNetwork • sna
  • 59. igraph – Courses taken by Users # Draw the plot user.area <- data.frame( user=courses.aggregate$name, area=courses.aggregate$area) user.area <- user.area[ sample(1:500, 50, replace=FALSE),] user.area <- aggregate( cbind(user.area[0], width=1), user.area, length) # Build the graph library(igraph) user.area.graph <- graph.data.frame( user.area, directed = FALSE, vertices=vertices) plot(user.area.graph, main="Courses taken by users")
  • 60. visNetwork – Dynamic Networks # Draw the plot visNetwork(nodes, edges, main="Courses taken by users")
  • 61. Circular graph – Area per Vendor # Prepare the data area.vendor <- data.frame( area=courses.merge$areaname, vendor=courses.merge$vname) circular.data <- with(area.vendor, table(vendor, area)) # Draw the plot library(circlize) chordDiagram( as.data.frame(circular.data), transparency = 0.5)
  • 62.