The present analysis used the datasets below, in order to show the geographic influence on economy and vice-versa, as a content of this class.
The investment_annual_summary dataset provides a summary
of the dollars in millions provided to each region for each fiscal year,
from 2012 to 2018.
# Print Investment Annuary Summary data
investment_annual_summary
## # A tibble: 42 × 3
## fiscal_year region dollars_in_millions
## <dbl> <fct> <dbl>
## 1 2012 East Asia and the Pacific 2548
## 2 2012 Europe and Central Asia 2915
## 3 2012 Latin America and the Caribbean 3680
## 4 2012 Middle East and North Africa 2210
## 5 2012 South Asia 1312
## 6 2012 Sub-Saharan Africa 2733
## 7 2013 East Asia and the Pacific 2873
## 8 2013 Europe and Central Asia 3261
## 9 2013 Latin America and the Caribbean 4822
## 10 2013 Middle East and North Africa 2038
## # ℹ 32 more rows
# Total investment by year
investment_byYear <- investment_annual_summary %>%
group_by(fiscal_year) %>%
mutate(dollars_in_billions = sum(dollars_in_millions)/1000) %>%
summarise(sum(dollars_in_billions)) %>%
mutate(dollars_in_billions = `sum(dollars_in_billions)`)
investment_byYear
## # A tibble: 7 × 3
## fiscal_year `sum(dollars_in_billions)` dollars_in_billions
## <dbl> <dbl> <dbl>
## 1 2012 92.4 92.4
## 2 2013 109. 109.
## 3 2014 103. 103.
## 4 2015 62.0 62.0
## 5 2016 65.4 65.4
## 6 2017 70.6 70.6
## 7 2018 68.2 68.2
#Time series
investment_byYear %>%
ggplot(aes(x = fiscal_year, y = dollars_in_billions)) +
geom_line()
# Total amount of investment
total_investment <- investment_annual_summary %>%
mutate(dollars_in_billions = dollars_in_millions/1000) %>%
summarise(sum(dollars_in_billions)) %>%
mutate(dollars_in_billions = `sum(dollars_in_billions)`)
total_investment
## # A tibble: 1 × 2
## `sum(dollars_in_billions)` dollars_in_billions
## <dbl> <dbl>
## 1 95.1 95.1
#Visualize the data
total_investment %>%
ggplot(aes(x = 1, y = 1, label = paste("TOTAL INVESTMENT: U$ BI", dollars_in_billions))) +
geom_text(size = 8) +
theme_void() +
theme(plot.margin = margin(3, 3, 3, 3))
# Investment per Region
investment_by_region <- investment_annual_summary %>%
mutate(dollars_in_billions = dollars_in_millions/1000) %>%
group_by(region) %>%
summarise(sum(dollars_in_billions)) %>%
mutate(dollars_in_billions = `sum(dollars_in_billions)`)
investment_by_region
## # A tibble: 6 × 3
## region `sum(dollars_in_billions)` dollars_in_billions
## <fct> <dbl> <dbl>
## 1 East Asia and the Pacific 16.5 16.5
## 2 Europe and Central Asia 17.7 17.7
## 3 Latin America and the Caribbean 22.8 22.8
## 4 Middle East and North Africa 9.75 9.75
## 5 South Asia 11.5 11.5
## 6 Sub-Saharan Africa 16.9 16.9
investment_by_region %>%
ggplot(aes(x = region, y = dollars_in_billions, fill = region)) +
geom_col()
# Investment per Year and Region
investment_annual_summary_billions <- investment_annual_summary %>%
mutate(dollars_in_billions = dollars_in_millions/1000)
investment_annual_summary_billions
## # A tibble: 42 × 4
## fiscal_year region dollars_in_millions dollars_in_billions
## <dbl> <fct> <dbl> <dbl>
## 1 2012 East Asia and the Pacific 2548 2.55
## 2 2012 Europe and Central Asia 2915 2.92
## 3 2012 Latin America and the Ca… 3680 3.68
## 4 2012 Middle East and North Af… 2210 2.21
## 5 2012 South Asia 1312 1.31
## 6 2012 Sub-Saharan Africa 2733 2.73
## 7 2013 East Asia and the Pacific 2873 2.87
## 8 2013 Europe and Central Asia 3261 3.26
## 9 2013 Latin America and the Ca… 4822 4.82
## 10 2013 Middle East and North Af… 2038 2.04
## # ℹ 32 more rows
investment_annual_summary_billions %>%
ggplot(aes(x = fiscal_year, y = dollars_in_billions, color = region)) +
geom_line()
The investment_services_projects dataset provides
information about each project from the of the 2012 to 2018 fiscal
years. Information listed includes the project name, company name,
sector, project status and investment amounts.
# Print Investment Annuary Summary data
investment_services_projects
## # A tibble: 1,815 × 13
## date_disclosed country ifc_country_code sector project_name
## <dttm> <chr> <chr> <chr> <chr>
## 1 2018-12-26 00:00:00 Morocco MYC Health and Ed… UPM Maroc
## 2 2018-12-20 00:00:00 Burkina Faso BUR Agribusiness … GWFP SOFITE…
## 3 2018-12-18 00:00:00 Mexico MXC Agribusiness … Biopappel
## 4 2018-12-14 00:00:00 China CHA Financial Ins… JFLC Green …
## 5 2018-12-14 00:00:00 Brazil BRA Funds Vinci Capit…
## 6 2018-12-10 00:00:00 Ethiopia ETH Agribusiness … Habesha
## 7 2018-12-07 00:00:00 Argentina ARG Telecommunica… Telecom Arg…
## 8 2018-12-04 00:00:00 Serbia SRB Infrastructure Belgrade WtE
## 9 2018-12-04 00:00:00 China CHA Health and Ed… Zhangmen Ed…
## 10 2018-12-04 00:00:00 World Region WLD Funds RA Energy II
## # ℹ 1,805 more rows
## # ℹ 8 more variables: project_number <dbl>, company_name <chr>, status <chr>,
## # ifc_investment_for_risk_management_million_usd <dbl>,
## # ifc_investment_for_guarantee_million_usd <dbl>,
## # ifc_investment_for_loan_million_usd <dbl>,
## # ifc_investment_for_equity_million_usd <dbl>,
## # total_ifc_investment_as_approved_by_board_million_usd <dbl>