Who dominates the global smartphone market in 2020 ?

Posted on Mon 26 October 2020 in Economics • 3 min read

Who dominates the global smartphone market in 2020?


Import required libraries

In [1]:
from PIL import Image

import pandas as pd
import numpy as np
import plotly.graph_objects as go
import plotly.io as pio
from IPython.display import Javascript

Javascript(
"""require.config({
 paths: { 
     plotly: 'https://cdn.plot.ly/plotly-latest.min'
 }
});"""
)

pio.renderers.default = 'notebook_connected'

Smartphone global stats 2Q20

In [2]:
df_stats_2Q20 = pd.read_csv('Data/Smartphone_global_stats_2Q20.csv',
                sep=';')

df_stats_2Q20.dropna(inplace=True)
df_stats_2Q20 = df_stats_2Q20.replace(',','.', regex=True)

df_stats_2Q20['2Q18 Shipment Volumes'] = df_stats_2Q20['2Q18 Shipment Volumes'].astype('float')
df_stats_2Q20['2Q19 Shipment Volumes'] = df_stats_2Q20['2Q19 Shipment Volumes'].astype('float')
df_stats_2Q20['2Q20 Shipment Volumes'] = df_stats_2Q20['2Q20 Shipment Volumes'].astype('float')

df_stats_2Q20 = df_stats_2Q20.iloc[:-1,:]

df_stats_2Q20
Out[2]:
Company 2Q20 Shipment Volumes 2Q20 Market Share 2Q19 Shipment Volumes 2Q19 Market Share 2Q18 Shipment Volumes 2Q18 Market Share
0 Samsung 54.2 19.50% 76.2 23.00% 71.5 21.00%
1 Huawei 55.8 20.00% 58.7 17.70% 54.2 15.90%
2 Apple 37.6 13.50% 33.8 10.20% 41.3 12.10%
3 Xiaomi 28.5 10.20% 32.3 9.70% 32.4 9.50%
4 OPPO 24.0 8.60% 29.5 8.90% 29.4 8.60%
5 Others 78.4 28.20% 101.0 30.50% 112.4 32.90%
In [3]:
fig = go.Figure(data=[
    go.Bar(
        name='2nd quarter 2018', 
        x=df_stats_2Q20['Company'], 
        y=df_stats_2Q20['2Q18 Shipment Volumes'], 
        marker_color='rgb(57, 105, 172)',
        text=df_stats_2Q20['2Q18 Shipment Volumes'],
        textposition='auto'),
    
    go.Bar(
        name='2nd quarter 2019', 
        x=df_stats_2Q20['Company'], 
        y=df_stats_2Q20['2Q19 Shipment Volumes'],
        marker_color='rgb(242, 183, 1)',
        text=df_stats_2Q20['2Q19 Shipment Volumes'],
        textposition='auto'),
    
    go.Bar(
        name='2nd quarter 2020', 
        x=df_stats_2Q20['Company'], 
        y=df_stats_2Q20['2Q20 Shipment Volumes'],
        marker_color='rgb(231, 63, 116)',
        text=df_stats_2Q20['2Q20 Shipment Volumes'],
        textposition='auto')
])

# Change the bar mode
fig.update_layout(
    margin={"r":10,"t":70,"l":15,"b":50},
    barmode='group',
    title='<b>Global Top 5 Smartphone Companies, Unit Sales</b><br>' + 
    '<i>Source : International Data Corporation</i>',
    font=dict(
        family='Helvetica',
        size=14,
        color='grey'
    ),
    legend=dict(
        x=0,
        y=1.0,
        bgcolor='rgba(255, 255, 255, 0)',
        bordercolor='rgba(255, 255, 255, 0)'
    ),
    yaxis=dict(
        title='Sales volumes (in millions of units)'
    )
)

# Add watermark
fig.add_layout_image(
    dict(
        source=Image.open('../extra/Datashow_Logo.png'),
        xref='paper', yref='paper',
        x=0.81, y=-0.05,
        sizex=0.2, sizey=0.2
    )
)

fig.write_image("Figures/Top_5_Smartphone_Companies_2Q.png", 
                scale=5)

fig.show()

Global smartphone Shipment Volumes 2018 and 2019

In [4]:
df_sales = pd.read_csv('Data/Global_Smartphone_Shipment_Volumes_2018_and_2019.csv', 
                       sep=';')

df_sales = df_sales.replace(',','.', regex=True)

df_sales['2018'] = df_sales['2018'].astype('float')
df_sales['2019'] = df_sales['2019'].astype('float')

