Internet and Development

Kyle McConnell & Cristina Gnecco

Outline:

This project attempts to determine whether or not certain regions derive advantages from unusually high internet speeds. If so, how has the internet leveled the playing field for less resource-rich nations? As advanced economies are driven more by innovation than brute manufacturing, how will China and India match the nimbleness of the smaller Asian Tigers? How have foreign companies capitalized on the consumer preferences of Asia? amd to what degree are those preferences products of their environment?


In [1]:
import sys                             # system module
import pandas as pd                    # data package
import matplotlib.pyplot as plt        # graphics module  
import datetime as dt                  # date and time module
import numpy as np                     # foundation for Pandas
import seaborn.apionly as sns          # fancy matplotlib graphics (no styling)
from pandas_datareader import wb, data as web  # worldbank data

# plotly imports
from plotly.offline import iplot, iplot_mpl  # plotting functions
import plotly.graph_objs as go               # ditto
import plotly                                # just to print version and init notebook
import cufflinks as cf                       # gives us df.iplot that feels like df.plot
from plotly import tools
import plotly.plotly as py
import plotly.graph_objs as go
                                           
cf.set_config_file(offline=True, offline_show_link=False)

# these lines make our graphics show up in the notebook
%matplotlib inline             
plotly.offline.init_notebook_mode(connected=True)


/Users/sglyon/anaconda3/lib/python3.5/site-packages/matplotlib/__init__.py:878: UserWarning: axes.color_cycle is deprecated and replaced with axes.prop_cycle; please use the latter.
  warnings.warn(self.msg_depr % (key, alt_key))

Economic Data


In [2]:
#dataframe of country names and iso codes used in Mapping
url = "http://unstats.un.org/unsd/methods/m49/m49alpha.htm"  #taken from in class example
iso = pd.read_html(url, attrs={"border": "0", "cellpadding": "2"}, header=0)[0]
iso = iso.rename(columns={"ISO ALPHA-3 code": "ISO", 
                          "Country or area name": "Country"})
iso = iso.drop("Numerical  code", axis=1)
iso = iso.set_index("Country")

In [3]:
def Kor_comparables(indicators, year=(2000,2015)):
    """
    Gets data from the world bank for the listed countries
    """
    comparables = ["Republic of Korea",  "China", "India",
                   "Japan", "United States of America"] 
    
    iso_codes = iso[iso.index.isin(comparables)]
    
    df = wb.download(country=iso_codes["ISO"], indicator=indicators, 
                         start=2000, end=2015)
    
    return df

Data_Comparables = Kor_comparables(["GB.XPD.RSDV.GD.ZS", "NY.GDP.PCAP.CD", "TX.VAL.TECH.CD"])
Data_Comparables.rename(columns={"NY.GDP.PCAP.CD": "GDP Per Capita",
                                "GB.XPD.RSDV.GD.ZS": "R&D % of GDP",
                                "TX.VAL.TECH.CD": "High-Tech Exports"}, inplace=True)

DC = Data_Comparables.unstack("country") #get data across time, with Countries as Columns

We will focus on Japan, South Korea, China, India, and the United States. Japan and Korea will represent the Asian Tigers that substituted prolific high speed internet for natural resources. China and India are the two economies with the ability to upset the current economic world order within in the next 10 years, and so, are compared to see how large a part the internet is to their development. The United States is the standard to which these countries are compared. Below is a chart of each country's GDP per capita from 2000-2015:


In [4]:
DC["GDP Per Capita"].iplot(title = "GDP per Capita: 2000 - 2015",
                          yTitle = "US dollars")


We see some unsurprising things here:

  • The U.S. has the highest GDP per capita
  • India and China have the lowest
  • Korea and Japan fall in the middle, closer to the U.S.

India and China will always struggle to have a high GDP per capita given their populations. China is transitioning to a higher-income society, how will they fare? Japan has experienced a lost decade - going on 2- that has seen a shrinking of its economy. Korea slowy advances, and the U.S. remains that standard-bearer for 50K/year "middle-class".

Internet Penetration by region


In [5]:
def internet_penetration_data(url,ISO):
    '''
    Reads in country data for 2000-2015 internet penetration data
    '''
    df = pd.read_excel(url, sheetname = 1, skiprows = 4, skipcolumns = 1)
    df = df.drop('Unnamed: 3', axis =1).drop('Unnamed: 0', axis = 1)
    df = df.rename(columns={'Unnamed: 1':'Year','data': ISO}).set_index('Year')
    df = df[ISO]
    
    return df

In [6]:
kor = "https://github.com/kylereidmcc/Bootcamp_Project/raw/master/statistic_id226712_internet-penetration-in-south-korea-2000-2015.xlsx"
ind = "https://github.com/kylereidmcc/Bootcamp_Project/raw/master/statistic_id255135_india_-internet-penetration-2000-2015.xlsx"
chn = "https://github.com/kylereidmcc/Bootcamp_Project/raw/master/statistic_id255136_china_-internet-penetration-2000-2015.xlsx"
jpn = "https://github.com/kylereidmcc/Bootcamp_Project/raw/master/statistic_id255857_japan_-internet-penetration-2000-2015.xlsx"
usa = "https://github.com/kylereidmcc/Bootcamp_Project/raw/master/statistic_id209117_united-states-internet-penetration-2000-2015.xlsx"

