Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #328

Merged
merged 11 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Data/3-2_dataText/dataText.xlsx
Binary file not shown.
367,668 changes: 183,834 additions & 183,834 deletions Data/AppData/C_breakdown.csv

Large diffs are not rendered by default.

162 changes: 81 additions & 81 deletions Data/AppData/C_topTenEachBreakdown.csv

Large diffs are not rendered by default.

Binary file modified Data/AppData/CoreIndicators.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion Data/AppData/I_DataText.csv
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Oct 2022-Sep 2023"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Ann
"inemployment","
Oct 2022-Sep 2023"," ","<a href='https://www.nomisweb.co.uk/datasets/apsnew'>Annual Population Survey</a>"," ","<ol>
<li>Employment volumes are for 16-64 year olds.</li>
<li>Industry split volumes are for all ages. </li>
<li>Industry and occupation split volumes are for all ages.</li>
<li>Each estimate from the Annual Population Survey carries a margin of error. These are available in the original data via NOMIS. Large margins of error are usually associated with groups with only a small number of respondents. Therefore, please take caution when interpreting data from small subgroups.</li>
<li>Use caution when interpreting this data. A difference between subgroups does not necessarily imply any causality. There could be other contributing factors at work.</li>
<li>Standard Occupational Classification 2020 (SOC2020).</li>
Expand Down
559 changes: 0 additions & 559 deletions DeveloperGuide/LocalSkillsDeveloperGuide.html

This file was deleted.

495 changes: 495 additions & 0 deletions DeveloperGuide/LocalSkillsDeveloperGuide.md

Large diffs are not rendered by default.

62 changes: 45 additions & 17 deletions DeveloperGuide/LocalSkillsDeveloperGuide.qmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Local skills developer guide"
format: html
format: gfm
editor: visual
toc: true
---
Expand Down Expand Up @@ -114,38 +114,42 @@ You should just be able to skip to stage (3) (Run ExtractLoadData.R) - this pull

This takes about 20 mins. You should see your environment is now populated with data, including your new, updated dataset.

4. We have datasets from a wide range of sources that come in all kinds of formats. We do a lot of data cleaning, manipulating and formatting to get into a format the dashboard can work with. We do this in the TransformData.R script. If your new datset is in the same (or even pretty close) format as the old dataset (as is hopefully the case), you just need run this script:
4. Dashboard admin:

`source("~/RProjects/lsip_dashboard/TransformData.R", echo=TRUE)`
<!-- -->

This takes about 20 mins. You should see your environment is populated with new, clean datasets and your Data/AppData folder has been updated with the updated versions of the files the dashboard uses.
- You need to update the dashboard's Data Sources tab with information about your new data. Open /Data/3-1_DataTable/DataTable.xlsx in Excel. Update the relevant row with new dates, links and information.

5. Dashboard admin:
- Update the dashboard's Version Log. This is done in ui.R under the "2.1.3 Version control" header. Move the current Latest Version text down into the Previous Version area, and repopulate the Current Version with new details.

- You may need to update the Latest Period and/or the data caveats in the /Data/3-2_dataText/dataText.xlsx file as well. These are used to populate dynamic text on the dashboard's Local Skills tab.

```{=html}
<!-- -->
```
a. You need to update the dashboard's Data Sources tab with information about your new data. Open /Data/3-1_DataTable/DataTable.xlsx in Excel. Update the relevant row with new dates, links and information.

b. Update the dashboard's Version Log. This is done in ui.R under the "2.1.3 Version control" header. Move the current Latest Version text down into the Previous Version area, and repopulate the Current Version with new details.
5. We have datasets from a wide range of sources that come in all kinds of formats. We do a lot of data cleaning, manipulating and formatting to get into a format the dashboard can work with. We do this in the TransformData.R script. If your new datset is in the same (or even pretty close) format as the old dataset (as is hopefully the case), you just need run this script:

c. You may need to update the Latest Period and/or the data caveats in the /Data/3-2_dataText/dataText.xlsx file as well. These are used to populate dynamic text on the dashboard's Local Skills tab.
`source("~/RProjects/lsip_dashboard/TransformData.R", echo=TRUE)`

```{=html}
<!-- -->
```
6. Run the dashboard: `runApp()`
This takes about 20 mins. You should see your environment is populated with new, clean datasets and your Data/AppData folder has been updated with the updated versions of the files the dashboard uses.

6. Check any changes to the data used in the dashboard. As a step in the QA run this file and have a look at the outputs:

`source("~/RProjects/lsip_dashboard/checkUpdateChanges.R", echo=TRUE)`

