PA 5.2: Jewel Heist

Dates and Times with lubridate

Download starter qmd file

library(tidyverse)

Solve the Mystery

Just down the road in Montecito, CA several rare jewels went missing. The jewels were stolen and replaced with fakes, but detectives have not been able to solve the case. They are now calling in a data scientist to help parse their clues.

A camera was located near the building where the jewels went missing, so the detectives have provided you with a list of people who may have entered the building. This list includes the date and time they were spotted on the camera, in Pacific Standard Time (PST).

Unfortunately, the date and time of the jewel heist is not known. You have been hired to crack the case. Use the clues below to discover the thief’s identity.

# 214 total suspects
suspects <- read_csv("https://raw.githubusercontent.com/zoerehnberg/STAT331-S23/main/practice_activities/suspects.csv")
Note

Time Zones will be very important to find the right suspect!

  1. When data is read into R, dates are automatically read in as the UTC time zone. The first thing that we need to do is tell R that the times listed are actually in PST. Fill in the code below to do this.
suspects <- suspects |> 
  mutate(Time.Spotted = )
Error in quo_as_label(quo): argument "expr" is missing, with no default
  1. Based on the cleaning schedule for the room where the jewels are held, the heist was not committed in the morning (i.e. at 12:00pm PCT or later).
# end with 112 suspects left
  1. The room where the heist was committed is closed on Tuesdays and Thursdays (and there were no signs of forced entry), so the heist did not happen on those days.
# end with 78 suspects left
  1. It is believed that the heist was committed within 5 weeks (35 days) of Thanksgiving 2022 (before or after).
Hints

Pay attention to time zones!

You will want to look up the date of Thanksgiving 2022.

I would recommend using an interval

# end with 11 suspects left
  1. The detectives partially decoded a message from the thief to a notorious fence in Iceland. In it, the thief said the job would be done “after the sun sets for you, but before midnight.”
Hints

In November, the sun sets at 4:00pm in Iceland.

Pay attention to time zones!

# end with 4 suspects left
  1. The thief left behind a receipt at the scene of the crime. The receipt is smudged, but the day of the month is shown to be 22. It is thought that the heist took place no more than three days after the receipt was issued.
# end with 2 suspects left
  1. The thief is amused by your efforts and has sent you a cryptic clue:

“The exact number of seconds between midnight on Jan 1, 1970 and the time I arrived on the scene is divisible by 6.”

Hint

Check out how date-time objects are stored on the lubridate cheatsheet.

# end with 1 suspect left
Canvas Quiz Submission

Who is the thief? Only one name should remain. Remember that you can check with classmates and me about the answer!