Magic Mirror Module to display stats on Covid19.
Data is provided by https://disease.sh/v3/covid-19
The data shown in the table displays the total numbers (top) and the difference calculated on the last 24 hours of available data. Reference timezone is UTC.
This 3rd party module install just like any other.
This Magic Mirror Forum thread describe a step-by-step procedure to install: How to add modules. For absolute beginners.
Check the configuration documentation below to ensure all set-up is done correctly.
the default configuration looks like this:
{
disabled: false,
module: "MMM-covid19",
position: "bottom_center",
config: {
countryCodes: ['DE', 'IT'],
updateInterval: 24 * 60 * 60 * 1000,
useScheduler: false,
schedulerConfig: '0 0 */12 * * */1',
yesterday: true,
locale: 'en-US'
},
}
-
countryCodes
: an Array of ISO2 values.
A list can be obtained at this url: https://api.covid19api.com/countries -
updateInterval
: a value expressed in milliseconds to be used to refresh the numbers.
Its value is only used whenuseScheduler=false
.
Its default values invokes an API call every 24 hours, starting from the first invocation date and time. -
useScheduler
: a boolean value (true
orfalse
).
Set totrue
it uses a cron like approach to refresh the data. It usesnode-schedule
, in order to be able to use this option, you need to runnpm install
ornpm ci
. -
schedulerConfig
: a validnode-schedule
configuration as a string or as an object.
Its default value execute an API call twice a day every day ad 12am and 12pm UTC time. -
yesterday
: a boolean value (true
orfalse
).
Set totrue
shows data concerning the day before,false
it shows data about the current day -
locale
: a string representing the locale version to use to format date and numbers
Examples of valid language codes includeen
,en-US
,fr
,fr-FR
,es-ES
, etc.