Created
April 14, 2022 15:13
-
-
Save charliejhadley/b2bc9af0853779093f1ce7308687ef48 to your computer and use it in GitHub Desktop.
rin3-assignment_week-6.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(WDI) | |
countries_df <- tribble( | |
~country.name, ~country.code, ~continent, | |
"United States", "US", "Americas", | |
"United Kingdom", "GB", "Europe", | |
"France", "FR", "Europe", | |
"Germany", "DE", "Europe", | |
"Canada", "CA", "Americas", | |
"Saudi Arabai", "SA", "Asia", | |
"Egypt", "EG", "Africa", | |
"Estonia", "EE", "Europe", | |
"New Zealand", "ZA", "Oceania", | |
"Australia", "AU", "Oceania", | |
"China", "CN", "Asia", | |
"Signapore", "SG", "Asia", | |
"Spain", "ES", "Europe", | |
"Japan", "JO", "Asia" | |
) | |
wdi_indicators <- c("percent_pop_using_internet" = "IT.NET.USER.ZS", | |
"gdp_per_cap" = "NY.GDP.PCAP.KD") | |
WDI(countries_df$country.code, | |
indicator = wdi_indicators) %>% | |
as_tibble() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment