~just a sample, trial post~

library(readr)
library(tidyverse)
library(knitr)

investment_annual_summary <- read_csv("https://assets.datacamp.com/production/repositories/5756/datasets/d0251f26117bbcf0ea96ac276555b9003f4f7372/investment_annual_summary.csv")

investment_services_projects <- read_csv("https://assets.datacamp.com/production/repositories/5756/datasets/78b002735b6f620df7f2767e63b76aaca317bf8d/investment_services_projects.csv")

investment_region_summary <- read_csv("https://assets.datacamp.com/production/repositories/5756/datasets/52f5414f6504e0503e86eb1043afa9b3d157fab2/investment_region_summary.csv")

Dataset

investment_annual_summary

Variables

names(investment_annual_summary)
## [1] "fiscal_year"         "region"              "dollars_in_millions"
names(investment_services_projects)
##  [1] "date_disclosed"                                       
##  [2] "country"                                              
##  [3] "ifc_country_code"                                     
##  [4] "sector"                                               
##  [5] "project_name"                                         
##  [6] "project_number"                                       
##  [7] "company_name"                                         
##  [8] "status"                                               
##  [9] "ifc_investment_for_risk_management_million_usd"       
## [10] "ifc_investment_for_guarantee_million_usd"             
## [11] "ifc_investment_for_loan_million_usd"                  
## [12] "ifc_investment_for_equity_million_usd"                
## [13] "total_ifc_investment_as_approved_by_board_million_usd"

Dominican Republic data

country_investment_projects <- investment_services_projects %>%
  filter(country == params$country) 

Investment Projects in Dominican Republic in 2018

country_investment_projects_2018 <- investment_services_projects %>%
  filter(country == params$country,
         date_disclosed >= "2017-07-01",
         date_disclosed <= "2018-06-30") 


country_investment_projects_2018_total <- country_investment_projects_2018 %>%
  summarize(sum_total_investment = sum(total_ifc_investment_as_approved_by_board_million_usd, na.rm = T)) 

The total investment amount for all projects in Dominican Republic in the 2018 fiscal year was 45.5 million dollars.

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.

by region

ggplot(investment_annual_summary, aes(fiscal_year, dollars_in_millions, color = region)) +
  geom_line() +
  labs(
    title = "Investment Annual Summary",
    x = "Fiscal Year",
    y = "Dollars in Millions"
  )
Figure 1.1 The Investment Annual Summary for each region for 2012 to 2018

Figure 1.1 The Investment Annual Summary for each region for 2012 to 2018

The investment_services_projects dataset provides information about each investment project from 2012 to 2018. Information listed includes the project name, company name, sector, project status, and investment amounts.

  • Regions
    1. East Asia and the Pacific
    2. Europe and Central Asia
    • Latin America and the Caribbean
    • Middle East and North Africa
    • South Asia
    • Sub-Saharan Africa
kable(investment_region_summary, col.names = c('Region', 'Dollars in Millions'), align = 'cc', caption = "Table 1.1 The total investment summary for each region for the 2012 to 2018 fiscal years.")
Table 1.1 The total investment summary for each region for the 2012 to 2018 fiscal years.
Region Dollars in Millions
East Asia and the Pacific 16465
Europe and Central Asia 17659
Latin America and the Caribbean 22828
Middle East and North Africa 9755
South Asia 11459
Sub-Saharan Africa 16892