Introduction

Why Matters

U.S. Direct Investment Abroadis an important factor that can demonstrate the confidence to global market of U.S. investors. Because U.S. owns the biggest and best capital market in the world, the confidence of U.S. investors can indicate the economic situation of countries and regions. Investment Income, Reinvestment, and Reinvestment Percentage are three factors I will use to measure the U.S. Direct Aboard Investment Situation. After my analysis, audiences will learn how much U.S. investors can earn from capitals they put in these main countries, how much they reinvested back to these countries and what is the percentage of the reinvestment. These analysis will show country or region U.S. investors most interested in and feel most confident of in past 15 years (2000 - 2016).

Data Explanation

I will use U.S. Direct Investment Abroad, Direct investment Income Without Current-Cost Adjustment (hereafter referred to as DII) and U.S. Direct Investment Abroad, reinvestment of Earning Without Current-Cost Adjustment (hereafter referred to as RIOE). These two data sets are both quoted from Bureau of Economic Analysis. These two data sets span from 2000 - 2016. To be simplified, I picked only major countries and regions where U.S. direct investment has been going to:

  • Europe
    • France
    • Germany
    • United Kingdom
  • Latin American and other Western Hemisphere
  • Africa
  • Mideast
  • Asia and Pacific
    • China
    • India
    • Japan
    • Korea, Republic of
    • Singapore
    • Australia

Importance

After analysis, audiences and investors can figure out the trend of investment income and reinvestment percentage in past 15 years at different countries. For people who plan to do abroad investment, they can find the most valuable region to invest. For people who has capitals oversee can use my analysis to predict the next emerging market for their expanding.

  • For example, if the analysis shows that UK is the market which gave the highest investment income to U.S. and highest reinvestment amount from U.S., we can conclude that UK has the best economics environment because investors are able to earn more from UK. In this way, potential investors focus on analyzing UK deeply to figure out the possibility of investing in UK.

Methodology

In data-clean stage, I would like to joint and clean these two data sets first. You can find my tidy data and personalize anything you interested in Table 1 below. Additionally, I created a new variable called Reinvestment Percentage. After that, I analyzed these variables by using Time-series and Scatter Plots, and visualized the reinvestment percentage, investment income and reinvestment amount in a world map.

Go Back to Top

Data Preparation

Package Installed & Library

To rerun my code successfully, you will need to install/library packages below:

  • Tidyverse:reading, tidying,visualizing and manipulating data
  • DT: generating user friendly data table
  • Maps: importing the “world” map
list.of.packages<-c ("tidyverse", "DT", "maps")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages))install.packages(new.packages)


library(tidyverse)        #reading, tidying,visualizing and manipulating data
library(DT)               #generating user friendly data table
library(maps)             #importing the "world" map

Import and Gather Data

The two data sets for this project can be download by click:

  • U.S.Direct investment Income Without Current-Cost Adjustment: DII
  • U.S.Reinvestment of Earning Without Current-Cost Adjustment (RIOE):RIOE

The raw datasets each includes 17 variables and 15 observations. In dataset RIOE, there were several missing value showed as “(D)” and some negative value, which means the U.S. investor did not invest any income back but also withdrew some from previous years’ accumulative.

## Reading and Cleanning DII&RIOE Data ##
DII<- read_csv("data/1.csv", 
               col_types= "cddddddddddddddddd", 
               skip = 5,
               n_max = 15) %>%
      rename(Country = `X1`)
   

RIOE <- read_csv ("data/2.csv", 
                  col_types = "cddddddddddddddddd", 
                  skip = 5, 
                  n_max = 15 ) %>%
        rename(Country = `X1`)

datatable(DII, caption = 'Raw 1: Direct Investment Income')
datatable(RIOE, caption = 'Raw 2: Reinvestment of Earning')

Go Back to Top

To make my data ready, I gathered years to “Year” Variable and created new variables “Investment_Income” and “Reinvestment”. Since the missing value and negative value is less, I simply delete them by using na.rm = TRUE.

   DII_Gathered<- gather (DII, key = "Year",
                    value= "Investment_Income", 
                    -Country)


   RIOE_Gathered<-  gather (RIOE, key = "Year",
                      value= "Reinvestment", 
                       -Country)
   
datatable(DII_Gathered, caption = 'Gathered 1: Direct Investment Income')
datatable(RIOE_Gathered, caption = 'Gathered 2: Reinvestment of Earning')

Go Back to Top

Tidy and Merged Data

