1. Start with your repo for this assignment
    • located at organization for this class
    • name contains HW 4 and your name

Clone this repo in your local directory on gort. (Remember, the address is

  1. Edit the to include some relevant information about the repository, commit, and push. (This is just to check everything is working fine, and you know what you’re doing.)

  2. Open a new R Markdown file, name it the same name as your repository, and save it.

  3. Include answers to all exercises in your R Markdown file. Your answers should always include any summary and/or plot you use to answer that particular question.


Part 1: Harvest data

Use the rvest package to grab data (at a minimum) from the last fieve seasons of the Duke basketball team. Starter code at We’ll start with the starter code in class for the 2014-2015 season. The data for this season is at


  • Do it for one season first, then think about automating it over the other seasons (i.e. pages).
  • Note that you will need to add an additional field to what is on the HTML table that identifies the season.

Part 2: Create an interactive visualization of the data

Use the shiny package to create an interactive visualization of these data. Minimum requirements are drop down menus to choose variables.

Other helpful packages

Other helpful packages are ggplot2 and dplyr as usual, as well as stringr and lubridate. You can, of course, use any pakcages that you want, but these might be sufficient.