KOR = internet_penetration_data(kor,'KOR')
IND = internet_penetration_data(ind, 'IND')
CHN = internet_penetration_data(chn, 'CHN')
JPN = internet_penetration_data(jpn, 'JPN')
USA = internet_penetration_data(usa, 'USA')

df = pd.concat([KOR, JPN, IND, USA, CHN], axis=1)

In [7]:
#Animation for map
def trace_for_year(year):
    data = df.loc[year, :]
    out = dict(type="choropleth",
        locations=data.index,
        locationmode="ISO-3",
        z=data,
        colorscale="Reds"
        
    )
    return out

In [8]:
#Choropleth for Internet penetration from 2000-2015
frames = [
    dict(
        data=[{"z": trace_for_year(year)["z"].tolist()}],
        traces=[0],
        name=str(year),
        layout=dict(title="Percent of Population that Accessed the Internet in {}".format(year))
    )
    for year in df.index.tolist()
]

layout2 = go.Layout(
    title="Percent of Population that Accessed the Internet in 2000",
    geo={
        "scope": "world", 
        "resolution": 50, 
        "landcolor":"rgb(229, 229, 229)",
        "showland": True, 
        "showframe":True,
        "showcountries": True
    },
    sliders=[
        dict(
            currentvalue={"prefix": "Year: "},
            steps=[
                dict(
                    label=f["name"],
                    method="animate",
                    args=[[f["name"]], {"frame": {"duration": 0}}]
                )
                for f in frames
            ]
        ),
        
    ]
)

fig = go.Figure(data=[trace_for_year(2000)], layout=layout2, frames=frames)
iplot(fig)


Choropleth: Internet Penetration 2000-2015

  • This data from the WorldBank measures the percent of the population that accessed the Internet during the year.

One of the hypothesises of this project is what advantage - if any- do countries like Japan and South Korea experience because of their ubiqitous internet access?

In 2000, South Korea had the highest internet penetration at 44.7%, beating out the U.S. -which here is our level of 'advanced' development. India and China were both tragically low, under the 2% mark.

By 2015, China increased to 50%, close to double India's 26%. It would appear that China made an active investment in their internet, why? Our benchmark, the U.S. remained fairly constent, ending at 75%. Korea and Japan show high levels of penetration at 85% and 93%.

How are these figures showing up in the economic data? Will China's rising number undermine their political system? Or is it simply a measure of their attempt to move from manufacturing to a service based economy?

High-Tech


In [145]:
DC["High-Tech Exports"].iplot(title = "High-Tech Exports",
                        yTitle = "Current U.S. Dollars ")


This graph shows the dollar amount of High-Tech exports for each country from 2000-2015. A graph of high-tech exports as a percent of GDP, wouldn't show the nominal domniance that China has gained in the world market. Japan/Korea have high percentages of their exports being high-tech, but nominally not as large as the U.S. or China because of the size of their economies. So, the scale here is important when comparing countries with different nominal levels of exports. Still, we see some interesting things:

  • Korea, Japan, and the U.S. remain relatively stable as they have all had fairly wide reaching early (2000) internet access.
  • Their numbers actually represent a large portion of their export economy (as expected).
  • India is quite low because their economy is not advanced enough for high-tech manufacturing. They have a large IT sector, but is small on this scale.

The real story here is China:

  • Huge growth in high tech exports after the great recession.
  • Over the same time they saw their internet access more than double (22% to 50%).

What we see here is the development of China over the last 15 years from low wage manufacturing to sophiscticated high-value added manufacturing. They have positioned themselves to be a regional hub for high-tech exports by increasing their internet infrastructure. China is attempting to transition and bridge the gap between developing (India) and advanced (Japan/Korea/U.S.) economies.

Internet speeds in selected cities


In [9]:
"""
Internet Speed Data
"""
speed = "https://github.com/kylereidmcc/Bootcamp_Project/raw/master/statistic_id204960_highest-peak-connection-speed-in-selected-cities-worldwide-in-2012.5.xlsx"

Internet_speeds = pd.read_excel(speed, sheetname = 1, skiprows = 4, skipcolumns = 1)
Internet_speeds.drop('Unnamed: 0', axis=1, inplace=True)
Internet_speeds.set_index('Year', inplace =True)
Internet_speeds = Internet_speeds.rename(columns={'data':'Max Internet Speed'})

In [10]:
marker = {"color": Internet_speeds["Max Internet Speed"],
          "size": Internet_speeds["Max Internet Speed"],
          "colorscale": "Reds",
          "colorbar": {"title": "Max Internet Speed 2012 (Mbps)"},
         }

layout = dict(
            title = "Max Internet Speeds in Global Cities",
            geo={"scope": "asia", "resolution": 50,
                  "showframe": True,
                  "showland" : True,
                  "landcolor": "rgb(229, 229, 229)",
                  "showcountries" : True
                  }, 
              width=950, height=600)

