アラジンとトイ・ストーリー4の日本興収がやば過ぎる!

この夏のディズニー映画の超ヒット作「トイ・ストーリー4」と「アラジン」の海外興収シェアにおいて、我が国日本が堂々のトップに輝いているのが目に着いたのでplotlyで、両映画の海外興行収入をグラフ化してみることにしました。トップの日本と2位の差がどれくらいなのかが気になるところです。

スポンサーリンク

アラジンの海外興収を視覚化¶

先ず、アラジンのデータをダウンロードします。

import pandas as pd
import requests

df = pd.read_html(requests.get(\
 'https://www.boxofficemojo.com/movies/?page=intl&id=disneyfairytale22019.htm').content)
df1 = df[6]
df2 = df1.drop([1,2,3,4,6], axis=1)
df2.columns = ['国名', '興行収入']
df3= df2.drop([0,1,2])
df3['興行収入'] = df3['興行収入'].str.replace('$','').str.replace(',','')
df3['興行収入'] = df3['興行収入'].apply(pd.to_numeric, errors="coerce").astype(int)
df3['share'] = round(df3['興行収入']/686910107*100,4)
df3['share'] = df3['share'].apply(pd.to_numeric, errors="coerce").astype(str)
import plotly.graph_objs as go
from plotly.offline import plot,iplot

df3['text'] = df3['国名'] + '<br>' + 'Share ' + df3['share']+'%'
data = dict(type = 'choropleth', 
           locations = df3['国名'],
           locationmode = 'country names',
           z = df3['興行収入'], 
           text = df3['text'],
           colorscale = 'YlGnBu',
           reversescale = False,
           marker = dict(
           line = dict (color = 'rgb(180,180,180)',width = 0.5)),
           colorbar =go.choropleth.ColorBar(
           title = '興収',
           len=0.5))
               
layout = dict(title = 'アラジン海外興収',title_font=dict(size=24,family='Courier',color='black'),
        hoverlabel=dict(font=dict(size=31)),
        autosize=False,width=850, height=800,
        margin=dict( l=50, r=50, b=50, t=50, pad=0, autoexpand=True ), 
        geo = dict(showcountries = True,showocean=True,showrivers = True,
                   resolution = 110,showframe = False, showlakes=True,
                   countrywidth=2,lakecolor='rgb(0,0,200)',
                   projection = dict(type = 'orthographic')))
choromap3 = go.Figure(data = [data], layout=layout)
plot(choromap3,show_link=False,filename="aladdin.html",include_plotlyjs=False)

日本のシェアがトップで16%、2位の韓国が13%、日本と韓国で海外興収の3割近くを占めていることが分かります。日本と韓国の興行収入にそれ程差がないのが意外と言えば意外です。

スポンサーリンク

トイ・ストーリー4の海外興収を視覚化¶

df4 = pd.read_html(requests.get(\
 'https://www.boxofficemojo.com/movies/?page=intl&id=pixar2017.htm').content)
df5 = df4[6]
df6 = df5.drop([1,2,3,4,6], axis=1)
df6.columns = ['国名', '興行収入']
df7= df6.drop([0,1,2])
df7['興行収入'] = df7['興行収入'].str.replace('$','').str.replace(',','')
df7['興行収入'] = df7['興行収入'].apply(pd.to_numeric, errors="coerce").astype(int)
df7['share'] = round(df7['興行収入']/592613333*100,4)
df7['share'] = df7['share'].apply(pd.to_numeric, errors="coerce").astype(str)
df7['text'] = df7['国名'] + '<br>' + 'Share ' + df7['share']+'%'
data = dict(type = 'choropleth', 
           locations = df7['国名'],
           locationmode = 'country names',
           z = df7['興行収入'], 
           text = df7['text'],
           colorscale = 'YlGnBu',
           reversescale = False,
           marker = dict(
           line = dict (color = 'rgb(180,180,180)',width = 0.5)),
           colorbar =go.choropleth.ColorBar(
           title = '興収',
           len=0.5))
               
layout = dict(title = 'トイ・ストーリー4海外興収',title_font=dict(size=24,family='Courier',color='black'),
        hoverlabel=dict(font=dict(size=31)),
        autosize=False,width=850, height=800,
        margin=dict( l=50, r=50, b=50, t=50, pad=0, autoexpand=True ), 
        geo = dict(showcountries = True,showocean=True,showrivers = True,
                   resolution = 110,showframe = False, showlakes=True,
                   countrywidth=2,lakecolor='rgb(0,0,200)',
                   projection = dict(type = 'orthographic')))
choromap3 = go.Figure(data = [data], layout=layout)
plot(choromap3,show_link=False,filename="toystory4.html",include_plotlyjs=False)

日本がシェア14%弱でトップ、2位はシェア12%のメキシコとなっています。韓国人はトイ・ストーリー4があまり好きではないようです。日本は最終的にアラジン並の16%までシェアを伸ばすだろうと思われます。

スポンサーリンク
スポンサーリンク

コメント

タイトルとURLをコピーしました