SlideShare a Scribd company logo
Data Visualization
SEJI OH
JULY 20, 2018
CONTENTS
 What Happened to Napoleon’s troops?
– Minard’s plot
– Dataset
– Reproduction of the plot using R
 What Can We Do With Game Log Data?
– Visualizing StarCraft with R
JULY 20, 2018 ©SEJI OH PAGE 2
CONTENTS
 Regression Analysis
– Dataset
– Simple Linear Regression Model
– Multiple Regression Model
References
JULY 20, 2018 ©SEJI OH PAGE 3
What Happened to Napoleon’s troops?
 Minard’s Plot[1]
JULY 20, 2018 ©SEJI OH PAGE 4
What Happened to Napoleon’s troops?
 Dataset: Napoleon’s March[2]
JULY 20, 2018 ©SEJI OH PAGE 5
What Happened to Napoleon’s troops?
 Let’s draw Minard’s plot using R, especially with the package
‘ggplot2’.[3]
JULY 20, 2018 ©SEJI OH PAGE 6
What Can We Do With Game Log Data?
 Visualizing StarCraft with R[4][5]
JULY 20, 2018 ©SEJI OH PAGE 7
What Can We Do With Game Log Data?
 Visualizing StarCraft with R[4][5]: colored by unitID
JULY 20, 2018 ©SEJI OH PAGE 8
Regression Analysis
 Dataset:
in
the package
 The goal is a establishment
of the multiple regression
model like this.
(Drawn with ggplot2)
JULY 20, 2018 ©SEJI OH PAGE 9
Regression Analysis
 Dataset: diamonds in the package ggplot2
JULY 20, 2018 ©SEJI OH PAGE 10
Regression Analysis
JULY 20, 2018 ©SEJI OH PAGE 11
 The package tidyverse and its family are used in this analysis.
 A holdout cross validation is applied.
 Random sampling from the data as the Train set 70% and the Test
set 30%.
Regression Analysis
JULY 20, 2018 ©SEJI OH PAGE 12
 Check the principal components in
the data.
 Draw a plot which shows a
relation between variables.
 Or calculate the Pearson
correlation coefficient.
Regression Analysis
JULY 20, 2018 ©SEJI OH PAGE 13
Simple linear model
 The independent
variable = price
 The response
variable = carat
Regression Analysis
JULY 20, 2018 ©SEJI OH PAGE 14
Simple regression
model
 The power
transformation is
applied.
Regression Analysis
JULY 20, 2018 ©SEJI OH PAGE 15
Multiple regression
model
 Various
independent
variables =
price, x, y, z
 RMSE = 0.0843145
Regression Analysis
JULY 20, 2018 ©SEJI OH PAGE 16
Multiple regression
model
 The normal
distribution
predictor is applied.
 RMSE = 0.08431445
Regression Analysis
JULY 20, 2018 ©SEJI OH PAGE 17
Multiple regression
model
 The power
transformation is
applied.
 RMSE = 0.01722037
Regression Analysis
JULY 20, 2018 ©SEJI OH PAGE 18
Multiple regression
model
 Check the
validation of the
model with the test
set.
 RMSE = 0.01722037
refrences
[1] Wikipedia, Charles Joseph Minard
https://en.wikipedia.org/wiki/Charles_Joseph_Minard
[2] The Grammar of Graphics, 2ED, Leland Wilkinson, SPSS Inc.
[3] A Layered Grammar of Graphics, Hadley WICKHAM
http://vita.had.co.nz/papers/layered-grammar.pdf
JULY 20, 2018 ©SEJI OH PAGE 19
refrences
[4] Visualizing Professional StarCraft with R
https://towardsdatascience.com/visualizing-professional-starcraft-
with-r-598b5e7a82ac
[5] StarCraftMining, Github
https://github.com/bgweber/StarCraftMining
JULY 20, 2018 ©SEJI OH PAGE 20

More Related Content

What's hot

