Skip to content

Instantly share code, notes, and snippets.

@charliejhadley
Created April 14, 2022 15:13
Show Gist options
  • Save charliejhadley/b2bc9af0853779093f1ce7308687ef48 to your computer and use it in GitHub Desktop.
Save charliejhadley/b2bc9af0853779093f1ce7308687ef48 to your computer and use it in GitHub Desktop.
rin3-assignment_week-6.R
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