df_sales
Out[4]:
Company 2018 2019
0 Samsung 292.2 295.0
1 Huawei 206.0 240.6
2 Apple 208.8 190.6
3 Xiaomi 119.0 122.8
4 OPPO 113.3 114.4
In [5]:
fig = go.Figure(data=[
    go.Bar(
        name='2018', 
        x=df_sales['Company'], 
        y=df_sales['2018'], 
        marker_color='rgb(0, 134, 149)',
        text=df_sales['2018'],
        textposition='auto'),
    
    go.Bar(
        name='2019', 
        x=df_sales['Company'], 
        y=df_sales['2019'],
        marker_color='rgb(207, 28, 144)',
        text=df_sales['2019'],
        textposition='auto')
])

fig.update_layout(
    margin={"r":10,"t":70,"l":15,"b":50},
    barmode='group',
    title='<b>Global Top 5 Smartphone Companies, Unit Sales</b><br>' + 
    '<i>Source : International Data Corporation</i>',
    font=dict(
        family='Helvetica',
        size=14,
        color='grey'
    ),
    legend=dict(
        x=0.875,
        y=0.975,
        bgcolor='rgba(255, 255, 255, 0)',
        bordercolor='rgba(255, 255, 255, 0)'
    ),
    yaxis=dict(
        title='Sales volumes (in millions of units)'
    )
)

# Add watermark
fig.add_layout_image(
    dict(
        source=Image.open('../extra/Datashow_Logo.png'),
        xref='paper', yref='paper',
        x=0.81, y=-0.05,
        sizex=0.2, sizey=0.2
    )
)

fig.write_image("Figures/Top_5_Smartphone_Companies.png", 
                scale=5)


fig.show()

Global smartphone market shares

In [6]:
df_market_shares = pd.read_csv('Data/Global_smartphone_market_shares_4Q17_to_2Q20.csv', 
                               sep=';')

df_market_shares
Out[6]:
Date Huawei Samsung Apple Xiaomi
0 Q4 2017 10.7% 18.9% 19.6% 7.1%
1 Q1 2018 11.8% 23.5% 15.7% 8.4%
2 Q2 2018 15.9% 21.0% 12.1% 9.5%
3 Q3 2018 14.6% 20.3% 13.2% 9.5%
4 Q4 2018 16.2% 18.8% 18.3% 6.7%
5 Q1 2019 18.9% 23.0% 11.8% 8.9%
6 Q2 2019 17.7% 23.0% 10.2% 9.7%
7 Q3 2019 18.6% 21.8% 13.0% 9.1%
8 Q4 2019 15.2% 18.8% 20.0% 8.9%
9 Q1 2020 17.8% 21.1% 13.3% 10.7%
10 Q2 2020 20.0% 19.5% 13.5% 10.2%
In [7]:
fig = go.Figure()

fig.add_trace(
    go.Scatter(
        x=df_market_shares['Date'], 
        y=df_market_shares['Huawei'],
        mode='lines+markers',
        name='Huawei',
        line = dict(color='rgb(231, 63, 116)', width=3))
)

fig.add_trace(
    go.Scatter(
        x=df_market_shares['Date'], 
        y=df_market_shares['Samsung'],
        mode='lines+markers',
        name='Samsung', 
        line = dict(color='rgb(57, 105, 172)', width=3))
)

fig.add_trace(
    go.Scatter(
        x=df_market_shares['Date'], 
        y=df_market_shares['Apple'],
        mode='lines+markers',
        name='Apple',
        line = dict(color='rgb(242, 183, 1)', width=3))
)

fig.add_trace(
    go.Scatter(
        x=df_market_shares['Date'], 
        y=df_market_shares['Xiaomi'],
        mode='lines+markers', 
        name='Xiaomi',
        line = dict(color='rgb(117, 165, 121)', width=3))
)

fig.update_layout(
    margin={"r":10,"t":120,"l":15,"b":80},
    barmode='group',
    title='<b>Worldwide Top 4 Smartphone Companies, Unit Market Share</b><br>' + 
    '<i>Source : International Data Corporation</i>',
    font=dict(
        family='Helvetica',
        size=14,
        color='grey'
    ),
    legend=dict(
        orientation='h',
        yanchor='bottom',
        y=0.98,
        xanchor='right',
        x=1,
        bgcolor='rgba(255, 255, 255, 0)',
        bordercolor='rgba(255, 255, 255, 0)'
    ),
    yaxis=dict(
        title='Unit Market Share'
    )
)

fig.update_yaxes(ticksuffix='%', 
                 range=[5, 25])

# Add watermark
fig.add_layout_image(
    dict(
        source=Image.open('../extra/Datashow_Logo.png'),
        xref='paper', yref='paper',
        x=0.81, y=-0.15,
        sizex=0.2, sizey=0.2
    )
)

fig.write_image("Figures/Top_4_Smartphone_Companies.png", 
                scale=5)

fig.show()

Sources