1. Learn
  2. /
  3. Courses
  4. /
  5. Visualizing Big Data with Trelliscope in R

Exercise

Cognostics from nested data frames

Let's compute the average close price, average volume, and annual return as cognostics. The variables that these are based on, open, close, and volume, are inside the nested data frame data in our by_symbol dataset.

Note that a function, annual_return(), has been provided for convenience.

Instructions

100 XP
  • Use map() to compute over every nested data frame of data.
  • Inside the map function, create a summary data frame containing the average close price, the average volume, and the annual percentage return. Take a look at by_symbol$data[[1]] to recall the column names that are available.