Dashboard for weekly COVID-19 publication
Since the start of the COVID-19 outbreak Public Health Scotland (PHS) has been working closely with Scottish Government and health and care colleagues in supporting the surveillance and monitoring of COVID-19 amongst the population.
Each week, a statistical report covering COVID-19 in Scotland is published. This report can be found here.
This GitHub repository contains the R project for the accompanying interactive shiny dashboard.
- The necessary data will be assembled in the weekly report data folder each week on a Monday/Tuesday
- Copy the data to /conf/C19_Test_and_Protect/Test & Protect - Warehouse/Weekly Dashboard Data/Input/
- Check you have the latest (or appropriate) version of this repository
- Run dashboard data transfer by sourcing the script and interacting with R Studio as necessary to select the correct files
- Obtain uncommitted files from colleagues
shiny_app/www/google-analytics.html
andshiny_app/AppDeployment.R
- Update paths in
AppDeployment.R
so that they match where your dashboard copy is located - Run
app_data_preparation.R
to transfer the processed data to yourshiny_app/data
folder as .rds files - Go to
global.R
and change the report date to this week's report date - Run
global.R
and check through the app
- Go to
AppDeployment.R
and run file (run first section only for PRA deployment)
app_data_preparation.R
is a script for copying .csv files from shared filepath to localshiny_app/data/
folderDashboard Data Transfer
contains the files for processing data for the app. The process is orchestrated fromdashboard_data_transfer.R
, which successively runs the scripts insideDashboard Data Transfer/Transfer scripts
.shiny_app
contains the code for the app.ui.R
,server.R
andglobal.R
are the primary app scriptswww
contains the css stylesheet and PHS logo and faviconfunctions
contains functions for the appfunctions_tables.R
contains functions for tablesfunctions_chart_layout.R
contains functions for organising charts and titlesfunctions_server.R
contains other functions including those for graphs
tabs
contains R files with content for each of the tabs