trace = dict(type="scattergeo",     # trace type
             mode="markers",        # draw dots
             lat= Internet_speeds["Latitude"],  # latitude coordinate
             lon= Internet_speeds["Longitude"], # longitude coordinate
             text = Internet_speeds["City"],
             #text = Internet_speeds["City"],
             marker=marker # marker settings (color, size...)
            )

iplot(go.Figure(data=[trace], layout=layout), link_text="")


As we can see from the map, in 2012, outside of Hong Kong, every city with the fastest internet speed is in either Japan or Korea. Lacking in natural resources, Japan and Korea have created comparative advantages in internet speeds, which enables them to become leaders in high-tech innovation. Investment in fiber-optic infrastructure has supported their high-value tehnology and service sectors.

R&D Spending


In [11]:
DC["R&D % of GDP"].iplot(title = "R&D Spending as a Percent of GDP",
                        yTitle = "Percent of GDP")


This graph highlights how the internet can be used to create new comparative advantages. If roads and ports are neccessary to become an export hub, fast and realiable internet is the infrastructure of high-tech goods. High-tech and value added goods are necessary for an economy to transition from developing to developed.

We see here, that as a percentage of GDP, Korea and Japan spend the most on R&D research. Korean and Japanese companies are known for innovation: Samsung, Hyundai, Sony, Fuji, etc.

  • Over the entire time horizon, Japan's spending was over 3% of GDP, while their GDP was nominally amongst the three largest in the world.
  • Korea has been increasing their R&D spending in correlation with the increase in internet access and speed. Nominally their high-tech exports have slighlty increases, but have reverted down after the great recession as demand for world trade softened.
  • Both Korea and Japan created advanced high-tech firms because of massive R&D spending.

Could this be a lesson for China? If we look at their increase in high-tech exports, we can detect a similar (although less extreme) trend in R&D spending. In 2014, they were up above 2% GDP. And with a GDP over 11 trillion, this is nominally more than Japan and Korea. China is approaching the U.S. in terms of R&D spending.

As with internet access, India is lagging behind, showing that they have a long way to go in developing their high-tech economy.

AppleShare

Just for fun, we thought we would look at how internet speed is affecting consumer preferences. Below is Apple's revenue by quarter, by region for 2012-2016.


In [12]:
share = "https://github.com/kylereidmcc/Bootcamp_Project/raw/master/statistic_id382175_apple-sales-revenue-by-country-region-2012-2016-by-quarter.xlsx"

AppleShare = pd.read_excel(share, sheetname = 1, skiprows = 4, skipcolumns = 1)
AppleShare.drop("Unnamed: 0", axis=1, inplace=True)
AppleShare = AppleShare.rename(columns={'Unnamed: 1':'Quarter','data': '% of New Smartphone Sales'}).set_index('Quarter')

In [13]:
AppleShare.iplot(title= "Apple Revenue Disaggregation",
                 yTitle = "% of Apple's Revenue")


Because the data is all of Apple's revenue across regions, the data for Iphone sales in Korea is diluted. However, it still conveys the trends we see in global preferences. Apple is unusual in that their 4th Quarter ends in late September. Regardless, we note a few observations:

  • Apple's revenue is highest in the U.S. (unsurprising)
  • Because of Apple's accounting, their 1st Quarter results reflect the success of their Iphone release and holiday sales.
  • Their revenue consistently spikes after the release of the new Iphone.
  • Apple experienced a large spike in the 1st Quarter of 2015. This is when they released the 6 + range of Iphones.
  • Revenue in China jumped 10%, Japan jumped 2%, and Korea (rest of Asia) jumbed 3% in 1Q 2015

Here we see the trend and the affect of Apple's decision. Releasing a larger, faster Iphone was gobbled up by the Asian market whose demand stemmed from their much faster internet speed. Furthermore, Asian apps tend to be all encompasing- meaning that their messanger,uber,venmo,instagram, and snapchat all live within one app. Fast internet and large phones become prerequisites.

Given the size of Japan and Korea, without specific country data it is hard to really analyze the impact of the larger Iphone, because comparativley they're markets are small.

Looking Forward

Japan and Korea experience high rates of internet access, higher than the U.S. They also have a high level of R&D spending and a high level of high-tech exports. Their economies have become a product of their infrastructure. The data here has provided some substance to the thought that Japan and Korea have capitalized on their internet capabilities. Realizing their lack of natural resources, they have created new comparative advantages with the internet. Their internet speed has trickled down to affect their phone preferences in screen size.

More interestly, is how in the future China and India could replicate this advancement. India remains far away, and must first develop a robust economy that produces wage growth and per capita increases. So, for right now, the data does not offer any suggestions as to their development.

For China, on the other hand, it does. China has increased its internet access and R&D spending. Directly after this it experienced growth in its high-tech manufacturing. To move up the value chain and emulate Korea and Japan, China will need to continue to invest in innovation fostering infrastrucutre.

The question for the future, is: how will China handle the byproducts of increased internet access and speed? How will it affect their transition into an advanced economy? and how will it affect freedom of speech within the Communist party?