Game Production Plan Project (Result)


関連項目を完了し、関連情報をアップロードします.時間が決まっていたので分析できなかった点が多くて残念でした.しかし、私は自分ができる部分で、私は最善を尽くしたと思います.進行中に生じたアイデアや資料は、後の項目で表現されます.

Game Production Plan Project


PPT、パブリッシュスクリプト、コードファイルの詳細については、羽毛センターリンクを参照してください。 ハーブリンク:https://github.com/colacan100/Game_Production_Plan_Project

1.データの前処理
データの測定値、表現方法、単位の統一、および新しい特徴の追加を実現するために、データを前処理した.
import pandas as pd
import numpy as np
df = pd.read_csv('/vgames2.csv')

df = df.drop(['Unnamed: 0'], axis=1)
# Genre의 Null 값은 분석을 위해 Drop
df = df.dropna()
# Year 전처리
df['Year'] = df['Year'].apply(np.int64)
for i in range(17):
  df.loc[df['Year'] == i, 'Year'] = 2000+i
df.loc[df['Year'] < 100, 'Year'] += 1900

# 데이터가 적은 Year Drop
df_idx1 = df[df['Year']==2017].index
df_idx2 = df[df['Year']==2020].index
df = df.drop(df_idx1)
df = df.drop(df_idx2)

# 지역별 Sales 전처리
df['NA_Sales'] = df['NA_Sales'].replace({'[kK]': '*0.001', '[mM]': '*1'}, regex=True).map(pd.eval).astype(float)
df['EU_Sales'] = df['EU_Sales'].replace({'[kK]': '*0.001', '[mM]': '*1'}, regex=True).map(pd.eval).astype(float)
df['JP_Sales'] = df['JP_Sales'].replace({'[kK]': '*0.001', '[mM]': '*1'}, regex=True).map(pd.eval).astype(float)
df['Other_Sales'] = df['Other_Sales'].replace({'[kK]': '*0.001', '[mM]': '*1'}, regex=True).map(pd.eval).astype(float)

# Sales 합 Column 추가
df['Sales_sum'] = df['NA_Sales']+df['EU_Sales']+df['JP_Sales']+df['Other_Sales']
2-1. ゲームトレンド分析(タイプ)
供給の観点から各年度に流行するゲームの傾向があるかどうかを考察するために,各年度で最も多く発売されたタイプとその発売量を可視化した.
# 그래프를 위한 처리 (라이브러리, 폰트등)
# 아래 코드로 설치 후 런타임 다시 시작
#!apt -qq -y install fonts-nanum > /dev/null
 
import matplotlib.pyplot as plt
import matplotlib.font_manager as fm
 
fontpath = '/usr/share/fonts/truetype/nanum/NanumBarunGothic.ttf'
font = fm.FontProperties(fname=fontpath, size=10)
fm._rebuild()
 
# 그래프에 retina display 적용
%config InlineBackend.figure_format = 'retina'
 
# Colab 의 한글 폰트 설정
plt.rc('font', family='NanumBarunGothic') 

import matplotlib.pyplot as plt
import seaborn as sns
# 연도별 게임의 트렌드가 있을까 (공급)

# 분석을 위한 데이터프레임 만들기
# 연도별 장르 갯수 추출
df_year_genre = df.groupby(['Year', 'Genre']).size().reset_index(name='Count')
# 장르 중 최댓값 추출
year_genre_bool = df_year_genre.groupby(['Year'])['Count'].transform(max) == df_year_genre['Count']
year_max_genre = df_year_genre[year_genre_bool].reset_index(drop=True)
# 중복값 제거
year_max_genre = year_max_genre.drop_duplicates(subset=['Year','Count']).reset_index(drop=True)
year_max_genre.rename(index = {'Count': 'Sales'}, inplace = True)
year_max_genre
# 연도별 공급 트렌드 그래프: 연도별 흐름을 보여주기 위해서 barplot을 이용했다.
import numpy as np, scipy.stats as st
genre = year_max_genre['Genre'].values
plt.figure(figsize=(20,10))