7. QA. Create a new QA log in "Analytical Projects\\Analysis\\S005 LSIP dashboard\\Documentation\\QA". Follow the structure of one already in there. Some checks you may do:
This will show you if there has been any changes to the geography names, the metric names, the time periods and also check for any changes in the NAs within the data (a sign that something has gone awry).

7. Run the dashboard: `runApp()`

8. QA. Create a new QA log in "Analytical Projects\\Analysis\\S005 LSIP dashboard\\Documentation\\QA". Follow the structure of one already in there. Some checks you may do:

- Check that your dataset has been updated correctly (by comparing with the version you branched off of and cross checking with the raw data).
- Check the Data Sources table has been updated correctly
- Check the text in the Local Skills tab makes sense for your updated metric.
- Get sign off Hannah Cox and/or Harris (see [here](https://educationgovuk.sharepoint.com/:w:/r/sites/UnitforFutureSkills/Shared%20Documents/Analytical%20Projects/Analysis/S005%20LSIP%20dashboard/Documentation/Local%20skills%20dashboard%20update%20principles.docx?d=wbd95fecb97144a348a73a34520212d75&csf=1&web=1&e=InX9xM) and [here](https://educationgovuk.sharepoint.com/:w:/r/sites/UnitforFutureSkills/Shared%20Documents/Analytical%20Projects/Analysis/S005%20LSIP%20dashboard/Documentation/QA/QA%20plan_Local%20Skills%20dashboard_UFS.docx?d=wa17c64605c7f4a3fb2b8bf35f4bec670&csf=1&web=1&e=Z66Jas) for process)

8. If everything looks ok, commit, push and merge to Development. Wait for that to deploy (can take 15mins or more - you can track this in [Actions · dfe-analytical-services/lsip_dashboard (github.com)](https://github.com/dfe-analytical-services/lsip_dashboard/actions)). Again check everything looks ok in the preprod environment: <https://department-for-education.shinyapps.io/local-skills-dashboard-preprod/> 13 If you have done sufficient QA and you are satisfied, merge to Main and wait for that to deploy. Check again everything looks ok in the live environment: <https://department-for-education.shinyapps.io/local-skills-dashboard/>
9. If everything looks ok, commit, push and merge to Development. Wait for that to deploy (can take 15mins or more - you can track this in [Actions · dfe-analytical-services/lsip_dashboard (github.com)](https://github.com/dfe-analytical-services/lsip_dashboard/actions)). Again check everything looks ok in the preprod environment: <https://department-for-education.shinyapps.io/local-skills-dashboard-preprod/> 13 If you have done sufficient QA and you are satisfied, merge to Main and wait for that to deploy. Check again everything looks ok in the live environment: <https://department-for-education.shinyapps.io/local-skills-dashboard/>

9. Consider communicating the change to the wider Team or other stakeholders.
10. Consider communicating the change to the wider Team or other stakeholders.

## I want to add a metric to the dashboard

Expand Down Expand Up @@ -270,3 +274,27 @@ We use Google Analytics to see a range of metrics on dashboard users. Log in her
As well as the more generic metrics (users, new users, event clicks, time spent), we have been collecting specific events from the dashboard. You can see the things we monitor in /google-analytics.html. You can add tracking for whatever dashboard event you want and then monitor that event within Google Analytics.

In Google Analytics we have started creating custom reports to collect some interesting data. You can see these (and create these) by clicking the "Explore" tab in the left of the Google Analytics page.

## Troubleshooting

The most common problems occur when something changes in an input data set. That might be :

- renaming of a column

- moving of data within an excel input

- renaming geographical areas

- adding or removing or changing the definition of some data

Another source of problem is changing geographical areas:

- updating boundaries (pages like this are good to keep an eye on <https://en.wikipedia.org/wiki/2019%E2%80%932023_structural_changes_to_local_government_in_England> but changes to LSIPs, MCAs and LEPs you are better off looking at the latest data on <https://geoportal.statistics.gov.uk/>)

- area name changes. These can be random eg typos, or genuine updates to names. In transformData.R there are a number of bits of correcting code to allign names. We attempt to use codes where possible but some data sets do not have them.

- some data sets use the boundaries at the time in their historical data. Some project the current projections back. In the dashboard we apply the latest boundaries to all files.

The best way to check for all of these is to try and spot any NAs in the final data (that in /Data/AppData). This will catch most, but may not catch all so it is also good to check the final dashboard for errors in the charts and maps.

We are looking to implement more QA tests to check these things automatically.
Loading
Loading