https://github.com/mumblebaj/mmm-covidstats
MagicMirror² module - Display Covid Stats
https://github.com/mumblebaj/mmm-covidstats
covid19-stats magicmirror2
Last synced: 2 months ago
JSON representation
MagicMirror² module - Display Covid Stats
- Host: GitHub
- URL: https://github.com/mumblebaj/mmm-covidstats
- Owner: mumblebaj
- License: mit
- Created: 2022-04-10T12:47:07.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-15T18:37:59.000Z (almost 4 years ago)
- Last Synced: 2023-03-10T00:47:03.706Z (about 3 years ago)
- Topics: covid19-stats, magicmirror2
- Language: JavaScript
- Homepage:
- Size: 253 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MMM-CovidStats
A [MagicMirror²](https://magicmirror.builders) module to display Covid Stats from [NovelCOVID API](https://documenter.getpostman.com/view/11144369/Szf6Z9B3?version=latest#a9a60f59-fde4-4e94-b1f1-a3cb92bd1046).
[](LICENSE)



## Dependencies
- node-fetch 2.6.1
- luxon
## Changes
- Update sources
## Installation
In your terminal, go to your MagicMirror's Module folder:
````
cd ~/MagicMirror/modules
````
Clone this repository:
````
git clone https://github.com/mumblebaj/MMM-CovidStats.git
````
````
cd MMM-CovidStats
npm install
````
Add the module to the modules array in the `config/config.js` file:
````javascript
{
module: 'MMM-CovidStats',
position: 'middle_center',
config: {
countries: ["USA","ZAF","ESP"],
globalStats: true,
doNotDisplay: ["recovered", "critical", "todayRecovered"]
period: "yesterday",
title: "COVID STATS",
sortBy: "cases",
highlightCountry: "ZAF",
updateInterval: 86400000,
fadeSpeed: 1000
}
},
````
## Configuration options
The following properties can be configured:
| Option | Description
| ---------------------------- | -----------
| `title` | The Title text
Must be added to the config section
| `countries` | An array of iso3 country codes which can be found [here](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3)
| `globalStats` | Include Global Stats
**Possible values:** `true` or `false`
| `doNotDisplay` | An Array of Fields to exclude from the Displayed Data
**Possible values:** `cases`, `todayCases`, `deaths`, `todayDeaths`, `recovered`, `todayRecovered`, `active`, `critical`
| `sortBy` | Option to sort the country stats by a specified column
**Possible values:** `cases`, `todayCases`, `deaths`, `todayDeaths`, `recovered`, `active`
| `highlighCountry` | The iso3 code of the country to highlight
| `updateInterval` | The time interval to between fetching new stats
**Default value:** `24 hours`
| `fadeInterval` | The fade interval
## Updating
To update the module to the latest version, use your terminal to go to your MMM-CovidStats module folder and type the following command:
````
cd MMM-CovidStats
git pull
npm install
````