Week 5 Overview

Published

2025-05-09

This wraps up the content for week 4. Now we require some practice! You should head back to our Moodle site to check out your assessment for this week.

This week we’ll see how we can use the tidyr package to change the format of a dataset (long to wide), see how we can connect R to a database, learn about SQL style joins, and then finish up with the difficult topic of querying APIs!

Week 5 Additional Readings/Learning Materials

Reading Data

SQL Joins

Week 5 Learning Objectives

Upon completion of this week, students will be able to: (CO is the corresponding course learning objective this helps build toward)

Other ways to connect R to data

  1. explain the general process of connecting R to a database, connect R to a database, and request data (CO 2)

    1. define the term SQL and RDBMS
    2. compare terminology between statistics and SQL (tables vs data sets, etc.)
    3. extract SQL code from dplyr commands
    4. write very basic SQL code to select and merge data
    5. describe why the collect function is required when using R to query a database
    6. determine the appropriate type of join to extract information of interest from given tables
  2. query APIs to return appropriate data (CO 2)

    1. define the term API
    2. explain the common syntax often used for APIs

Other Data Manipulations

  1. utilize the tidyr package to manipulate data (CO 2)
a. change data between wide to long formats
b. split or combine columns using the tidyr package

Use the table of contents on the left or the arrows at the bottom of this page to navigate to the next learning material!