Code Monkey home page Code Monkey logo

coronavirus-dashboard-frontend-server's Introduction

Coronavirus (COVID-19) in the UK - Frontend Server

GitHub commit activity Language grade: JavaScript Language grade: Python

This is the source code for the Coronavirus Dashboard serving the home page and postcode page.

Other services

The API service

The API supplies the latest data for the COVID-19 outbreak in the United Kingdom.

The endpoint for the data provided using this SDK is:

https://api.coronavirus.data.gov.uk/v1/data

Documentations for the API, including the latest metrics, are available on the Developers Guide page.

We have also developed software development kits (dedicated libraries) in several programming languages to facilitate access to the API:

Other repositories

Different parts of the Coronavirus dashboard service are maintained in their respective repositories, itemised as follows:

  • API v.1 - Main API service for the data, lookup tables, CMS, and metadata.
  • API v.2.0 - Batch downloads service [DEPRECATED in favour of v2.1]
  • API v.2.1 - Batch downloads service
  • Generic APIs - APIs that power the map, navigation, hierarchy, and relations
  • Coronavirus Dashboard - Details pages
  • Easy-Read Server - Easy-read pages and PDF generator
  • Layout CMS - Definition of contents
  • Metadata - Description of metrics and textual contents
  • ETL Service - Post-pipeline data processing and deployment
  • Terraform - Infrastructure as Code [DEPRECATED in favour of ARM templates]

Development and contribution

We welcome contributions by everyone. Please read the contributions guide for additional information.

How can I help?

We have a public project management board that shows outstanding issues to which everyone can contribute. Pick a ticket, assign it to yourself and move it to the Doing column, and you will be all set to start. There is also the outstanding issues from which you can choose, but let us know that you are working on it so that multiple people don't end. up doing the same task.

No contribution is too small. We welcome help from everyone. Get in touch if you need additional information. We are here to help.

Cloning the code for re-deployment

If your service isn’t on GOV.UK

You are welcome to use the GOV.UK patterns and frontend code even if your service isn’t considered part of GOV.UK. Although you will sometimes need to use different patterns, for example if you are building something like an admin interface.

While you can use the patterns, your site or service must not:

  • identify itself as being part of GOV.UK
  • use the crown or GOV.UK logotype in the header
  • use the GDS Transport typeface
  • suggest that it’s an official UK government website if it is not

These things are there to provide a consistent identity and navigation between GOV.UK and the sites and transactional services that hang off it. If your service isn’t on GOV.UK, there’s no need to maintain that identity - in fact, you might confuse or mislead people if you do.

You should also use the brand logo and font of your organisation.

Please consult the GOV.UK Service Manual for additional information.

Credits

This service is developed and maintained by Public Health England.

coronavirus-dashboard-frontend-server's People

Contributors

beawitcht avatar domdomegg avatar flearex avatar xenatisch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

coronavirus-dashboard-frontend-server's Issues

Update postcode field to GDS guidance