colors = ["#F15F5F"]
sns.set_palette(sns.color_palette(colors))
year_barplot = sns.barplot(x='Year', y='Count',hue='Genre', data=year_max_genre,hue_order=['Action'])
colors = ["#F29661"]
sns.set_palette(sns.color_palette(colors))
year_barplot = sns.barplot(x='Year', y='Count',hue='Genre', data=year_max_genre,hue_order=['Sports'])
colors = ["#F2CB61"]
sns.set_palette(sns.color_palette(colors))
year_barplot = sns.barplot(x='Year', y='Count',hue='Genre', data=year_max_genre,hue_order=['Fighting'])
colors = ["#BCE55C"]
sns.set_palette(sns.color_palette(colors))
year_barplot = sns.barplot(x='Year', y='Count',hue='Genre', data=year_max_genre,hue_order=['Puzzle'])
colors = ["#4374D9"]
sns.set_palette(sns.color_palette(colors))
year_barplot = sns.barplot(x='Year', y='Count',hue='Genre', data=year_max_genre,hue_order=['Platform'])
colors = ["#5CD1E5"]
sns.set_palette(sns.color_palette(colors))
year_barplot = sns.barplot(x='Year', y='Count',hue='Genre', data=year_max_genre,hue_order=['Misc'])
colors = ["#6799FF"]


cnt = 0
for value in year_max_genre['Count']:
    year_barplot.text(x=cnt, y=value + 5, s=str(genre[cnt] + '-' + str(value)),
            color='black', size=8, rotation=90, ha='center')
    cnt+=1
plt.xticks(rotation=90, fontsize=12)
plt.yticks(fontsize=12)

plt.title('연도별 공급 트렌드 그래프')
plt.xlabel('연도')
plt.ylabel('최대 공급 장르의 출시량')
plt.show()
# 공급 부분에서 최근 트렌드는 Action 장르임을 알 수 있다.

需要の観点から各年度に流行するゲームの傾向があるかどうかを考察するために,各年度で最も売れているタイプとその販売量を可視化した.
# 연도별 게임의 트렌드가 있을까 (수요)

# 연도별 장르 총매출 추출
year_max_sales = df.groupby(['Year', 'Genre'])['Sales_sum'].sum().reset_index()
# 장르 중 최댓값 추출
year_sales_bool = year_max_sales.groupby(['Year'])['Sales_sum'].transform(max) == year_max_sales['Sales_sum']
year_max_sales = year_max_sales[year_sales_bool].reset_index(drop=True)
year_max_sales
# 연도별 수요 트렌드 그래프: 연도별 흐름을 보여주기 위해서 barplot을 이용했다.
genre = year_max_sales['Genre'].values
plt.figure(figsize=(15,10))

colors = ["#F15F5F"]
sns.set_palette(sns.color_palette(colors))
year_barplot = sns.barplot(x='Year', y='Sales_sum',hue='Genre', data=year_max_sales,hue_order=['Action'])
colors = ["#F29661"]
sns.set_palette(sns.color_palette(colors))
year_barplot = sns.barplot(x='Year', y='Sales_sum',hue='Genre', data=year_max_sales,hue_order=['Sports'])
colors = ["#F2CB61"]
sns.set_palette(sns.color_palette(colors))
year_barplot = sns.barplot(x='Year', y='Sales_sum',hue='Genre', data=year_max_sales,hue_order=['Role-Playing'])
colors = ["#BCE55C"]
sns.set_palette(sns.color_palette(colors))
year_barplot = sns.barplot(x='Year', y='Sales_sum',hue='Genre', data=year_max_sales,hue_order=['Racing'])
colors = ["#4374D9"]
sns.set_palette(sns.color_palette(colors))
year_barplot = sns.barplot(x='Year', y='Sales_sum',hue='Genre', data=year_max_sales,hue_order=['Platform'])
colors = ["#5CD1E5"]
sns.set_palette(sns.color_palette(colors))
year_barplot = sns.barplot(x='Year', y='Sales_sum',hue='Genre', data=year_max_sales,hue_order=['Fighting'])
colors = ["#6799FF"]
sns.set_palette(sns.color_palette(colors))
year_barplot = sns.barplot(x='Year', y='Sales_sum',hue='Genre', data=year_max_sales,hue_order=['Puzzle'])
colors = ["#A566FF"]
sns.set_palette(sns.color_palette(colors))
year_barplot = sns.barplot(x='Year', y='Sales_sum',hue='Genre', data=year_max_sales,hue_order=['Shooter'])


cnt = 0
for value in year_max_sales['Sales_sum']:
    year_barplot.text(x=cnt, y=value + 5, s=str(genre[cnt] + '-' + str(round(value,2))),
            color='black', size=8, rotation=90, ha='center')
    cnt+=1
plt.xticks(rotation=90, fontsize=12)
plt.yticks(fontsize=12)
plt.title('연도별 수요 트렌드 그래프')
plt.xlabel('연도')
plt.ylabel('최대수요 장르의 매출량')
plt.show()
# 수요 부분에서 최근 트렌드는 Action 장르임을 알 수 있다.

