This is the code used to produce the Locality Profiles.
-
The code for Locality Profiles can be found on GitHub at Public-Health-Scotland/list-localities-profiles. The latest version, which is mostly tested, will be on the
mainbranch. The specific code used in each release can be found by checking the releases section. -
The code for HSCP Profiles is available in the forked repository Public-Health-Scotland/list-hscp-profiles. This repository is maintained as a fork, allowing any relevant changes made to the Locality Profiles to be synchronised.
-
Code for 'custom profiles', which are defined at boundaries other than Locality, is currently maintained on branches within the Locality Profiles repo. A few draft Pull Requests are kept open to facilitate easy reference.
-
Both input and output data can be located on the stats drive at:
\\stats\LIST_analytics\West Hub\02 - Scaled Up Work\RMarkdown\Locality Profiles\-
Each chapter has its folder used to save input data before a release. The folders include:
Demographics,General Health,Households,Lifestyle & Risk Factors,Services, andUnscheduled Care. -
The
Master RMarkdown Document & Render Code\Outputfolder is designated for saving all outputs. -
The
Final Profilesfolder (and its subdirectories) is used to store completed profiles and related files that are ready for access by LIST colleagues.
-
Here are some important files and scripts to be aware of:
-
Master RMarkdown Document & Render Code/Global Script.R: This script loads the necessary packages and declares custom functions. It is sourced by most other scripts. -
Master RMarkdown Document & Render Code/Locality Profiles Render Code.R: This script runs the analyses and generates the indicators, as well as creates the main profile and summary table outputs. It is the simplest and most effective way to produce the profiles. -
Master RMarkdown Document & Render Code/Locality_Profiles_Master_Markdown.Rmd: This is the primary RMarkdown file that contains all the content for the profiles, excluding the summary table, which is generated separately.- Note that there are corresponding RMarkdown documents for each chapter. The contents of each 'testing markdown' should mirror the relevant content in the main RMarkdown file exactly. These documents, such as
Demographics/Demographics-Testing-Markdown.Rmd, are useful for quickly testing changes to an individual chapter.
- Note that there are corresponding RMarkdown documents for each chapter. The contents of each 'testing markdown' should mirror the relevant content in the main RMarkdown file exactly. These documents, such as
-
Summary Table/Summary-Table-Markdown.Rmd: This script generates the Summary Table, which is produced separately because it is in landscape orientation, while the rest of the profiles are in portrait orientation. -
Master RMarkdown Document & Render Code/make_sdc_output.R: This script creates the Statistical Disclosure Control (SDC) Excel workbooks. -
Master RMarkdown Document & Render Code/excel_output.R: This script generates the background data Excel workbooks.
Thanks goes to these wonderful people (emoji key):
Andrew-Saul 🐛 |
Clive Greatorex 💻 👀 |
Craig Fraser 💻 👀 📆 |
James McMahon 💻 👀 📆 |
Josie Steele 💻 👀 |
Kennedy Owusu-Afriyie 👀 |
Khansa Hussain 💻 👀 |
RyanDuffy01 💻 👀 |
Theresa Campbell 💻 👀 |
robbiemac01 🐛 |
This project follows the all-contributors specification. Contributions of any kind welcome!