The World Bank Data

The Word Bank Open Trade and Competitiveness Data indicators by topic Load the required packages library(pacman) p_load(data360r, widgetframe, plotly, tidyverse, tidyselect) Data is from Worldwide Governance Indicators: here dataset_id = 51 The WGI measure six broad dimensions of governance: Voice and Accountability (VA) – capturing perceptions of the extent to which a country’s citizens are able to participate in selecting their government, as well as freedom of expression, freedom of association, and a free media.

Carbon Emissions Data from the US Energy Information Administration

The US Energy Information Administration (EIA) has lots of data and information on carbon emissions. Load the R packages # install.packages('pacman') #uncomment if don't already have library(pacman) # package manager p_load(eia, hrbrthemes, tidyverse) key <- eia_get_key() eia package For background and examples using the eia package go here. Follow link on that page to get an API key. Put the API key in the variable my_eia_api_key in the .

Use purrr::pmap to Combine Spreadsheets

library('pacman') p_load(tidyverse, readxl, purrr) # download xlsx files from moodle put in List file <- list.files(pattern = "*.xlsx") # columns (course, group) to add to each spreadsheet course <- c("fa-18-IntAcctA", "fa-18-IntAcctA", "fa-18-AdvAcct") group <- c("12PM", "2PM", "4PM") files_in <- function(file, course, group){ file %>% read_xlsx() %>% select(firstname = `First name`, lastname = `Last name`, username = `ID number`, email = `Email address`) %>% mutate(course1 = course, group1 = group) %>% select(firstname, lastname, username, course1, group1, email) } l <- list(file, course, group ) pmap_dfr(l, files_in) %>% write_csv("enroll-fa18.