したがって,需要と供給の観点から,各年度タイプの傾向が変化することが分かる.
2-2. ゲームトレンド分析(プラットフォーム)
プラットフォームのバージョンが異なる時期に変化する可能性があるため、異なる年に各プラットフォームの上場量が可視化されます.
sns.set_palette('deep')

# 연도별 플랫폼 출시 비율 그래프 형태 (꺾은선)
plt.figure(figsize=(20, 10))

# 격자 여백 설정
plt.subplots_adjust(wspace = 0.2, hspace = 0.5)

PS3_filter = df.Platform == 'PS3' # 조건식 작성
df_PS3 = df.loc[PS3_filter]
df_PS3 = df_PS3.groupby(['Year', 'Platform']).size().reset_index(name='Count')
plt.plot(df_PS3['Year'], df_PS3['Count'],marker='o',label = 'PS3')

X360_filter = df.Platform == 'X360' # 조건식 작성
df_X360 = df.loc[X360_filter]
df_X360 = df_X360.groupby(['Year', 'Platform']).size().reset_index(name='Count')
plt.plot(df_X360['Year'], df_X360['Count'],marker='o',label = 'X360')

PS4_filter = df.Platform == 'PS4' # 조건식 작성
df_PS4 = df.loc[PS4_filter]
df_PS4 = df_PS4.groupby(['Year', 'Platform']).size().reset_index(name='Count')
plt.plot(df_PS4['Year'], df_PS4['Count'],marker='o',label = 'PS4')

DS3_filter = df.Platform == '3DS' # 조건식 작성
df_3DS = df.loc[DS3_filter]
df_3DS = df_3DS.groupby(['Year', 'Platform']).size().reset_index(name='Count')
plt.plot(df_3DS['Year'], df_3DS['Count'],marker='o',label = '3DS')

XOne_filter = df.Platform == 'XOne' # 조건식 작성
df_XOne = df.loc[XOne_filter]
df_XOne = df_XOne.groupby(['Year', 'Platform']).size().reset_index(name='Count')
plt.plot(df_XOne['Year'], df_XOne['Count'],marker='o',label = 'XOne')
plt.legend()

plt.title('각 플랫폼의 출시량')
plt.xlabel('연도')
plt.ylabel('출시량')
plt.show()

# X360과 PS3의 경우 콘솔 시장의 변화로 인해 수가 줄어들고 있다.
# 따라서 PS4를 Platform으로 채택한다.

したがって,時間が経つにつれてプラットフォームのトラフィックも変化することが分かる.
2-3. ゲームトレンド分析(地域)
地域によって好みのゲームタイプが異なるかどうかを分析するために、Pie Graphを用いて、地域によって好みのタイプの割合を表した.
# 분석을 위한 데이터프레임 만들기
locate_Genre_NA = df.groupby(['Genre'])['NA_Sales'].sum()
locate_Genre_EU = df.groupby(['Genre'])['EU_Sales'].sum()
locate_Genre_JP = df.groupby(['Genre'])['JP_Sales'].sum()
locate_Genre_Other = df.groupby(['Genre'])['Other_Sales'].sum()
locate_Genre = pd.DataFrame()
locate_Genre = locate_Genre.append(locate_Genre_NA)
locate_Genre = locate_Genre.append(locate_Genre_EU)
locate_Genre = locate_Genre.append(locate_Genre_JP)
locate_Genre = locate_Genre.append(locate_Genre_Other)
locate_Genre = locate_Genre.T
locate_Genre
pie_locate = locate_Genre.T
pie_label = pie_locate.columns.values.tolist()
plt.figure(figsize=(8, 8))
plt.pie(pie_locate.loc['NA_Sales'], labels=pie_label, autopct='%.1f%%')
plt.title('북미 지역의 선호장르')

plt.figure(figsize=(8, 8))
plt.pie(pie_locate.loc['EU_Sales'], labels=pie_label, autopct='%.1f%%')
plt.title('유럽 지역의 선호장르')

plt.figure(figsize=(8, 8))
plt.pie(pie_locate.loc['JP_Sales'], labels=pie_label, autopct='%.1f%%')
plt.title('일본 지역의 선호장르')

plt.figure(figsize=(8, 8))
plt.pie(pie_locate.loc['Other_Sales'], labels=pie_label, autopct='%.1f%%')
plt.title('그 외 지역의 선호장르')

plt.show()


