(DI-1802) Appendix A: How to enable prediction

Some Datavard Insights analyses support prediction of future values. Prediction of values can be time consuming task that is always executed in background directly on the system. DataVard Insights solution currently supports prediction calculation using R language via OpenCPU server HTTP API (https://www.opencpu.org/).
OpenCPU server can be installed on premise or can be accessed externally if security restrictions allow that. To install OpenCPU server please refer to OpenCPU installation guide. Recommended version of OpenCPU server should be always used.

Required R library packages

Insights solution uses custom prediction R script to predict time series data. For correct execution of script following R library packages must be available on OpenCPU server:

  • datasets
  • forecast
  • graphics
  • grDevices
  • methods
  • Rserve
  • stats
  • timeDate
  • utils
  • zoo

Turning prediction ON

Insights analyses use prediction functionality automatically when available. The availability is determined by presence of valid OpenCPU server URL in DataVard Reuse Library settings on central system. To change the URL to OpenCPU server user should execute program "/DVD/RL_R_SETTINGS". Setting "OpenCPU server URI" can be changed by clicking on "Edit" button. 


Specified value should look like: http://192.168.48.205:8886
User should test accessibility and presence of required R library packages by testing OpenCPU server URL concatenated with "/ocpu/library/" path using standard report "RSWF_TEST_HTTP". HTTP test should end with status_code 200 and required library packages should be present in returned list.