parse_summary_data: Parse IShares list

Description Usage Arguments Value

View source: R/IShares-class.R

Description

parses the raw JSON data (usually returned as nested lists) into a clean dataframe of character data. We decided to return character data to avoid data type issues during the parsing. When the JSON data is downloaded using as = "parsed", the parsing is done using the functions in the https://tidyr.tidyverse.org/index.html package

Usage

1
parse_summary_data(res_parsed, tickers_to_keep)

Arguments

res_parsed

a list returned by the httr::content function. The list has the following attributes:

  • code

  • message

  • status

  • code

The most important attribute is data which contains the actual IShares data. In particular, it's a list with the following attributes:

  • tableData a list with two attributes: columns and data. The first one store the column names and the second the actual data

  • config.

tickers_to_keep

character vector containing the tickers to keep. One might want to keep just a subset of tickers due to storage constraints

Value

a dataframe of characters. Each row containd summary data for one etf


skiamu/ETF documentation built on April 28, 2020, 6:08 a.m.