SlideShare a Scribd company logo
1 of 31
게임데이터,
R을 이용해서 직접 분석해보기
R을 사용하는 이유
R을 사용하는 이유
1. 강력한 시각화 기능
R을 사용하는 이유
2. 오픈소스, 무료
유료 통계 패키지
R을 사용하는 이유
3. Python에서 R 문법을 거의 그대로 지원한다
R을 사용하는 이유
4. 다양한 패키지가 수시로 업데이트
https://cran.r-project.org/
R의 단점
1. 메모리, 연산 속도
2.다른 통계툴(STATA, SAS)보다는 어렵다
게임 데이터,
R을 이용해서 직접 분석해보기
게임 데이터, R을 이용해서 직접 분석해보기
1. 전체 유저의 잔존율 그래프
게임 데이터, R을 이용해서 직접 분석해보기
2. 많이 플레이한 유저 vs 적게 플레이한 유저의 잔
존율
게임 데이터, R을 이용해서 직접 분석해보기
2. 많이 플레이한 유저 vs 적게 플레이한 유저의 잔
존율
일평균 플레이한 스테이지 수 =
플레이한 스테이지 수 총 합
플레이 일 수
• 일평균 플레이한 스테이지 수 > 전체 평균 → 많이 플레이한 유저
• 일평균 플레이한 스테이지 수 < 전체 평균 → 적게 플레이한 유저
1. 게임 데이터 불러오기 (DB에서 읽어오기)
install.packages(“RMySQL”)
library(RMySQL)
con <- dbConnect(MySQL(), user=‘user’, password=‘password’,
dbname=‘database_name’, host=‘host’)
res <- dbGetQuery(con, “SELECT * FROM table1”)
1. 게임 데이터 불러오기 (CSV에서 읽어오기)
dat <- read.csv(file=‘file_path’)
1. 게임 데이터 불러오기 (CSV에서 읽어오기)
게임 데이터, R을 이용해서 직접 분석해보기
2. 기술 통계 (Descriptive statistics)
2. 기술 통계
summary(dat)summary(dat)
2. 기술 통계 (Descriptive statistics)
게임 데이터, R을 이용해서 직접 분석해보기
3. 시각화 하기
3. 시각화 하기
3. 시각화 하기
유저별로 하루에 게임 접속을 얼마나 하는지?
3. 시각화 하기
# 1. 히스토그램 그리기
hist(df$num_logins, breaks=20)
3. 시각화 하기
일일 접속자 수 (DAU)는 어떻게 되는가?
3. 시각화 하기
# 2. 시계열 그래프 그리기
library(ggplot2)
ggplot(data=dau, aes(x=login_date, y=num_players)) + geom_point() +
geom_line() + ylim(0,120)
3. 시각화 하기
잔존율 (Retention)는 어떻게 되는가?
더욱 즐겁고 재미있는 서비스를 경험할 수 있도록
인게임 AI 가이드

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

게임데이터, R을 이용해서 직접 분석해보기 (텐투플레이 웨비나)

