node-red-contrib-covid19
v2.0.1
Published
A node-red node to gather information about the statistics of COVID-19 (Corona) virus.
Downloads
11
Maintainers
Readme
node-red-contrib-covid19
A simple set of node-red nodes to gather statistics regarding of COIVD-19 (Corona) virus cases.
Install
Run the following npm command in your Node-RED user directory (typically ~/.node-red):
npm install node-red-contrib-covid19
Note that statistics rely on external sources, witch may not be 100% accurate, and may not be online 24/7.
Version 2.0.0
Added two new nodes All of the nodes are moved to the COVID19 category inside node-red
Node usage
This node gets a request of all of the statistics, and filter them according to nodes settings.
In the Specify countries:
type in the iso code of the country you want to gather the statistics of the COVID-19 virus.(make sure that the iso code is uppercase).
Input:
Input can be any messsage, there is no need to set up anything.
Output:
All of the nodes outputs are in msg.covid
.
Default values that are always sent to the output are:
msg.covid.(countryISO).countryinfo.country (string)
msg.covid.(countryISO).countryinfo.iso (string)
msg.covid.(countryISO).countryinfo.iso2 (string)
msg.covid.(countryISO).countryinfo.flagurl (string)
msg.covid.(countryISO).countryinfo.location.lat (number)
msg.covid.(countryISO).countryinfo.location.long (number)
Other variable outputs are:
msg.covid.(countryISO).cases (number) Cases count
msg.covid.(countryISO).deaths (number) Deaths count
msg.covid.(countryISO).recovered (number) Recovered count
msg.covid.(countryISO).active (number) Active count
msg.covid.(countryISO).critical (number) Critical count
msg.covid.(countryISO).todaycases (number) Today count
msg.covid.(countryISO).todaydeaths (number) Today Deaths count
msg.covid.(countryISO).casemilion (number) Cases Per One Milion count
msg.covid.(countryISO).deathsmilion (number) Deaths Per One Milion count
All of these outputs are optional, depending if selected checkboxes are checked or not.
Screenshots
This are the values that are sent everytime.
This is the output of the node with all of the settigns checked for China and Italy.
And these are the settings of the output above.
In case the Countries text box is lefted empty or haves an error you will recieve the first error when you deploy your flow, and the second error when the node recieves a message.
In case your textbox haves an invalid country iso format you will recieve the following error.
New nodes
These are the results from the worldwide node:
These are the results from the affected countries node: