Skip to content
Open
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Firstly, thanks for taking the time to check out this guide and thinking about contributing!

The following is a set of guidelines for contributing to PHS technical documentation. As the back-end to the [PHS Data Science Knowledge Base documentation page](https://public-health-scotland.github.io/knowledge-base/docs/), there is specific requirements to ensure that the documentation is consistent and accessible.
The following is a set of guidelines for contributing to PHS technical documentation. As the back-end to the [PHS Data Science Knowledge Base documentation page](https://public-health-scotland.github.io/knowledge-base/docs/), there are specific requirements to ensure that the documentation is consistent and accessible.

#### Table Of Contents

Expand Down
34 changes: 17 additions & 17 deletions Information Sharing/Dashboard Accessibility Guidance.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Consider the overall layout and usability of the dashboard. Dashboards should id

### Top Tips

* Try to minimize large areas of white space.
* Try to minimise large areas of white space.
* Think about the tabbing/focus order whilst using a keyboard to navigate your dashboard. Make sure you can navigate using a keyboard only, in a logical order.
* Think about where users expect to find certain information - such as instructions, data sources, and contact information.
* Try not to repeat content unnecessarily.
Expand All @@ -27,7 +27,7 @@ Consider the overall layout and usability of the dashboard. Dashboards should id

## Automated testing tools

There are a number of tools available for testing accessibility. Amongst the most useful are, including:
There are a number of tools available for testing accessibility, including:

* Chrome browser extensions:
* The [axe browser extension](https://www.deque.com/axe/browser-extensions/) is useful for running automated and guided tests on targeted web pages. Signing up to axe beta allows you to export results and run all automatic tests.
Expand All @@ -41,7 +41,7 @@ There are a number of tools available for testing accessibility. Amongst the mos
## Code

* Ensure that the language attribute is set to "en" (see [Language of page WCAG 3.1.1](https://www.w3.org/WAI/WCAG21/Understanding/language-of-page.html)).
* Ensure the main heading is marked up as such (see [Info and relationships WCAG 1.3.1](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html)), this is particularly important for each new "tab" or "page" you build within the dashboard.
* Ensure the main heading is marked up as such (see [Info and relationships WCAG 1.3.1](https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships.html)). This is particularly important for each new "tab" or "page" you build within the dashboard.
* Headers (H1 to H6) should be used to denote content levels, not as a convenient way to style text.
* Header levels should start at H1 and proceed in order as appropriate - for example, don't start at H2, with no H1 or don't jump from H1 to H3.
* The visual appearance of headers should match the programmatic level - for example, H1 should appear more prominent than H2.
Expand All @@ -63,16 +63,16 @@ There are a number of tools available for testing accessibility. Amongst the mos
* arrows
* shift
* escape
* There should be a logical order to the tabbing sequence - this can be tested using tab (forwards) and shift-tab (backwards). You want to ensure that elements within the dashboard are focussed on in a logical order (see [Focus order WCAG 2.4.3](https://www.w3.org/WAI/WCAG21/Understanding/focus-order.html)).
* There should be a logical order to the tabbing sequence - this can be tested using tab (forwards) and shift-tab (backwards). You want to ensure that elements within the dashboard are focused on in a logical order (see [Focus order WCAG 2.4.3](https://www.w3.org/WAI/WCAG21/Understanding/focus-order.html)).
* Check that any drop-down menus or pop-outs can also be navigated using this method.
* There should be a means to navigate back to the original page.
* Guidance for using inputs should be added. This guidance should be placed before the input object to be read by screen readers before the user encounters the object.

## Links

* All links should be encoded correctly as links (see [Name, role, value WCAG 4.1.2](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html)).
* When writing a link, make it descriptive and front-load it with relevant terms instead of using something generic like 'click here' or 'more'. Generic links do not make sense out of context or tell users where a link will take them. They also do not work for people using screen readers, who often scan through lists of links to navigate a page. It's important the links are descriptive so they make sense in isolation.
* Bad: For further information click here.
* When writing a link, make it descriptive and front-load it with relevant terms instead of using something generic like 'click here' or 'more'. Generic links do not make sense out of context or tell users where a link will take them. They also do not work for people using screen readers, who often scan through lists of links to navigate a page. The links must be descriptive so they make sense in isolation.
* Bad: For further information, click here.
* Good: View more information on good link practice.
* Do not use the same link text to link to different places.
* Think about the size of the link users need to select. For users with reduced motor skills, a one-word link could be very difficult to select.
Expand All @@ -88,43 +88,43 @@ There are a number of tools available for testing accessibility. Amongst the mos
* Images should have alternate text (see [non-text content WCAG 1.1.1](https://www.w3.org/WAI/WCAG21/Understanding/non-text-content.html) for more information).
* Alt text should typically:
* Be accurate and equivalent in presenting the same content and function as presented by the image.
* Be succinct. This means the correct content and function of the image should be presented as succinctly as is appropriate. Typically no more than a few words are necessary, though rarely a short sentence or two may be appropriate.
* NOT be redundant or provide the exact same information as text within the context of the image.
* Be succinct. This means the correct content and function of the image should be presented as succinctly as is appropriate. Typically, no more than a few words are necessary, though rarely a short sentence or two may be appropriate.
* NOT be redundant or provide the same information as text within the context of the image.
* NOT use the phrases "image of ..." or "graphic of ..." to describe the image. It's usually apparent to the user that it is an image. And if the image is conveying content, it is typically not necessary that the user knows that it is an image that is conveying the content, as opposed to text.

## Chart design and layout

* All chart elements should have sufficient colour contrast (see [Contrast (minimum) WCAG 1.4.3](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html)).
* Make sure your chart works in greyscale.
* Blue is a rich colour across types of colour blindness so is a good base colour for charts.
* Blue is a rich colour across types of colour blindness, so is a good base colour for charts.
* If gridlines are to be used in graphs, they should always be grey. A good tone is #bebebe (R190 G190 B190).
* Dashed lines can be used for graphs but no more than two variations.
* Dashed lines can be used for graphs, but no more than two variations.
* Avoid pattern fill.
* Charts should have horizontal text, never vertical. Consider swapping the chart axis if long labels are a problem.
* Double value axes should not be used. Use two charts instead.
* Include instructions for interacting with charts.
* Chart titles should be coded as text, not as images. Include a title above the chart to ensure that this is read by a screen reader prior to the chart.
* Output resolution should be set to take account of intended destination. If a chart is pasted from Excel into Word and resized, the image can become pixelated and font size can fall below required size.
* Output resolution should be set to take account of the intended destination. If a chart is pasted from Excel into Word and resized, the image can become pixelated, and the font size can fall below the required size.
* Ensure that chart elements will not be clipped or hidden when users change display options - for example, text spacing, resolution, resizing, contrast (see [Reflow WCAG 1.4.10](https://www.w3.org/WAI/WCAG21/Understanding/reflow.html) for more guidance, particularly around avoiding losing functionality beyond 400% zoom).
* Do not do the following:
* use colour alone to convey information (see [Use of colour WCAG 1.4.1](https://www.w3.org/WAI/WCAG21/Understanding/use-of-color.html)). Alternative options include:
* adding labels
* mapping values to shapes
* splitting up charts
* use subtle colour changes to indicate extreme outliers
* rely solely on sensory characteristics of components such as shape, color, size, visual location, orientation, or sound (see [Sensory characteristics WCAG 1.3.3](https://www.w3.org/WAI/WCAG21/Understanding/sensory-characteristics.html))
* have internal scroll bars on large chunks of text o use borders and backgrounds for charts
* rely solely on sensory characteristics of components such as shape, colour, size, visual location, orientation, or sound (see [Sensory characteristics WCAG 1.3.3](https://www.w3.org/WAI/WCAG21/Understanding/sensory-characteristics.html))
* have internal scrollbars on large chunks of text or use borders and backgrounds for charts
* use text that is too small
* use white space/images as padding
* map tool tips underlinked like links when they are not links.
* map tooltips are underlined like links when they are not links.

## Branding and corporate colours

The logo must be presented in accordance with PHS branding guidelines and style guide. The Public Health Scotland logo should be used. Logos of legacy organisations should not be used.
The logo must be presented following PHS branding guidelines and style guide. The Public Health Scotland logo should be used. Logos of legacy organisations should not be used.

### Colour palette for digital products

The below tables show the main and supporting colour palettes available within the PHS Brand guidelines. The tables show the name, swatch, and the hex and RGB values for recreating this colours within digital products.
The tables below show the main and supporting colour palettes available within the PHS Brand guidelines. The tables show the name, swatch, and the hex and RGB values for recreating these colours within digital products.

#### Main colour palette

Expand All @@ -146,6 +146,6 @@ The below tables show the main and supporting colour palettes available within t

## Alternative formats

* Provide a download option for data in a flat format, for example csv.
* Provide a download option for data in a flat format, for example, CSV.
* If a chart is displayed, the option to hide or show and download the displayed data (after any selecting or filtering has taken place) should also be provided.
* Table cells should be accessible via keyboard (tab).
12 changes: 6 additions & 6 deletions Posit Infrastructure/How to Access Posit Workbench.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@

## New user

If you're new to Posit Workbench and require that for your role, a user account and relevant access is set up by DaS (which includes access to Posit Package Manager). This follows a similar process to 'Access to Data', and requires line manager approval and is subject to the [Acceptable Usage Policy](Acceptable%20Usage%20Policy%20for%20Posit%20Workbench.md). This includes the deactivation of inactive accounts, if this affects you, see [Deactived User](#deactivated-user).
If you're new to Posit Workbench and require access for your role, a user account and relevant access are set up by DaS, including access to Posit Package Manager. This follows a similar process to the 'Access to Data' process, requires line manager approval, and is subject to the [Acceptable Usage Policy](Acceptable%20Usage%20Policy%20for%20Posit%20Workbench.md). Accounts may be deactivated after a period of inactivity; if this affects you, see [Deactivated User](#deactivated-user).

1. Go to [ServiceNow](https://nhsnss.service-now.com/phs/) > Digital & Security > Service Catalog > Make a Request
2. Select 'Corporate Applications' as the Product or Service
3. Another dropdown will appear where you can select the appropriate Posit application. In this case, Workbench.
4. Complete the rest of the form, and attach authorisation from your line manager (similar to Access to Data process).
4. Complete the rest of the form, and attach authorisation from your line manager (similar to the Access to Data process).
5. Submit the request!

## Deactivated user

As part of the standard licence management processes for Posit, to keep us compliant with our licence agreement, we regularly review activity across the platform. Where accounts are found to be inactive, you will receive communication about the deactivation of your account. This process maintains user settings and data, with reactivation prioritised to be expected within 48 hours.

To request reactivation email the Data Science team ([[email protected]](mailto:[email protected])) **with your LDAP username** and this will be actioned.
To request reactivation, email the Data Science team ([[email protected]](mailto:[email protected])) **with your LDAP username** and this will be actioned.

## Logging in

Expand All @@ -35,7 +35,7 @@ The Posit Workbench server is accessed via a web browser. To log in, follow the

![Posit Workbench login screen](https://user-images.githubusercontent.com/45657289/186685760-da0d9dc6-cfe8-4afc-93fd-7afaaf6fd91d.png)

5. Enter your LDAP username and password (the same credentials you use to login to your computer).
5. Enter your LDAP username and password (the same credentials you use to log in to your computer).

6. Click the "Sign In" button (circled in red above), or press the "enter" key on your keyboard.

Expand All @@ -47,8 +47,8 @@ The Posit Workbench server is accessed via a web browser. To log in, follow the

1. From the screen shown above, click the "+ New Session" button (circled in red above)

2. This will provide a popup with some options as shown below for how to set up your session:
- The 'Session Name' can be left as the default or you can provide something more specific for you to identify. This could be useful if you require multiple sessions open at once.
2. This will provide a pop-up with some options, as shown below for how to set up your session:
- The 'Session Name' can be left as the default, or you can provide something more specific for you to identify the session later. This could be useful if you require multiple sessions open at once.
- The 'Editor' allows you to select an IDE (Integrated Development Environment): RStudio (default), Jupyter Lab, Jupyter Notebook, or VS Code.
- 'Cluster' can only be Kubernetes
- There is separate guidance for selecting a suitable session size in [Posit Workbench and Kubernetes](Posit%20Workbench%20and%20Kubernetes.md).
Expand Down
2 changes: 1 addition & 1 deletion Posit Infrastructure/Memory Usage in SMR01.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This document aims to provide users with information on the minimum memory requi

Computer random access memory (RAM) gives applications a place to store and access data that are being actively used, and to do so quickly.

Executing an SQL query against a database will result in that data being read into your R session's memory in its entirety, and all subsequent operations on that data are performed *in-memory*. You therefore need to ensure that your session has access to sufficient free memory to hold the size of data you intend to work within your analysis.
When you execute an SQL query against a database, the entire dataset is loaded into the memory of your R session. As a result, all subsequent operations on that data are done in memory. It is essential to ensure that your session has enough available memory to accommodate the size of the data you plan to analyse.

The following table presents various sizes of extracts from the SMR01 dataset, from 1 month's worth of data, to the whole of SMR01, along with the amount of memory required just to fetch these data into R, and the recommended amount of memory to request if you intend to work with a dataset of this size.

Expand Down
2 changes: 1 addition & 1 deletion Posit Infrastructure/Overnight Sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This automated process can be overridden by including the word "NIGHT" at the st

## Process to start a "NIGHT" session

A Posit Workbench session that a user would like to continue running past 7:15pm must be named with the word "NIGHT" **when the session is started**. The following steps must be carried out to ensure that the session remains open past 7\:15pm\:
A Posit Workbench session that a user would like to continue running past 19:15 (7:15pm) must be named with the word "NIGHT" **when the session is started**. The following steps must be carried out to ensure that the session remains open past the automatic shutdown time:

1. After successfully logging into Posit Workbench, the user will be presented with the following screen:

Expand Down
2 changes: 1 addition & 1 deletion Posit Infrastructure/Posit Support.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Public Health Scotland's Data Science team will be providing first-line support
- **Check Access Permissions**: Ensure that you have access permissions to the server or specific data sets. Check with someone else in your team, or DaS (via [Service Now](https://nhsnss.service-now.com/phs/)) to confirm your access permissions. _All database connections that were available on the old server infrastructure have been migrated and made available for testing during UAT._
- **Check Browser**: Sometimes, the issue might be related to the browser you are using. This has been identified in a couple of areas already with Mozilla Firefox. Try using a different browser to see if the issue persists; all Chromium based browsers are tested and work as expected (i.e. Microsoft Edge and Google Chrome).

If you have followed these troubleshooting steps and the issue still persists, please raise a support request by providing the following details (you can also use this form to reach out with questions about the infrastructure).:
If you have followed these troubleshooting steps and the issue still persists, please raise a support request by providing the following details (you can also use this form to reach out with questions about the infrastructure):

- Specific steps taken that led to the issue
- Error messages or symptoms
Expand Down
Loading