Setup

Administrative info:

  • Section & group number:
  • My partner:
  • My partner’s question about how they use their time:

Instructions

This activity involves the following three key steps:

  1. Collect data:
    1. Identify a question about how you use your time that you feel comfortable sharing with your partner and the instructor. Feel free to make up data.
    2. Start logging time in an electronic calendar app like Google Calendar, macOS Calendar, or Outlook. If you already use a calendar app, we suggest you create a new calendar dedicated to this activity. That way your pre-existing calendar’s will be kept private.
  2. Exchange data and analyze your partner’s data:
    1. Export your calendar to an .ics file.
    2. Exchange your question and .ics data with your partner.
    3. Import your partner’s calendar data into R
  3. Write a 500 word joint reflection piece on this experience, keeping the Compromised Shoe Situation episode of the “Not So Standard Deviations” podcast in mind. I suggest you write it in Google Docs and then export to PDF. Address in particular:
    1. What difficulties in the data collection & analysis process did you encounter?
    2. As someone who provides data, what expectations do you have when you give your data?
    3. As someone who analyzes others’ data, what ethical responsibilities do you have?

You will inevitably encounter different types of problems during Steps 1 and 2 above. We therefore recommend you iterate through Steps 1 and 2 in their entirety early and often. That way you can identify and address any problems early on. For a full demonstration of Steps 1 and 2, watch this 6m56s YouTube screencast.

Importing the calendar

Here is the code you’ll need to import your Google Calendar data into R:

Make sure your data looks good by looking at the raw values:

date activity duration hours
2019-09-02 sleep 480 8.0
2019-09-02 study 60 1.0
2019-09-03 exercise 60 1.0
2019-09-04 sleep 960 16.0
2019-09-04 study 180 3.0
2019-09-05 sleep 540 9.0
2019-09-06 exercise 30 0.5
2019-09-06 study 90 1.5

Using glimpse() from the dplyr package gives you an alternative look at your data. It also gives you the type of data each column is: <dttm> being date-time, <chr> being character (i.e. text), and <dbl> being double i.e. decimal numerical values.

## Rows: 8
## Columns: 4
## Groups: date [5]
## $ date     <dttm> 2019-09-02, 2019-09-02, 2019-09-03, 2019-09-04, 2019-09-04,…
## $ activity <chr> "sleep", "study", "exercise", "sleep", "study", "sleep", "ex…
## $ duration <dbl> 480, 60, 60, 960, 180, 540, 30, 90
## $ hours    <dbl> 8.0, 1.0, 1.0, 16.0, 3.0, 9.0, 0.5, 1.5

Use RStudio’s spreadsheet viewer. Note by setting eval=FALSE in this code chunk, R Markdown will not “evaluate” this code chunk and ignore it.