Session Ready
Exercise

Expanding your data

Now that you have a handle on time series workflow, you're ready to assess the hypothesis that flight delays are a function of visibility and wind.

In this exercise, you'll add a few more columns to your xts object by merging data on monthly average visibility (vis) and wind speeds (wind) in the Boston area from 2010 through 2015. These data are derived from the same source as your temperature data, but have already been manipulated and converted to xts to make your job easier.

This is similar to what you've done before, but this time you have less prewritten code to work with. Your working xts object, flights_temps, is also available in your workspace.

Instructions
100 XP
  • Your first task, as always, is to confirm the periodicity and duration of your vis and wind data by using two calls to periodicity().
  • Once you have confirmed that the vis and wind data have the same periodicity and duration as your existing data, use merge() to combine all three objects into a single xts object: flights_weather. To keep things consistent, merge your data in the following order: flights_temps, vis, wind.
  • Use head() to view the first few rows of flights_weather and ensure your merge was successful.