Nips2018 study only_pu_net_pdf
Nips2018 study only_pu_net_pdfNips2018 study only_pu_net_pdf
Nips2018 study only_pu_net_pdf
WEBFARMER. ltd.
 
2016 R3 Gunther Wellenstein App
2016 R3 Gunther Wellenstein App2016 R3 Gunther Wellenstein App
2016 R3 Gunther Wellenstein App
MassRecycle .
 
Business Maths & Stats - geometric straight line
Business Maths & Stats - geometric straight lineBusiness Maths & Stats - geometric straight line
Business Maths & Stats - geometric straight line
Niharika Verma
 
The Tracktor Project
The Tracktor ProjectThe Tracktor Project
The Tracktor Project
Ilya Salamatov
 
Rt climate graph
Rt climate graphRt climate graph
Rt climate graph
jwt1991
 
Rt climate graph
Rt climate graphRt climate graph
Rt climate graph
jwt1991
 
Intro to the Climate graph
Intro to the Climate graphIntro to the Climate graph
Intro to the Climate graph
Richard McLaren
 
Indices (MAHARASHTRA STATE BOARD - VII)
Indices (MAHARASHTRA STATE BOARD - VII)Indices (MAHARASHTRA STATE BOARD - VII)
Indices (MAHARASHTRA STATE BOARD - VII)
Pooja M
 
Exercise : Complex Query
 Exercise : Complex Query Exercise : Complex Query
Exercise : Complex Query
fizahPhd
 
Guug11 mashing up-google_apps
Guug11 mashing up-google_appsGuug11 mashing up-google_apps
Guug11 mashing up-google_apps
Tony Hirst
 
Shift left-8-bit-by-2-bits
Shift left-8-bit-by-2-bitsShift left-8-bit-by-2-bits
Shift left-8-bit-by-2-bits
Andrew Namayi
 
The mapping project from Cat to AGROVOC
The mapping project from Cat to AGROVOCThe mapping project from Cat to AGROVOC
The mapping project from Cat to AGROVOC
AIMS (Agricultural Information Management Standards)
 
Elawan Energy October 2018
Elawan Energy October 2018Elawan Energy October 2018
Elawan Energy October 2018
ACEK Renewables
 
Equal product curves
Equal product curvesEqual product curves
Equal product curves
Yashika Parekh
 
Assessment 1
Assessment 1Assessment 1
Assessment 1
A.Anapayan A.Anapayan
 
14
1414
Dscheng apple 441
Dscheng apple 441Dscheng apple 441
Dscheng apple 441
David Cheng
 
Plotter
PlotterPlotter
Plotter
Aang Herie
 

What's hot (18)

Nips2018 study only_pu_net_pdf
Nips2018 study only_pu_net_pdfNips2018 study only_pu_net_pdf
Nips2018 study only_pu_net_pdf
 
2016 R3 Gunther Wellenstein App
2016 R3 Gunther Wellenstein App2016 R3 Gunther Wellenstein App
2016 R3 Gunther Wellenstein App
 
Business Maths & Stats - geometric straight line
Business Maths & Stats - geometric straight lineBusiness Maths & Stats - geometric straight line
Business Maths & Stats - geometric straight line
 
The Tracktor Project
The Tracktor ProjectThe Tracktor Project
The Tracktor Project
 
Rt climate graph
Rt climate graphRt climate graph
Rt climate graph
 
Rt climate graph
Rt climate graphRt climate graph
Rt climate graph
 
Intro to the Climate graph
Intro to the Climate graphIntro to the Climate graph
Intro to the Climate graph
 
Indices (MAHARASHTRA STATE BOARD - VII)
Indices (MAHARASHTRA STATE BOARD - VII)Indices (MAHARASHTRA STATE BOARD - VII)
Indices (MAHARASHTRA STATE BOARD - VII)
 
Exercise : Complex Query
 Exercise : Complex Query Exercise : Complex Query
Exercise : Complex Query
 
Guug11 mashing up-google_apps
Guug11 mashing up-google_appsGuug11 mashing up-google_apps
Guug11 mashing up-google_apps
 
