Skip to content

Public-Health-Scotland/Mental-Health-Inpatient-Activity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

In this folder you can find the R code that was used to produce the Data explorer for PHS’s publication on Mental Health Inpatient Activity.

The data explorer and the base files that were used to create it can be accessed via the following link (see the 'Data explorer' and 'Open Data and Data Files' sections): https://www.publichealthscotland.scot/publications/mental-health-inpatient-activity/

To create the explorer, download the files contained in this repo to your working directory (or folder containing the RProject you have set up for this project). Then create a new folder in your working directory called 'data' (all lower-case) and place all the base files from the 'Open Data and Data Files' section in it. That should be it, you're good to go! Open the app.R in RStudio and, in the source window where the file is now displayed, press the "Run App" button with the green triangle to the left of it.

The glossary links will not work but if you would like it to work all you need to do is create a folder called 'www' in your working directory and place a pdf version of the glossary from this publication in there, making sure to name it 'MHIA Glossary.pdf'.