TimeSeries.OBeu Εstimate and return the necessary parameters for time series visualizations, used in OpenBudgets.eu. It includes functions to test stationarity (with ACF, PACF, Phillips Perron test, Augmented Dickey Fuller (ADF) test, Kwiatkowski-Phillips-Schmidt-Shin (KPSS) test, Mann Kendall Test For Monotonic Trend and Cox and Stuart trend test), decompose, model and forecast Budget time series data of municipalities across Europe, according to the OpenBudgets.eu data model. This package can generally be used to extract visualization parameters convert them to JSON format and use them as input in a different graphical interface. Most functions can have general use out of the OpenBudgets.eu data model. You can see detailed information here. # install TimeSeries.OBeu- cran stable version install.packages (TimeSeries.OBeu) # or # alternatively install the development version from github devtools :: install_github "okgreece/TimeSeries.OBeu" ) Load library TimeSeries.OBeu library (TimeSeries.OBeu)

Time Series analysis in a call ts.analysis is used to estimate autocorrelation and partial autocorrelation of input time series data, autocorrelation and partial autocorrelation of the model residuals, trend, seasonal (if exists) and remainder components, model parameters such as arima order, arima coefficients etc. and the desired forecasts with their corresponding confidence intervals. ts.analysis returns by default a json object, if tojson parameter is FALSE returns a list object and the default forecast step is set to 1. results = ts.analysis prediction.steps = 2 , tojson= TRUE ) # json string format jsonlite :: prettify # use prettify of jsonlite library to add indentation to the returned JSON string ## { ## "acf.param": { ## "acf.parameters": { ## "acf": [ ## 1, ## 0.5302, ## 0.2018, ## -0.1397, ## -0.4059, ## -0.3556, ## -0.3939, ## -0.073, ## 0.071, ## 0.0676, ## 0.0285 ## ], ## "acf.lag": [ ## 0, ## 1, ## 2, ## 3, ## 4, ## 5, ## 6, ## 7, ## 8, ## 9, ## 10 ## ], ## "confidence.interval.up": [ ## 0.5658 ## ], ## "confidence.interval.low": [ ## -0.5658 ## ] ## }, ## "pacf.parameters": { ## "pacf": [ ## 0.5302, ## -0.1102, ## -0.2817, ## -0.2903, ## 0.0427, ## -0.2781, ## 0.2318, ## -0.1163, ## -0.1829, ## -0.209 ## ], ## "pacf.lag": [ ## 1, ## 2, ## 3, ## 4, ## 5, ## 6, ## 7, ## 8, ## 9, ## 10 ## ], ## "confidence.interval.up": [ ## 0.5658 ## ], ## "confidence.interval.low": [ ## -0.5658 ## ] ## }, ## "acf.residuals.parameters": { ## "acf.residuals": [ ## 1, ## 0.8646, ## 0.7284, ## 0.6039, ## 0.4589, ## 0.3295, ## 0.154, ## -0.0016, ## -0.1241, ## -0.2595, ## -0.3802, ## -0.5098, ## -0.6276, ## -0.5885, ## -0.5207, ## -0.4629 ## ], ## "acf.residuals.lag": [ ## 0, ## 1, ## 2, ## 3, ## 4, ## 5, ## 6, ## 7, ## 8, ## 9, ## 10, ## 11, ## 12, ## 13, ## 14, ## 15 ## ], ## "confidence.interval.up": [ ## 0.5658 ## ], ## "confidence.interval.low": [ ## -0.5658 ## ] ## }, ## "pacf.residuals.parameters": { ## "pacf.residuals": [ ## 0.8646, ## -0.0756, ## -0.0325, ## -0.1597, ## -0.0335, ## -0.2937, ## -0.0528, ## -0.046, ## -0.162, ## -0.1372, ## -0.2201, ## -0.2078, ## 0.4336, ## 0.1187, ## -0.0519 ## ], ## "pacf.residuals.lag": [ ## 1, ## 2, ## 3, ## 4, ## 5, ## 6, ## 7, ## 8, ## 9, ## 10, ## 11, ## 12, ## 13, ## 14, ## 15 ## ], ## "confidence.interval.up": [ ## 0.5658 ## ], ## "confidence.interval.low": [ ## -0.5658 ## ] ## } ## }, ## "decomposition": { ## "stl.plot": { ## "trend": [ ## 488397393.1418, ## 472512470.2132, ## 473063423.4632, ## 487284165.8361, ## 519914575.4529, ## 549044538.1588, ## 546747322.373, ## 517885722.1941, ## 482561749.3098, ## 453474237.5907, ## 423909078.1086, ## 393617768.8078 ## ], ## "conf.interval.up": [ ## 525849686.6413, ## 495462595.8887, ## 495888427.5844, ## 512171768.3956, ## 545880538.4877, ## 575706534.5367, ## 573409318.7509, ## 543851685.2289, ## 507449351.8693, ## 476299241.7119, ## 446859203.7842, ## 431070062.3073 ## ], ## "conf.interval.low": [ ## 450945099.6423, ## 449562344.5377, ## 450238419.3421, ## 462396563.2766, ## 493948612.4181, ## 522382541.7809, ## 520085325.9951, ## 491919759.1593, ## 457674146.7503, ## 430649233.4695, ## 400958952.4331, ## 356165475.3083 ## ], ## "seasonal": { ## ## }, ## "remainder": [ ## 3494473.6582, ## -6782427.4232, ## -360030.3632, ## -20859217.1961, ## 8715868.0371, ## 20321961.4412, ## -24805255.823, ## 12476896.9759, ## -25628827.4798, ## 18714394.8393, ## -9197723.9686, ## 1891498.0822 ## ], ## "time": [ ## 2004, ## 2005, ## 2006, ## 2007, ## 2008, ## 2009, ## 2010, ## 2011, ## 2012, ## 2013, ## 2014, ## 2015 ## ] ## }, ## "stl.general": { ## "degfr": [ ## 5.4179 ## ], ## "degfr.fitted": [ ## 5.1011 ## ], ## "stl.degree": [ ## 2 ## ] ## }, ## "residuals_fitted": { ## "residuals": [ ## 3494473.6582, ## -6782427.4232, ## -360030.3632, ## -20859217.1961, ## 8715868.0371, ## 20321961.4412, ## -24805255.823, ## 12476896.9759, ## -25628827.4798, ## 18714394.8393, ## -9197723.9686, ## 1891498.0822 ## ], ## "fitted": [ ## 488397393.1418, ## 472512470.2132, ## 473063423.4632, ## 487284165.8361, ## 519914575.4529, ## 549044538.1588, ## 546747322.373, ## 517885722.1941, ## 482561749.3098, ## 453474237.5907, ## 423909078.1086, ## 393617768.8078 ## ], ## "time": [ ## 2004, ## 2005, ## 2006, ## 2007, ## 2008, ## 2009, ## 2010, ## 2011, ## 2012, ## 2013, ## 2014, ## 2015 ## ], ## "line": [ ## 0 ## ] ## }, ## "compare": { ## "resid.variance": [ ## 258964785657684 ## ], ## "used.obs": [ ## 2004, ## 2015, ## 2009.5, ## 2006.75, ## 2012.25 ## ], ## "loglik": [ ## -1.42430632111726e+015 ## ], ## "aic": [ ## 2.84861264223453e+015 ## ], ## "bic": [ ## 2.84861264223453e+015 ## ], ## "gcv": [ ## 789007322850175 ## ] ## } ## }, ## "model.param": { ## "model": { ## "arima.order": [ ## 2, ## 1, ## 0, ## 0, ## 1, ## 1, ## 0 ## ], ## "arima.coef": [ ## -0.2, ## 0.304, ## 0.1684 ## ], ## "arima.coef.se": [ ## 0.5484, ## 0.3034, ## 0.5345 ## ] ## }, ## "residuals_fitted": { ## "residuals": [ ## 491891.5916, ## -24734053.7839, ## 4848198.2411, ## 2291242.5086, ## 58442566.7297, ## 45241384.5452, ## -65806529.4317, ## -2362503.8375, ## -56932278.2406, ## 7600701.1455, ## -33386168.56, ## -29710365.5401 ## ], ## "fitted": [ ## 491399975.2084, ## 490464096.5739, ## 467855194.8589, ## 464133706.1314, ## 470187876.7603, ## 524125115.0548, ## 587748595.9817, ## 532725123.0075, ## 513865200.0706, ## 464587931.2845, ## 448097522.7, ## 425219632.4301 ## ], ## "time": [ ## 2004, ## 2005, ## 2006, ## 2007, ## 2008, ## 2009, ## 2010, ## 2011, ## 2012, ## 2013, ## 2014, ## 2015 ## ], ## "line": [ ## 0 ## ] ## }, ## "compare": { ## "resid.variance": [ ## 1.96694555616403e+015 ## ], ## "variance.coef": [ ## [ ## 0.3007, ## 0.0586, ## -0.2532 ## ], ## [ ## 0.0586, ## 0.0921, ## -0.029 ## ], ## [ ## -0.2532, ## -0.029, ## 0.2857 ## ] ## ], ## "not.used.obs": [ ## 0 ## ], ## "used.obs": [ ## 11 ## ], ## "loglik": [ ## -207.6519 ## ], ## "aic": [ ## 423.3037 ## ], ## "bic": [ ## 424.8953 ## ], ## "aicc": [ ## 429.9704 ## ] ## } ## }, ## "forecasts": { ## "ts.model": [ ## "ARIMA(2,1,1)" ## ], ## "data_year": [ ## 2004, ## 2005, ## 2006, ## 2007, ## 2008, ## 2009, ## 2010, ## 2011, ## 2012, ## 2013, ## 2014, ## 2015 ## ], ## "data": [ ## 491891866.8, ## 465730042.79, ## 472703393.1, ## 466424948.64, ## 528630443.49, ## 569366499.6, ## 521942066.55, ## 530362619.17, ## 456932921.83, ## 472188632.43, ## 414711354.14, ## 395509266.89 ## ], ## "predict_time": [ ## 2016, ## 2017 ## ], ## "predict_values": [ ## 376873927.5331, ## 374763602.0598 ## ], ## "up80": [ ## 433711072.5831, ## 453885516.7986 ## ], ## "low80": [ ## 320036782.483, ## 295641687.3209 ## ], ## "up95": [ ## 463798839.7076, ## 495770128.4028 ## ], ## "low95": [ ## 289949015.3585, ## 253757075.7167 ## ] ## } ## } ## ts.analysis uses internally the functions ts.stationary.test , ts.acf , ts.non.seas.decomp , ts.seasonal.decomp , ts.seasonal.model , ts.non.seas.model and ts.forecast . However, these functions can be used independently and depends on the user requirements (see package manual or vignettes).