Shift left-8-bit-by-2-bits
Shift left-8-bit-by-2-bitsShift left-8-bit-by-2-bits
Shift left-8-bit-by-2-bits
 
The mapping project from Cat to AGROVOC
The mapping project from Cat to AGROVOCThe mapping project from Cat to AGROVOC
The mapping project from Cat to AGROVOC
 
Elawan Energy October 2018
Elawan Energy October 2018Elawan Energy October 2018
Elawan Energy October 2018
 
Equal product curves
Equal product curvesEqual product curves
Equal product curves
 
Assessment 1
Assessment 1Assessment 1
Assessment 1
 
14
1414
14
 
Dscheng apple 441
Dscheng apple 441Dscheng apple 441
Dscheng apple 441
 
Plotter
PlotterPlotter
Plotter
 

Recently uploaded

University of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma TranscriptUniversity of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma Transcript
soxrziqu
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
jitskeb
 
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
v7oacc3l
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
Timothy Spann
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
Walaa Eldin Moustafa
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
Social Samosa
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Aggregage
 
The Ipsos - AI - Monitor 2024 Report.pdf
The  Ipsos - AI - Monitor 2024 Report.pdfThe  Ipsos - AI - Monitor 2024 Report.pdf
The Ipsos - AI - Monitor 2024 Report.pdf
Social Samosa
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
vikram sood
 
Intelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicineIntelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicine
AndrzejJarynowski
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
g4dpvqap0
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
nuttdpt
 
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
74nqk8xf
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
rwarrenll
 
Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...
Bill641377
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
Roger Valdez
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
74nqk8xf
 
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
apvysm8
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
sameer shah
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
Timothy Spann
 

Recently uploaded (20)

University of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma TranscriptUniversity of New South Wales degree offer diploma Transcript
University of New South Wales degree offer diploma Transcript
 
Experts live - Improving user adoption with AI
Experts live - Improving user adoption with AIExperts live - Improving user adoption with AI
Experts live - Improving user adoption with AI
 
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
在线办理(英国UCA毕业证书)创意艺术大学毕业证在读证明一模一样
 
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Dat...
 
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data LakeViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
ViewShift: Hassle-free Dynamic Policy Enforcement for Every Data Lake
 
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
4th Modern Marketing Reckoner by MMA Global India & Group M: 60+ experts on W...
 
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
Beyond the Basics of A/B Tests: Highly Innovative Experimentation Tactics You...
 
The Ipsos - AI - Monitor 2024 Report.pdf
The  Ipsos - AI - Monitor 2024 Report.pdfThe  Ipsos - AI - Monitor 2024 Report.pdf
The Ipsos - AI - Monitor 2024 Report.pdf
 
Global Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headedGlobal Situational Awareness of A.I. and where its headed
Global Situational Awareness of A.I. and where its headed
 
Intelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicineIntelligence supported media monitoring in veterinary medicine
Intelligence supported media monitoring in veterinary medicine
 
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
一比一原版(Glasgow毕业证书)格拉斯哥大学毕业证如何办理
 
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
一比一原版(UCSF文凭证书)旧金山分校毕业证如何办理
 
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
一比一原版(Chester毕业证书)切斯特大学毕业证如何办理
 
My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.My burning issue is homelessness K.C.M.O.
My burning issue is homelessness K.C.M.O.
 
Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...Population Growth in Bataan: The effects of population growth around rural pl...
Population Growth in Bataan: The effects of population growth around rural pl...
 
Everything you wanted to know about LIHTC
Everything you wanted to know about LIHTCEverything you wanted to know about LIHTC
Everything you wanted to know about LIHTC
 
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
一比一原版(Coventry毕业证书)考文垂大学毕业证如何办理
 
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
办(uts毕业证书)悉尼科技大学毕业证学历证书原版一模一样
 
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
STATATHON: Unleashing the Power of Statistics in a 48-Hour Knowledge Extravag...
 
DSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelinesDSSML24_tspann_CodelessGenerativeAIPipelines
DSSML24_tspann_CodelessGenerativeAIPipelines
 

Data visualization regression analysis pratice sejioh-july20_2018

  • 2. CONTENTS  What Happened to Napoleon’s troops? – Minard’s plot – Dataset – Reproduction of the plot using R  What Can We Do With Game Log Data? – Visualizing StarCraft with R JULY 20, 2018 ©SEJI OH PAGE 2
  • 3. CONTENTS  Regression Analysis – Dataset – Simple Linear Regression Model – Multiple Regression Model References JULY 20, 2018 ©SEJI OH PAGE 3
  • 4. What Happened to Napoleon’s troops?  Minard’s Plot[1] JULY 20, 2018 ©SEJI OH PAGE 4
  • 5. What Happened to Napoleon’s troops?  Dataset: Napoleon’s March[2] JULY 20, 2018 ©SEJI OH PAGE 5
  • 6. What Happened to Napoleon’s troops?  Let’s draw Minard’s plot using R, especially with the package ‘ggplot2’.[3] JULY 20, 2018 ©SEJI OH PAGE 6
  • 7. What Can We Do With Game Log Data?  Visualizing StarCraft with R[4][5] JULY 20, 2018 ©SEJI OH PAGE 7
  • 8. What Can We Do With Game Log Data?  Visualizing StarCraft with R[4][5]: colored by unitID JULY 20, 2018 ©SEJI OH PAGE 8
  • 9. Regression Analysis  Dataset: in the package  The goal is a establishment of the multiple regression model like this. (Drawn with ggplot2) JULY 20, 2018 ©SEJI OH PAGE 9
  • 10. Regression Analysis  Dataset: diamonds in the package ggplot2 JULY 20, 2018 ©SEJI OH PAGE 10
  • 11. Regression Analysis JULY 20, 2018 ©SEJI OH PAGE 11  The package tidyverse and its family are used in this analysis.  A holdout cross validation is applied.  Random sampling from the data as the Train set 70% and the Test set 30%.
  • 12. Regression Analysis JULY 20, 2018 ©SEJI OH PAGE 12  Check the principal components in the data.  Draw a plot which shows a relation between variables.  Or calculate the Pearson correlation coefficient.
  • 13. Regression Analysis JULY 20, 2018 ©SEJI OH PAGE 13 Simple linear model  The independent variable = price  The response variable = carat
  • 14. Regression Analysis JULY 20, 2018 ©SEJI OH PAGE 14 Simple regression model  The power transformation is applied.
  • 15. Regression Analysis JULY 20, 2018 ©SEJI OH PAGE 15 Multiple regression model  Various independent variables = price, x, y, z  RMSE = 0.0843145
  • 16. Regression Analysis JULY 20, 2018 ©SEJI OH PAGE 16 Multiple regression model  The normal distribution predictor is applied.  RMSE = 0.08431445
  • 17. Regression Analysis JULY 20, 2018 ©SEJI OH PAGE 17 Multiple regression model  The power transformation is applied.  RMSE = 0.01722037
  • 18. Regression Analysis JULY 20, 2018 ©SEJI OH PAGE 18 Multiple regression model  Check the validation of the model with the test set.  RMSE = 0.01722037
  • 19. refrences [1] Wikipedia, Charles Joseph Minard https://en.wikipedia.org/wiki/Charles_Joseph_Minard [2] The Grammar of Graphics, 2ED, Leland Wilkinson, SPSS Inc. [3] A Layered Grammar of Graphics, Hadley WICKHAM http://vita.had.co.nz/papers/layered-grammar.pdf JULY 20, 2018 ©SEJI OH PAGE 19
  • 20. refrences [4] Visualizing Professional StarCraft with R https://towardsdatascience.com/visualizing-professional-starcraft- with-r-598b5e7a82ac [5] StarCraftMining, Github https://github.com/bgweber/StarCraftMining JULY 20, 2018 ©SEJI OH PAGE 20