Created by Gregor de Cillia,
Alexander Kowarik and
Bernhard Meindl
from the methodology unit of Statistics Austria
Statistics Austria is currently working towards the release of a new website. An important part of it, namely graphs and tables, will be created using R
Content creators will create graphs and tables via a shiny app and transfer them to the content management system (CMS). The transfer uses a plumber REST API under the hood
Parts of the presentation
The components that can be delivered by the pipeline are graphs and tables
Both the graphs and tables are interactive in the sense that they provide hover and/or click events
Graphs are generated with highcharts.js and the corresponding R package highcharter
Tables are created using datatables.js which provides features like sorting, searching and more
The component builder app is a shiny application which is hosted on RStudio Connect. It guides the content creator through the component generation process
In order to make the graphs and tables available for the CMS, a REST API is used. The app exports the components to a database and the CMS imports the components
When a user exports a graph or table, the app performs a /POST request against the component API
The component is submitted as a binary object in the request body and added to a BLOB field in the component database
The database also captures metadata about the component such as the author and a timestamp
httr::GET("rsconnect.local/component-api")
Each row represents a graph, a table or both. Notice the NULL values in the last two rows
The columns Creator and Data Source reference the user and dataset behind a component
Frameworks
Front End
Back End
Currently, the package STATcubeR is available on github. It will be released to CRAN when the STATcube REST API becomes available for external users
The internal packages STATgraph and STATtable, which create graphs and tables based on the STATcubeR data interface, might become open-source once the pipeline is fully integrated in the CMS workflow
Thank you very much for your attention
Created by Gregor de Cillia, Alexander Kowarik and Bernhard Meindl