In this part, I joined DII and RIOE to Percentage of Reinvestment (referred to as PRI hereafter).From this step, I got a tidy data includes every variable I need to start my analysis.

  • I used left_join combined DII_Gathered and RIOE_Gathered datasets.
  • mutate was used to created another important variable Reinvest_Percent.
  • I gathered variables Investment_Income and Reinvestment as well.
  • In this analysis, I won’t care about countries or regions whose reinvest percentage is negative. Thus, I used filter to clean the negative data.
##Creat Tidy Merged data##
PRI <- DII_Gathered %>%
  left_join(RIOE_Gathered)%>%
  mutate(Reinvest_Percent = Reinvestment/Investment_Income)%>%
  gather ('Investment_Income', 
          'Reinvestment', 
          key= "Type", 
          value = "Amount")%>%
  filter (Reinvest_Percent > 0)

datatable(PRI, caption = 'Table 1: Data Ready')

Exploratory Data Analysis

Big Picture

Checking the US Investment Income & Reinvestment changing pattern over time.

PRI$Year <- parse_number(PRI$Year)
## Make sure Variable "Year" is numerical so that we can visulization data successfully##  

PRI%>%
  filter(Country == "Africa"| 
          Country == "Europe"|
          Country =="Latin America and Other Western Hemisphere"|
          Country =="Middle EasT"|
          Country == "Asia and Pacific")%>%
    ggplot(aes(Year, Amount))+
      geom_point(aes(color = Type))+
      geom_smooth(se = FALSE, aes(color = Type))+
      facet_wrap(~Country, nrow=2)+
      scale_x_continuous(NULL, limits = c(1999, 2016.5), breaks = seq (2000,2016, by=7))+
      ggtitle("Graph 1:Investment Income V.S. Reinvestment", 
            subtitle= "Times Series Group By Region")

From the Graph 1, we can notice that Europe, Asia and Pacific and Latin American are three main areas that US Investment flows out. Africa, as the region needs investment most, made rare investment income for investors and got almost zero reinvestment either. I would like to deeply analyze the trending of US Investment Income and reinvestment at Europe and Asia.

## Clean data for Visualization ##
PRI1<-PRI%>%
  filter(Country == "France"|
         Country == "Germany"|
         Country == "United Kingdom"|
         Country == "China"|
         Country == "India"|
         Country == "Japan"|
         Country == "Korea, Republic of"|
         Country == "Singapore"|
         Country == "Taiwan"|
         Country == "Australia")%>%
  rename(region = 'Country')
  
PRI1[PRI1 == "United Kingdom"]<- "UK"

## Reinvestment Percentage Visualization ##

To get a brief understanding of how reinvestment percentage have changed over the years, I mapped the reinvestment percentage and amount over time.

  1. From Graph 2, we can notice that in 2009, all of countries except India got a big reduction of reinvestment percentage. U.S. subprime mortgage crisis resulted investors collecting more income back. However, India is the only country kept a highest reinvestment percentage in the country I analyzed.

  2. From year 2009 to 2015, UK, China and India kept a good increase trending of their reinvestment percentage.

  3. In reinvestment amount, UK is the top of these countries. We can notice UK has a big different though 2000 to 2015.

PRI1%>%
  right_join(map_data("world"), by = "region")%>%
  filter(Year %in% seq (2000, 2016, by = 3), Type == "Reinvestment")%>%
  select(-subregion)%>%
  ggplot()+
  geom_polygon(aes(long, lat, group=group,fill = Reinvest_Percent), color = "black")+
  coord_fixed(1.3)+
  facet_wrap(~Year, nrow = 2)+
  scale_fill_gradient2(name = "ReinvestPercentage", 
                       labels = scales::percent)+
  ggtitle("Graph 2: Reinvest Percentage Changes Over Time")+
  expand_limits()+
  theme_void()+
  theme(strip.text.x = element_text(size=14),
        text = element_text(family = "Times New Roman"),
        plot.title = element_text(size = 18, color = "red", margin = margin(b =10)))

## Reinvestment Visualization ##
PRI1%>%
  right_join(map_data("world"), by = "region")%>%
  filter(Year %in% seq (2000, 2016, by = 3), Type == "Reinvestment")%>%
  select(-subregion)%>%
