ดร กนกวรรณ กุลลาวัณย์ · free data analysis software...
TRANSCRIPT
![Page 1: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/1.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
Power of Analytics & Basic R Programming
ดร. กนกวรรณ กลุลาวณัย์
![Page 2: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/2.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
Kanokwan Kullawan, PhDSpecialized ด้านวิทยาศาสตร์การตดัสินใจ
Co-founder of website: www.elephant-analytics.com and Admin of FB Page Elephant Data Thailand (ข่ีช้างจบัข้อมลู)
การศกึษา
• ปริญญาเอกด้าน การลงทนุและการวิเคราะห์การตดัสินใจ จากประเทศนอร์เวย์
ประสบการณ์การท างาน
• Economic & Decision Analyst, Chevron
• นกัวิจยัด้านการวิเคราะห์การตดัสินใจใน Norway และ USA
• วิศวกรแทน่ขดุเจาะ
![Page 3: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/3.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
Imagine you’re an owner of electricity company…
คณุเป็นเจ้าของโรงไฟฟ้าที่มีเปา้หมายให้คนประหยดัไฟเพือ่หลีกเลี่ยงการสร้างโรงไฟฟ้าเพิม่ ในการรณรงค์ให้คนประหยดัไฟครัง้นี ้คณุสามารถให้บอกอะไรกบัผู้ใช้ไฟฟ้าก็ได้ใน 1 ประโยค…
คณุจะพดูวา่อะไร?
![Page 4: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/4.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
How close is data science to us?
Buzzfeednews - Getty Images/Gece33
![Page 5: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/5.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
Benefit of Data Analytics - Supermarkets
เราควรจะเสนอโปรโมชนัแบบไหนให้ลกูค้าแตล่ะคน?
![Page 6: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/6.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
Benefit of Data Analytics - Airlines
เราควรจะขายตัว๋เคร่ืองบินราคาเทา่ไหร่?
![Page 7: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/7.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
Benefit of Data Analytics – Text Analysis
![Page 8: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/8.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
Dark Side of Data Analytics - Insurance
ท าไมคนจนถึงต้องจ่ายเบีย้ประกนัแพงกวา่คนรวย?
![Page 9: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/9.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
Dark Side of Data Analytics - Scam
คนกลุม่ไหนหลอกง่าย ดไูด้จาก Data
![Page 10: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/10.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
Dark Side of Data Analytics - KPI
แคด่ ูData ก็ประเมินผลการท างานได้?
![Page 11: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/11.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
There’re 2 sides of every coin.
Tool
Source: Pottermore
![Page 12: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/12.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
Any tool is a weapon if you hold it right.
![Page 13: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/13.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
What is R?
Free Data Analysis Software
Programming language designed by statisticians for
statisticians
Run ได้บน Platform มาตรฐานแทบทกุ
Platform – Unix, Windows, MacOS รวมถงึ Play Station3
Huge library of algorithms for data
science
Active and well-supported
communities
Publishing quality graphs
![Page 14: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/14.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
R User CommunitiesSource: Revolution Analytics
![Page 15: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/15.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
Getting Ready – Install R
Download R from: https://www.r-project.org/ เลือก CRAN Mirror: Thailand
R GUI• Can start coding now or• Do it in Rstudio
![Page 16: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/16.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
Getting Ready – Install RStudio
Download RStudio from: https://www.rstudio.com/products/rstudio/download/ เลือกอนัที่ FREE
![Page 17: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/17.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
RStudio
Console
Environment
R Script
Plot/ Packages/ Help
![Page 18: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/18.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
• Function ทกุอย่างท่ีไมไ่ด้อยูใ่น Base Packages
• Install packages ในครัง้แรกท่ีใช้• Load library ก่อนใช้ function
• มาพร้อม Installation• ฟังก์ชนัพืน้ฐาน เช่น การค านวณทัว่ไป
หรือ สถิติพืน้ฐาน• Complete list:
library(help = base)
R Packages
Base Packages
Other Packages
![Page 19: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/19.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
- Simple calculation
- Modeling ➔ Linear regression
- Statistical calculation ➔ Correlation matrix
- Web scraping ➔Wikipedia pageview
- Time series analysis ➔ Financial analysis
What can R do? - R Notebook
R Notebook
![Page 20: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/20.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
What can R do? – Financial AnalysisWeb scraping ดงึข้อมลูจาก Yahoo Finance
Time series data ของหุ้นใน SET50
Calculate Sharpe Ratio
Visualize
![Page 21: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/21.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
Condo prediction
R Notebook
![Page 22: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/22.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
What can R do? – Word Prediction
• Web scraping ดงึข้อมลูจาก US twitter
• Subset ข้อมลู
Getting Data Cleaning Data
• Convert to lower case
• Remove numbers, white space, etc.
• Remove profanity words
Tokenization
Prediction + Web-based application
![Page 23: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/23.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
What can R do? – Animated Plot
https://davetang.org/muse/2015/02/12/animated-plots-using-r/
![Page 24: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/24.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
การวเิคราะห์ขอ้มูลไม่ไดมี้ประโยชนเ์สมอไป…ถา้เราไม่เขา้ใจวา่วเิคราะห์อะไรอยู่
การใช้จ่ายของอเมริกาในด้าน วิทยาศาสตร์ อวกาศ และ เทคโนโลยีจ านวนคนฆา่ตวัตายโดยการแขวนคอ รัดคอ และ การท าให้ขาดอากาศ
http://www.tylervigen.com/spurious-correlations
![Page 25: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/25.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
• Online Course– Introduction to R by DataCamp
(https://www.datacamp.com/courses/free-introduction-to-r)– R Programming by John Hopkins University on Coursera
platform https://www.coursera.org/learn/r-programming– Introduction to R for Data Science on edX platform
(https://www.edx.org/course/introduction-r-data-science)
R Learning Sources
![Page 26: ดร กนกวรรณ กุลลาวัณย์ · Free Data Analysis Software Programming language designed by statisticians for statisticians Run ได้บน Platform](https://reader034.vdocuments.net/reader034/viewer/2022052021/6035f857f7683c4bd770c691/html5/thumbnails/26.jpg)
FB Page: ขี่ช้างจบัข้อมลู www.elephant-analytics.com
Imagine you’re an owner of electricity company…
คณุเป็นเจ้าของโรงไฟฟ้าที่มีเปา้หมายให้คนประหยดัไฟเพือ่หลีกเลี่ยงการสร้างโรงไฟฟ้าเพิม่ ในการรณรงค์ให้คนประหยดัไฟครัง้นี ้คณุสามารถให้บอกอะไรกบัผู้ใช้ไฟฟ้าก็ได้ใน 1 ประโยค…
คณุจะพดูวา่อะไร?
ประหยัดไฟ = ประหยัดเงนิ
ลดใช้พลังงาน = ลดโลกร้อน
คณุใช้ไฟมากกวา่ x%ของคนในพืน้ท่ีนี ้