졸업작품_preparing..../R_작업

Steam_game_Analysis_2(FreeVsPair_Game 비교)

IT grow. 2019. 1. 20. 20:17
반응형

저번에 이어서 이번에는 , Free Game과 Pair Game  을 추천정도에 따라서 비교를 해 볼 것이다.


마찬가지로 

https://github.com/Kiminwoo/steam-data/blob/master/analysis/analysis-elh.ipynb

위 사이트를 참고해서 공부를 하였다.


먼저 , 필요한 라이브러리를 로딩해 준다.

import pandas as pd

import numpy as np

import matplotlib.pyplot as plt

import seaborn as sea


데이터 시각화 지정

sea.set_palette("muted")


Python에서 Excel 파일을 로딩시켜 준다.


DF = pd.read_excel("C:/Users/user/Desktop/졸작/Steam게임데이타(Github)/Steam_game_data.xlsx")


Free 와 Pari를 나누어서 각각의 추천 평균값과 Metacrific의 평균을 내준다.


Metacritic이 무엇인지 궁금하다면


--> https://dlsdn73.tistory.com/665


위 주소를 참고하길 바란다.



f = DF[DF['IsFree'] == True].count()

fr = DF[(DF['IsFree'] == True) & DF['RecommendationCount']].mean()

fs = DF[(DF['IsFree'] == True) & DF['Metacritic']].mean()

print("There are", f[1], "free games, with an average of", fr[1], "ratings per game.")

print("There are", f[1], "free games, with an average rating of", fs[0], "per game.")

#----------------------- True Vs False ( Free Vs Pair)

# 위 부분은 Free Game일 경우 Free Game의 추천평균값과 Metacritic의 평균값을 각각 구해서 , 출력까지 한 부분 


# 밑 부분은 Pair Game일 경우 Pair Game의 추천평균값과 Metacritic의 평균값을 각각 구해서 , 출력까지 한 부분

nf = DF[DF['IsFree'] == False].count()

nfr = DF[(DF['IsFree'] == False) & DF['RecommendationCount']].mean()

nfs = DF[(DF['IsFree'] == False) & DF['Metacritic']].mean()

print("There are", nf[1], "paid games, with an average of", nfr[1], "ratings per game.")

print("There are", nf[1], "paid games, with an average rating of", nfs[0], "per game.")


d = {'one' : pd.Series([fr[1],nfr[1]],index=['Free R', 'Paid R'])} # Rating 


df = pd.DataFrame(d)

df.plot(kind='bar', title='Ratings Per Game', legend=False)

plt.savefig("C:/Users/user/Desktop/졸작/Steam게임데이타(Github)2/freeVsPair_rating_bar.png", bbox_inches='tight');


DataFrame의 plot 결과값이다.



위 도표를 통해서 우리는 다음과 같은 것들을 알 수 있다.


1. Free Game Vs Pair Game 의 추천수를 비교해 보았을 때 , 상대적으로 Free Game의 추천수가 많다는 것을 알 수 있다.

2. 그 의미는 , 여기서의 의미는 Free Game Vs Pair Game 을 비교해서 얻은 결과값들로만 기반으로 했을 때 , 상대적으로 

Free Game 이 사용자들에게 만족도가 높다는 것을 예측해 볼 수 있다.

물론 상대적이다.





반응형