ggplot()+
  geom_polygon(aes(x=long, y=lat, group = group,fill = Amount), color = "grey")+
  coord_fixed(1.3)+
  facet_wrap(~Year, nrow = 2)+
  scale_size_continuous(name = "ReinvestAmount",
                        breaks = PRI1$Amount,
                        labels = waiver())+
  ggtitle("Graph 3: Reinvest Amount Changes Over Time",
          subtitle = "United Kindom Has the Highest Reinvestment Every Year")+
  expand_limits()+
  theme_void()+
  theme(strip.text.x = element_text(size=14),
        text = element_text(family = "Times New Roman"),
        plot.title = element_text(size = 18, color = "red", margin = margin(b =10)),
        plot.subtitle = element_text(size = 12, color = "blue", margin = margin (b = 25)))

Go Back to Top

Asia

PRI%>%
  filter(Country == "China"|
         Country == "India"|
         Country == "Japan"|
         Country == "Korea, Republic of"|
         Country == "Singapore"|
         Country == "Australia")%>%
  ggplot(aes(Year, Amount))+
  geom_point(aes(color = Type))+
  geom_smooth(se= TRUE,aes(color = Type))+
  facet_wrap(~ Country, nrow=3)+
  ggtitle("Graph 4: Investment Income V.S. Reinvestment", 
          subtitle= "Singapore Attracted More")

Graph4: From the trend, we can see:

  • Australia shows a good investment income increasing rate for U.S. investors from 2000 to around 2012. Investors were also glad to reinvest more during that period. However, investment income from Australia dropped down from 2012 and leads lower reinvestment amount as well.

  • Investment income from China and reinvestment to China were steady increase in past 17 years.

  • Even though U.S. investors didn’t make too much income from India and Korea, investors chose to reinvest about all their income back India and Korea.

  • The space between investment income and reinvestment became larger from 2008, which means U.S. investors stopped increasing their reinvestment to Japan even though the investment income was still increasing.

  • Singapore looks like the best market in Asia because U.S. investors made the most income from Singapore and reinvested a lot back.

PRI%>%
  filter(Country == "China"|
         Country == "India"|
         Country == "Japan"|
         Country == "Korea, Republic of"|
         Country == "Singapore"|
         Country == "Australia")%>%
  ggplot(aes(Year, Reinvest_Percent))+
    geom_smooth(aes(color=Country))+
    ggtitle("Graph 5: Reinvestment Percentage Changing Over Time", 
            subtitle = "Asian")

Graph 5:

  • Even though India and Korea didn’t return investors too much income (Graph 4), India and Korea gained the highest reinvestment percentage from U.S. investors.

  • Combined with graph 4, Investment income from Australia, Reinvestment to Australia and reinvestment percentage all dropped a lot since 2012. It perhaps a signal that U.S. investors would like to exit Australia market.

  • China, Japan and Singapore are three countries that perhaps will attract most of U.S. investment in the future.

Go Back to Top

Europe

From Graph 6 and 7, we can notice that U.S. investors earned significant invest income from UK. In addition, start from 2012, reinvestment percentage of U.K. increased sharply. Even the “Brexit” happened in 2016, it did not affect this trend. It shows that at least in 2016, U.S. investors still have a optimistic view of U.K.’s economic situation. In contrast, France and Germany only provided barely investment income for their investors. From this point, I conclude that U.K. will attract more investment in the future because the high investment income and reinvestment percentage indicate that more and more U.S. investors are expanding their investment in U.K.

PRI%>%
  filter(Country == "France"|
         Country == "Germany"|
         Country == "United Kingdom")%>%
  ggplot(aes(Year, Amount))+
  geom_smooth(se= TRUE,aes(color=Type))+
  geom_point(aes(color=Type))+
  facet_wrap(~Country, nrow=3)+
  ggtitle("Graph 6: Investment Income V.S. Reinvestment",
          subtitle = "UK is very popular")

PRI%>%
  filter(Country == "France"|
         Country == "Germany"|
         Country == "United Kingdom")%>%
  ggplot(aes(Year, Reinvest_Percent))+
  geom_smooth(aes(color=Country))+
  ggtitle("Graph 7: Reinvestment Percentage Changing Over Time",
          subtitle = "Europe")

Summary

As a Summary, the provided analysis contains a simple view of U.S. investment situation in the world. Investment income indicates the economic situation of the target market. Reinvest percentage demonstrates the confidence of investors. In the other words, would investors like to expand their business in the local market. As the analysis describes, United Kingdom provided the most investment income and highest reinvestment percentage. If “Brexit” won’t affect the economic situation of UK, United Kingdom will be the most ideal market to invest. Singapore, likes UK not only yielded a very high investment income to their investors but also had an increasing reinvestment percentage, is another ideal market for U.S. investors. China has similar investment income with Japan. However, U.S. investors showed more interesting to China since the reinvestment percentage of China is growing while Japan is reducing.