Editor's Notes

  1. 안녕하세요 텐투플레이 권혜연입니다. 이번 시간에는 R을 이용해서 게임데이터를 분석하는 방법을 소개해드리도록 하겠습니다. R을 다뤄본 분도 계실 것 같고, R이 완전 생소한 분도 계실 것 같아요. 우선 간단하게 R에 대해서 설명을 드리도록 하겠습니다.
  2. R은 통계 계산과 그래픽을 위한 프로그래밍 언어이자 소프트웨어 환경입니다. 데이터 분석에 관심이 있으신 분들은 아마 많이 들어보셨을 거에요. R Studio는 R을 좀더 쉽고 편리하게 사용할 수 있는 개발환경(IDE) 입니다.
  3. 이번 세션에 R을 소개해드리는 이유는, R의 여러가지 장점 때문인데요
  4. R의 강력한 시각화 기능 떄문입니다. 이 부분이 매우 중요한데, 파이썬은 seaborn 등 다양한 패키지가 등장하고 있지만 아직은 조금 약합니다.
  5. 게다가 내가 분석하고자 하는 결과와 데이터 형태, 그래프 등을 이렇게 Rstudio에서 한 눈에 볼 수 있어서 매우매우 편리합니다.
  6. 두번째로, 오픈소스, 무료이기 때문입니다.
  7. 많이 사용하는 통계패키지로는 SPSS, 매트랩, 스타타, 사스 등이 있는데, 모두 유료 통계 패키지입니다. 통계분석을 전문적으로 하는 회사나 연구소가 아니면 선뜻 라이선스를 구매하기가 쉽지 않죠. 그런 점에서 R은 입문자부터 전문가까지 사용하기 편리한 툴입니다.
  8. 세번째입니다. 요즘 파이썬으로도 데이터분석, 많이 하시죠? Python에서 R문법을 거의 그대로 지원합니다.
  9. 데이터 분석에 관심있으신 분들은 파이썬 패키지 중에 판다스 많이 들어보셨을 것 같아요. Pandas에서 dataframe 만들고, 이걸 바탕으로 이런저런 분석을 진행하게 되죠. 이런 dataframe, 연산 기능들이 R의 문법과 유사합니다. 그래서 R에 익숙해지면, python 판다스를 사용하는데 무리가 없을 것입니다.
  10. 이건 python의 statsmodel이라는 패키지인데요, 보시면 아예 “R style로 fitting”하기 라고 나와있죠 이렇게 R 문법을 배워놓으면, python에서도 통계 분석을 하기가 수월해집니다.
  11. 마지막으로 다양한 패키지가 수시로 업데이트 됩니다.
  12. 4월 27일 기준으로 15549 개의 패키지가 있네요.
  13. 물론 R의 단점도 있습니다. 메모리를 많이 잡아먹고 연산속도가 빠른 편은 아닙니다. 그리고 다른 스타타나 사스같은 다른 통계툴보다는 사용하기 어렵습니다. 코드를 일일히 짜야되니까요. 하지만 쟤네(STATA, SAS)는 유료 패키지이기도 하고 저는 개인적으로는 다른 컴퓨터 프로그래밍 python, java보다는 개인적으로는 쉽게 배웠습니다.
  14. 그럼 이제 R을 이용해서 게임데이터 분석을 직접 해보도록 하겠습니다.
  15. 먼저 데이터부터 불러와야겠죠?
  16. 먼저 데이터부터 불러와야겠죠?
  17. 먼저 데이터부터 불러와야겠죠?
  18. 자체적으로 서버를 가지고 있으면 SQL을 바로 연결해서 불러오면 됩니다. MySQL을 사용하고 있을 경우의 예시인데요, 패키지 RMySQL을 설치하고, 불러와서, 커넥션을 만들고, 쿼리를 때리면 됩니다. 이처럼 DB로부터 자유자재로 데이터를 꺼내올 수 있어서 매우 편리하지만, SQL까지 알아야하기 때문에 CSV에서 데이터를 불러오는걸 보여드리도록 하겠습니다.
  19. CSV에서 데이터를 불러오는걸 보여드리도록 하겠습니다.
  20. (R studio에서 csv 읽어오는거 보여주기)
  21. 두번째로, 기술통계를 보여드리도록 하겠습니다. 기술통계란, 자료의 정보를 요약해서 수치로 표현하는 방법. 평균, 중간값 등
  22. 내가 뭘 보고 싶은지, 어떻게 하면 이걸 확인할 수 있는지 내가 보고 싶은 것을 확인할 수 있는 가장 좋은 방법은 데이터를 시각화 하는 것입니다.
  23. 시각화 그래프도 다양하긴 한데요, 대표적으로 왼쪽과 같이 특정 데이터의 분포를 살펴볼 수 있는 히스토그램, 오른쪽과 같이 시간의 흐름에 따른 변화를 볼 수 있는 시계열 그래프가 있습니다.
  24. 그럼 아까 그 데이터를 바탕으로 유저별로 하루에 게임 접속을 얼마나 하는지 살펴보도록 할게요.
  25. 유저별로 일일 접속 수를 알기 위해 히스토그램 그래프를 그리는 것을 보여드렸습니다.
  26. 그럼 두번째로 일자별 DAU를 그려보도록 하겠습니다.
  27. DAU를 살펴보기 위해 시계열 그래프를 그리는 것을 보여드렸습니다.
  28. 그럼 마지막으로 잔존율을 나타내보도록 하겠습니다.
  29. 예시 데이터가 로그인 데이터였는데, 이 데이터만으로도 충분히 다양한 분석을 할 수 있지만 또 한편으로는 한계가 있습니다. 게임을 계속 켜놓고 있을 수도 있고 (그럼 로그인 이력이 안찍히겠죠) 게임에서 튕겨나갔다가 다시 들어왔을 수도 있습니다. 그래서 로그인 데이터 뿐만 아니라 스테이지 플레이 이력, 재화 획득 이력 등 다른 로그데이터와 교차검증을 하면서 더 풍부한 분석을 하면 더 정확하고 정교한 분석을 할 수가 있어요. 오늘 데이터를 읽어오고, 간단한 기술통계, 그리고 시각화하는 법에 대해 알려드렸는데요 다음 시간에는 제가 1회 웨비나에서 보여드렸던 성향별로 유저를 분류하는 방법, 성향별로 retention이 다른지 확인하는 방법, 가설을 세우고 그 가설이 맞는지 검정하는 방법을 알려드리도록 하겠습니다. 오늘 간단하다- 싶은것도 생각보다 설명하는데 많은 시간이 걸렸는데요 다음시간에는 제가 전달하고 싶은 만큼 잘 전달이 되었으면 좋겠네요ㅎㅎ 발표 듣느라 수고 많으셨습니다. 감사합니다.