The code in this repository is used to assist with administration of the Scottish Public Sector shinyapps.io account (scotland.shinyapps.io).
-
You must be a member of the
scotlandshinyapps.io account. -
You must have registered the
scotlandaccount in RStudio using an account token and secret. This can be done using the following code:rsconnect::setAccountInfo( name = "scotland", token = "", secret = "" ) -
You must have access to the
AdministrationShinyappsADM database used to store the data. -
You must have access to the Microsoft Form used to collect contact data.
There are three sources of data:
-
App data from the shinyapps.io server
A snapshot of this data is taken in script 1 and written to ADM in the table
server_apps. -
Contact data collected via a Microsoft Form
A snapshot of this data is taken in script 2 and written to ADM in the table
contacts_new. -
Historic contact data collected via a Google form
This data is stored in the ADM table
contacts_old.
Scripts 3 and 4 use these data sources to produce an analysis table, stored in ADM as analysis.
-
Create
config.ymlfile.This file isn't tracked by git, however the expected format can be seen in
config-example.yml. -
Run the scripts in the
scripts/folder one by one in their numbered order.
These are stored in the outputs/ folder.
- An Excel spreadsheet containing all available data, split by organisation.
Any additional analysis should be carried out using the analysis table on ADM.
The functions defined in the R/ folder are used to form an R package, shinyadmin.
This repository is maintained by the Data Innovation team.
Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation.
The documentation is © Crown copyright and available under the terms of the Open Government 3.0 licence.