Describe the bug
This all about the 'Enter a postcode' field at: https://coronavirus.data.gov.uk/

  1. The postcode field uses html5 validation. GDS guidance says: "Turn off HTML5 validation" and "To turn off HTML5 validation, add ‘novalidate’ to your form tags." (See https://design-system.service.gov.uk/patterns/validation/ )
    Go to https://coronavirus.data.gov.uk/
    Go to the 'Enter a postcode' field
    Type 'sw1a'
    Press the magnifying glass icon
    System responds with a coloured exclamation mark and "Please match the format requested."
    I would expect an error message like 'Enter a UK postcode'

Screenshot
image

  1. The postcode field does not accept redundant characters. Users add these and sometimes can't see what's wrong (particularly if they are spaces which are invisible, of course). GDS guidance says: "It is easier for users if you accept and ignore unwanted characters. This is better than rejecting the input and telling a user they’ve not provided a valid postcode. You should allow postcodes that contain upper and lower case letters, no spaces, additional spaces at the beginning, middle or end and punctuation like hyphens, brackets, dashes and full stops."
    Go to https://coronavirus.data.gov.uk/
    Go to the 'Enter a postcode' field
    Type ' SW1A 0AA' [preceding space], or 'SW1A 0AA' [double space in middle], or 'SW1A-0AA' [hyphen], or 'SW1A 0AA.' [full stop], or 'SW1A 0AAA' [extra character]
    Press the magnifying glass icon
    System responds with a coloured exclamation mark and "Please match the format requested."
    I would expect each of the above examples to produce a result as if the user had typed 'SW1A 0AA'

HP laptop
Windows 10.0.19042
Chrome Version 87.0.4280.141 (Official Build) (64-bit)

Additional context
We addressed this issue by stripping all non-postcode characters and then putting space 3 characters from end. We did this prior to validation. See: https://github.com/hmrc/voa-bar-xml-frontend/blob/master/app/journey/PostcodeValidator.scala

Trying to help. Keep up the good work

Missing colon in map description

Colon missing in new maps description before bullet points

Should be:

UK interactive maps

Explore maps for:

  • cases
  • vaccinations

Reorder heading on landing page

Move "UK summary" to above the summary line (The official UK government website for data and insights on coronavirus (COVID-19))

Change text in postcode search card on landing page

Change this text:

Search by postcode
View data for a specific area within the UK.

Not all data are available for every area – we will show the most local information in each category for your selected area.

to:

Postcode search
View data for your local area

Update time format

Describe the bug
There is a leading zero in the time format at https://coronavirus.data.gov.uk/ It says 'Last updated on Monday 18 January 2021 at 04:43pm'.
This is also inconsistent with other pages such as https://coronavirus.data.gov.uk/details/testing which says: 'Last updated on Monday 18 January 2021 at 4:43pm'
GDS guidance is not to have leading zeros. See: https://www.gov.uk/guidance/style-guide/a-to-z-of-gov-uk-style#times

To Reproduce
Go to https://coronavirus.data.gov.uk/
Look at the top of the page where it says 'Last updated on '

Expected behaviour
The time format should not have a leading zero.

Screenshots
If applicable, add screenshots to help explain your problem.
image

image

Desktop (please complete the following information):
Windows 10
Chrome Version 87.0.4280.141 (Official Build) (64-bit)

Additional description in postcode search card on homepage

Add this pattern explanation text under 'Enter postcode': 'For example SW1A 2AA'
Under the search field, add link to Royal Mail's postcode finder: 'Find a postcode on Royal Mail's postcode finder'
[hyperlink to https://www.royalmail.com/find-a-postcode]

Example of how this would look, though postcode is wrong:

postcode card

Incorrectly defined link

The link to the view vaccinations data from the landing page isn't correctly defined.

Currently directs to areaType=nation and areaName=United Kingdom, which isn't a valid combination

Update server-originated error message on postcode field

Describe the bug
This relates to the 'Enter a postcode' field at https://coronavirus.data.gov.uk/
While working on the bug report for the client-side error message at UKHSA-Internal/coronavirus-dashboard#303, I discovered a server-side error message which says '- please enter a full and valid UK postcode.'. GDS guidance is to style a message like 'Enter a ...' thus there is no hyphen no 'please'.

GDS guidance about error messages says "Do not use: ... ‘please’ because it implies a choice". See: https://design-system.service.gov.uk/components/error-message/

I also recommend checking:

  1. if there is an error summary at the top of the page. This may help screenreader users
  2. if the server-side error message works with screenreaders
    I was unable to check either of these.

To Reproduce
Turn off client-side validation
Enter an invalid postcode
System responds with '- please enter a full and valid UK postcode.'

Expected behaviour
I expect a system response to be something like 'Enter a UK postcode.'

Screenshots
UKHSA-Internal/coronavirus-dashboard#303
image

Desktop (please complete the following information):
Laptop
Windows 10
Chrome Version 87.0.4280.141 (Official Build) (64-bit)

Add Vaccination Card to homepage

Add a vertical card on top of the homepage with vaccination data, as prototyped here:

https://phe-coronavirus.herokuapp.com/V11/

Please use the prototype as a reference and the design as an actual spec.

Waffle colors:

Empty grey : #D8D8D8
1st dose green : #54B3AB
2nd dose green: #007168

Here are the files for desktop and mobile. Please pay attention to the 'all vaccination data' link, that needs to move at the bottom of the column on mobile.

Vaccinations_Final
vaccination_ final_mobile

@xenatisch I am not sure how to assign this to you sorry! :)

Diamond is taking full width on Ipad

Diamond image becomes as wide as the whole screen on tablets, instead of being the same width as the location image above. We noticed this during a user testing session but couldn't reproduce - take screenshots.

Set growth rate to NA if not available for latest R number date

Issue - See screenshot below, 6th July is the correct R number date for Northern Ireland but the growth rate is the last one that NI published which was on 17 November 2020. Northern Ireland no longer publish growth rates so this should be NA. It will also become an issue for Wales in the future as they will be publishing R numbers weekly but growth rates less frequently.

Preferred action - always publish the latest R number, but only include the growth rate if it is available for the same date, otherwise display growth rate as NA.

image

Change summary line on landing page

Change to ‘The official UK government website for data and insights on coronavirus (COVID-19).’
[lower-case g for government and c for coronavirus]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.