isjeffcom / coronvirusFigureUK

A data crawler for geting COVID-19 figure from NHS official website
MIT License
41 stars 11 forks source link

End of service notice

As the COVID-19 epidemic gradually eased, the official channel improved and more personal reasons required: The COVID19UK.LIVE website will soon stop maintaining. For API users, please try to find an alternative as quickly as possible.

Thank you for your support. Stay safe.

The Offical Data Sources:

  1. UK National Dashboard / England Dashboard:https://coronavirus.data.gov.uk/?_ga=2.174461218.1658631352.1593742630-1919209646.1583791143
  2. Wales Dashboard:https://public.tableau.com/profile/public.health.wales.health.protection#!/vizhome/RapidCOVID-19virology-Public/Headlinesummary
  3. Scotland Dashboards and Statistic Reports:https://www.publichealthscotland.scot/our-areas-of-work/sharing-our-data-and-intelligence/coronavirus-covid-19-data/
  4. North Ireland Dashboard:https://app.powerbi.com/view?r=eyJrIjoiZGYxNjYzNmUtOTlmZS00ODAxLWE1YTEtMjA0NjZhMzlmN2JmIiwidCI6IjljOWEzMGRlLWQ4ZDctNGFhNC05NjAwLTRiZTc2MjVmZjZjNSIsImMiOjh9

UK Coronavirus Data Tracker API

A live COVID-19 data scraper API provide function with current status, history, and confirmed cases geolocation

Visualization

https://covid19uk.live/

API LIST

Root URL has changed to https://api.covid19uk.live, previous URL no longer accessible.

  1. Current Figure: https://api.covid19uk.live/
  2. History: https://api.covid19uk.live/historyfigures
  3. Location center: https://api.covid19uk.live/locations
  4. Gov.uk Update time daily: https://api.covid19uk.live/timeline

(Not for Front-End Use ↓)

  1. Full History(with regional): http://api.covid19uk.live/history

About Data

  1. People in hospital data was updated manually in every 2-4 days.
  2. Wales regional data was updated mannually in every 2-4 days.

(This is due to the format or link from data source was constantly changing and manual intervention was often needed)

API USAGE NOTICE

There are no access barriers for this public API. Only:

PLEASE do not attack or harm this server as its not for profit, it's for people to obtain and understand information
PLEASE be careful when you testing this API in your product
PLEASE make sure you have cached data on your side as the server is not 24/7 stable

No CORS, request limit applied.

Getting Started

Runtime require NodeJs

  1. install mysql database > create a 'corona' database > import 'sample.sql'
  2. rename conf_tmp.js to conf.js, config mysql username and password
  3. create config a mapbox API Token, or disable getLocation() and putLocation() in index.js. This is for getting geolocation center for map data, its kind of essential for doing data visualization.
  4. install lastest nodejs and run npm i npm run dev or just node index.js
  5. project will start at http://localhost:8003
  6. you can find all router enterance point in index.js

Importance

  1. Due to the announcement channel and structure are constantly changing, new data update will put into current_shadow table waiting for admin approve. Admin need to GET: http://HOST/approve?token= with token in the first row (id=1) of your user table, to update to official current table.

  2. Use GET: http://HOST/update?token= to manually update all data (you need to approve the new data as well)

  3. The false data may cause chaos to the public, please be careful.

  4. As I am not a professional coder (I am a designer), I am welcome if anyone could help me make improvement. You can contact me through ISSUE page

  5. If you are using this API, please be make sure data has cache and fault tolerance was considered. This is API is not completely reliable at all time.

Partnered Projects

UK API: https://github.com/isjeffcom/coronvirusFigureUK
Global API: https://github.com/isjeffcom/coronavirusDataGlobal

ML Prediction: https://github.com/lamharrison/coronavirus-machine-learning

Store stock:
https://github.com/commmathree/UKSupermarketScrapper
https://github.com/isjeffcom/UK-All-Store


New Zealand Version (By @Larry):
https://covid19nz.live

Contact

If you are using this API, please join this discussion board. Keep updated for any significant changes!!
https://www.facebook.com/groups/2944338405655888



WeChat Group:

https://isjeff.com hello@isjeff.com

Co-work with:

@Big Tree: https://github.com/lamharrison
@Jimmy Lu: https://github.com/lujiammy
@Vincent Zhang: https://github.com/VincentNevermore
@commathree: https://github.com/commmathree

Data References

  • [API] Coronvirus Figure UK - isjeffcom
  • [Gov]COVID-19: latest information and advice
  • [Gov]COVID-19: track coronavirus cases
  • [[Gov]Coronavirus in Scotland
  • [Gov]COVID-19 (coronavirus) Northern Ireland
  • [Gov]Written Statement: COVID-19 Wales
  • [Gov]DHSCgovuk Official Twitter
  • [Media]COVID-19 CORONAVIRUS OUTBREAK (Worldometers)