Load packages
library(tidyverse)
library(broom)
library(mosaic)
library(sjmisc)
library(readr)
library(dplyr)
library(ggplot2)
library(tibble)
Read in CSV file
WorldDevelopment<- read_csv("C:/Users/Papa/Desktop/Soc 712 -R/World_Bank_data.csv", col_names = TRUE)
print(WorldDevelopment)
## # A tibble: 215 x 17
## FIPS `Name of Area` `Qualifying Name` `Individual Country`
## <chr> <chr> <chr> <chr>
## 1 Geo_FIPS Geo_NAME Geo_QNAME Geo_INDCOUNTRY
## 2 ABW Aruba Aruba ABW
## 3 AFG Afghanistan Afghanistan AFG
## 4 AGO Angola Angola AGO
## 5 ALB Albania Albania ALB
## 6 AND Andorra Andorra AND
## 7 ARE United Arab Emirates United Arab Emirates ARE
## 8 ARG Argentina Argentina ARG
## 9 ARM Armenia Armenia ARM
## 10 ASM American Samoa American Samoa ASM
## # ... with 205 more rows, and 13 more variables: `Total Population` <chr>,
## # `Total Population_1` <chr>, `Total Population: Under 14 Years` <chr>,
## # `Total Population: 15 to 64 Years` <chr>, `Total Population: 65 Years
## # and Over` <chr>, `Gross Domestic Product (Current US$ in
## # Millions)` <chr>, `Gross Domestic Product per Capita (Current
## # US$)` <chr>, `Gross Domestic Product (Annual % Growth)` <chr>, `Gross
## # Domestic Product per Capita (Annual % Growth)` <chr>, `Ease of Doing
## # Business Index` <chr>, `Days Required to Register a Business` <chr>,
## # `Start-Up Procedures to Register a Business` <chr>, `Cost of Business
## # Start-Up Procedures (% of GNI per Capita)` <chr>
Rename and Select variables
WorldDevelopment2 <- rename(WorldDevelopment, "Country"="Name of Area", "Popul"="Total Population","GDP"="Gross Domestic Product per Capita (Current US$)", "GDP per Capita Growth"="Gross Domestic Product per Capita (Annual % Growth)","Ease of Doing Business"="Ease of Doing Business Index")
WorldDevelopment3 <-select (WorldDevelopment2, "Country", "Popul", "GDP", "GDP per Capita Growth", "Ease of Doing Business")
print(WorldDevelopment3)
## # A tibble: 215 x 5
## Country Popul GDP `GDP per Capita Growth`
## <chr> <chr> <chr> <chr>
## 1 Geo_NAME SE_T001_001 SE_T029_002 SE_T500_002
## 2 Aruba 103889 <NA> <NA>
## 3 Afghanistan 32526562 590.2695154 -1.286167206
## 4 Angola 25021974 4102.11859 -0.272482604
## 5 Albania 2889167 3965.016806 2.719280069
## 6 Andorra 70473 <NA> <NA>
## 7 United Arab Emirates 9156963 40438.37636 2.384617746
## 8 Argentina 43416755 <NA> <NA>
## 9 Armenia 3017712 3499.804218 2.605504436
## 10 American Samoa 55538 <NA> <NA>
## # ... with 205 more rows, and 1 more variables: `Ease of Doing
## # Business` <chr>
dim(WorldDevelopment3)
## [1] 215 5
Graph
ggplot(data = WorldDevelopment3) + geom_col(aes(x=Country, y= GDP), fill = "green") + labs(x="Country",y="GDP", title="Countries with highest GDP's")