しかし、Pie曲線図でトレンドを完璧に分析するのは合理的ではないと思います.カイに検定を乗じて信頼性を高めることにした.
from scipy.stats import chi2_contingency
# 카이제곱 검정으로 판단
# 독립변수 : 장르
# 종속변수 : 국가별 판매량
# 귀무가설 : 비율 차이가 없다. (=지역마다 선호하는 장르가 같다.)
chi2_val, p, dof, expected= chi2_contingency(locate_Genre, correction=False)
if(p<0.05) : 
    print('p value:', p,"\n"+'귀무가설을 기각한다. 지역마다 선호하는 장르가 다르다.')
else :
    print('p value:', p,"\n"+'귀무가설을 기각하지 못한다. 지역마다 선호하는 장르가 같다.')

# 일본을 제외한 경우
locate_Genre2 = locate_Genre.drop(['JP_Sales'], axis=1)
chi2_val, p, dof, expected= chi2_contingency(locate_Genre2, correction=False)
if(p<0.05) : 
    print('일본을 제외한 p value:', p,"\n"+'귀무가설을 기각한다. 일본을 제외한 지역마다 선호하는 장르가 다르다.')
else :
    print('p value:', p,"\n"+'귀무가설을 기각하지 못한다. 일본을 제외한 지역마다 선호하는 장르가 같다.')
//出力結果//
p value: 9.964279787302075e-123
帰務仮説を却下する.地域によって好きなタイプが違います.
p値(日本を除く):0.02408029771267003
帰務仮説を却下する.日本だけでなく、他の地域でも好みのタイプが違います.
だから、地域によって好きなタイプが違うと思います.
2-4. ゲームトレンド分析(出荷量の多いゲーム)
出荷量の高いゲーム特性を確認するため,10年近くの売上トップ100を選択して可視化した.
# 출고량이 높은 게임에 대한 분석 및 시각화 프로세스
# 주제에 맞게끔 최근 10년간 판매량 Top 100을 선정
sales_top100 = df[df.Year > 2010].sort_values(by='Sales_sum' ,ascending=False)
sales_top100 = sales_top100.head(100).reset_index(drop=True)
sales_top100
販売データ上位100位のプラットフォーム販売データ
# top100 Platform 그래프
top100_platform = sales_top100.groupby(['Platform'])['Sales_sum'].sum().reset_index()
platform = top100_platform['Platform'].values
plt.figure(figsize=(10, 10))
top100_platform_sales = sns.barplot(x ='Sales_sum', y='Platform', data=top100_platform)
cnt = 0
for value in top100_platform['Sales_sum']:
    top100_platform_sales.text(x=value + 5, y=cnt, s=str(round(value,2)),
            color='black', size=10)
    cnt+=1
plt.title('매출량 Top 100의 플랫폼별 매출량 (최근 10년)')
plt.xlabel('매출량')
plt.ylabel('플랫폼')
plt.show()
# 최근 10년간 출고량이 많았던 플랫폼은 PS3,PS4,X360이다.

売上高Top 100の異なるタイプの売上高チャート
# top100 Genre 그래프
top100_genre = sales_top100.groupby(['Genre'])['Sales_sum'].sum().reset_index()
genre = top100_genre['Genre'].values
plt.figure(figsize=(10, 10))
top100_genre_sales = sns.barplot(x ='Sales_sum', y='Genre', data=top100_genre)
cnt = 0
for value in top100_genre['Sales_sum']:
    top100_genre_sales.text(x=value + 5, y=cnt, s=str(round(value,2)),
            color='black', size=10)
    cnt+=1
plt.title('매출량 Top 100의 장르별 매출량 (최근 10년)')
plt.xlabel('매출량')
plt.ylabel('장르')
plt.show()
# 최근 10년간 출고량이 많았던 장르는 Shooter,Action,Sports 이다.

売上データ上位100社の売上データ
# top100 Publisher 그래프
top100_publisher = sales_top100.groupby(['Publisher'])['Sales_sum'].sum().reset_index()
publisher = top100_publisher['Publisher'].values
plt.figure(figsize=(10, 10))
top100_publisher_sales = sns.barplot(x ='Sales_sum', y='Publisher', data=top100_publisher)
cnt = 0
for value in top100_publisher['Sales_sum']:
    top100_publisher_sales.text(x=value + 5, y=cnt, s=str(round(value,2)),
            color='black', size=10)
    cnt+=1
plt.title('매출량 Top 100의 회사별 매출량 (최근 10년)')
plt.xlabel('매출량')
plt.ylabel('회사')
plt.show()
# 최근 10년간 출고량이 많았던 회사는 Activision,Nintendo,Electronic Arts 이다.

ゲーム全体の分析に比べて、異なる傾向が見られます.

理由はGTA、CallofDutyなどのシリーズ製品の影響で、結果値が影響を受けたからです.
したがって、データ全体を選択します.△出荷量の高いデータを除外するかどうかを考慮したが、シリーズもトレンドの一部として却下した.
3-1. デザインするゲーム(タイプ)を選択
ここ10年間、どのようなタイプの供給需要が高いかを可視化しました.(2-1.ゲームトレンド解析(タイプ)のコードと同じ.)


ここ10年来、動作題材の供給、需要が高いため、動作題材を選んだ.
3-2. 設計するゲーム(プラットフォーム)を選択
ここ10年間、アクションの題材の中でどのプラットフォームが最も売れているかを可視化した.
Genre_filter = (df.Genre == 'Action') & (df.Year > 2010) # 조건식 작성
df_action = df.loc[Genre_filter].reset_index(drop = True)
df_action
df_action_platform = df_action.groupby(['Platform'])['Sales_sum'].sum().reset_index()
platform = df_action_platform['Platform'].values
plt.figure(figsize=(10, 10))
df_action_platform_sales = sns.barplot(x ='Sales_sum', y='Platform', data=df_action_platform)
cnt = 0
for value in df_action_platform['Sales_sum']:
    df_action_platform_sales.text(x=value + 5, y=cnt, s=str(round(value,2)),
            color='black', size=10)
    cnt+=1
plt.title('Action게임의 플랫폼별 매출량 (최근 10년)')
plt.xlabel('매출량')
plt.ylabel('플랫폼')
plt.show()

また、この10年間のプラットフォームの発売状況を理解し、バージョンの変化によるプラットフォーム数の急激な減少を理解し、解消しました.(2-2.ゲームトレンド分析(プラットフォーム)のコードと同じ.)

X 360とPS 3では、コンソール市場の変化により、数が減少しています.このため,両プラットフォームに加えて最大販売量のPS 4をプラットフォームとして採用した.
3-3. デザインするゲーム(地域)を選択
アクションタイプとPS 4プラットフォーム上のゲームがどの地域で最も売上高が高いかを知る.
Platform_filter = (df_action.Platform == 'PS4') # 조건식 작성
df_action_ps4 = df_action.loc[Platform_filter].reset_index(drop = True)
df_action_ps4
plt.figure(figsize=(10,10))
locate_NA = df_action_ps4['NA_Sales'].sum()
locate_EU = df_action_ps4['EU_Sales'].sum()
locate_JP = df_action_ps4['JP_Sales'].sum()
locate_Other = df_action_ps4['Other_Sales'].sum()
locate_group = pd.DataFrame({'locate':['NA','EU','JP','Other'],'Sales':[locate_NA, locate_EU,locate_JP,locate_Other]})
locate_barplot = sns.barplot(x='locate', y='Sales',data=locate_group)
Sales = locate_group['Sales'].values
cnt = 0
for value in locate_group['Sales']:
    locate_barplot.text(x=cnt, y=value+0.5, s=str(str(round(value,2))),
            color='black', size=10, ha='center')
    cnt+=1
plt.title('Action게임(PS4)에서 지역별 매출량 (최근 10년)')
plt.xlabel('지역')
plt.ylabel('매출량')
plt.show()
# EU를 대상으로한 게임을 설계한다.

欧州連合(EU)地域が最も売上高が高いため、欧州連合(EU)地域向けのゲームを設計した.
3-4. デザインするゲームを選択(会社)
テーマ会社を決定するために,以上の条件を満たす会社の販売量を可視化した.
# 연도별 장르 갯수 추출
df_action_ps4_pub = df_action_ps4.groupby(['Publisher'])['EU_Sales'].sum().reset_index()
plt.figure(figsize=(10, 10))
res_barplot = sns.barplot(x='EU_Sales', y='Publisher',data=df_action_ps4_pub)
plt.title('EU지역에서 Action게임(PS4)의 회사별 매출량 (최근 10년)')
plt.xlabel('EU지역 매출량')
plt.ylabel('회사')
plt.show()
# Ubisoft를 모티브로 하겠다.

Ubisoftの販売量が一番高いので、Ubisoftをテーマにしたゲームをデザインしています.
4.結論
ActionタイプでPS 4プラットフォームの上をEU地域に向け、Ubisoft社をテーマにゲームを設計することは、新会社が最小の投資で最大の利益を得る方法です.