Extract and analyze univariate time series data from Open Spending API, using the ts.analysis function.
open_spending.ts(json_data, time, amount,
order = NULL, prediction_steps = 1)The json string, URL or file from Open Spending API
Specify the time label of the json time series data
Specify the amount label of the json time series data
An integer vector of length 3 specifying the order of the Arima model
The number of prediction steps
A json string with the resulted parameters of the ts.analysis
function.
This function extracts the time series data provided by the Open Spending API,
in order to return the results from the ts.analysis function.