The R statistical computing language provides users with powerful analytic tools, and Intrinio now supports an R SDK for data access. The SDK makes data visualization easy using recursive flattening to make populating data frames possible directly from the API response.

Most of our other supported SDKs return a response object with JSON formatting which complicates tabulation. The hierarchical structure of the response makes using the data simple for programmers but is not conducive to visualization without modification. The R SDK simplifies this process by expanding out the hierarchical structure to each sub item in the response in a process called flattening, then this operation is performed recursively until there are no subitems. The modified return object provides you with two ways of displaying the data in RStudio. 

Direct in RStudio Console

The line below will display the response object in the studio console, which makes error checking more streamlined.

print(response$content$stock_prices_data_frame)

Using the built-in data frame provided by RStudio

For a more full visualization, navigate to the environment variables window.


Dig into the response object, which should open a new tab in the main window.


Expand the Content section of the response and click the scroll icon to the right of the response type name (in this sample, it's stock_prices_dataframe).


The data frame will display in the main window in a new tab as shown.

The API response object is functionally similar to that of any of our other supported SDKs in that it is easy to programmatically personalize. The flattened response object just simplifies basic visualization steps.


Did this answer your question?