Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bibaldo/MMM-COVID19
https://github.com/bibaldo/MMM-COVID19
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/bibaldo/MMM-COVID19
- Owner: bibaldo
- License: mit
- Created: 2020-03-20T05:30:49.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-07T14:31:54.000Z (over 4 years ago)
- Last Synced: 2024-08-04T10:03:07.908Z (4 months ago)
- Language: JavaScript
- Size: 425 KB
- Stars: 34
- Watchers: 4
- Forks: 28
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mmm - **MMM-COVID19**
README
# MMM-COVID19
A [MagicMirror²](https://magicmirror.builders) helper module to track reported cases of COVID-19.[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://raw.githubusercontent.com/bibaldo/MMM-COVID19/master/LICENSE)
![Example](.github/example-screenshot.png)
German translation
![Example](.github/covid19_de.png)
## Installation
In your terminal, go to your MagicMirror's Module folder:
````
cd ~/MagicMirror/modules
````Clone this repository:
````
git clone https://github.com/bibaldo/MMM-COVID19.git
````Add the module to the modules array in the `config/config.js` file:
````javascript
{
module: "MMM-COVID19"
},
````## Configuration options
The following properties can be configured:
| Option | Description
| ---------------------------- | -----------
| `header` | The header text
**Default value:** `'COVID-19'`
| `worldStats` | Worldwide stats
**OPTIONAL**
**Possible values:** `false` or `true`
**Default value:** `false`
| `countries` | The countries that we want to get live COVID-19 stats
**Possible values:** `[ "Argentina, "USA" ]`
**Default value:** `[ "Argentina", "Italy", "Spain", "Germany" ]`
| `orderCountriesByName` | Order results by country name (true) or total number of confirmed cases (false)
**OPTIONAL**
**Possible values:** `false` or `true`
**Default value:** `false`
| `orderAscending` | Sort order for `orderCountriesByName`
**OPTIONAL**
**Possible values:** `false` (descending) or `true` (ascending)
**Default value:** `false`
| `lastUpdateInfo` | Last update info in UTC Time
**OPTIONAL**
**Possible values:** `false` or `true`
**Default value:** `false`
| `delta` | Show 2 more columns (New Cases and New Deaths)
**OPTIONAL**
**Possible values:** `false` or `true`
**Default value:** `false`
| `showExtraInfo` | Show Cases per Million and Serious Cases
**OPTIONAL**
**Possible values:** `false` or `true`
**Default value:** `false`
| `highlightCountry` | Enhances background for one country to improve visibility
**OPTIONAL**
**Possible values:** `"country name"` (i.e. "France")
**Default value:** none
| `rapidapiKey` | rapidApi.com api key
**MANDATORY**
**Check Notes**
| `headerRowClass` | The font size of the row headers
**Possible values:** `'small'`, `'medium'`, `'big'`
**Default value:** `'small'`
| `infoRowClass` | The font size of data
**Possible values:** `'small'`, `'medium'`, `'big'`
**Default value:** `'big'`
| `updateInterval` | How often does the content needs to be fetched? (Milliseconds)
**Possible values:** `1000` - `86400000`
**Default value:** `300000` (5 minutes)
| `timeFormat` | Formatting date and time for lastUpdateInfo
**OPTIONAL**
**Posible values:** check https://momentjs.com/docs/#/displaying/format/
**Default value:** `"MMMM Do YYYY, h:mm:ss a" // April 7th 2020, 03:08:10 pm`## Config Example
````javascript
{
module: "MMM-COVID19",
position: "top_left",
config: {
updateInterval: 300000,
worldStats: true,
delta: true,
lastUpdateInfo: true,
countries: [ "Argentina", "China", "Italy", "Spain" ],
headerRowClass: "small",
rapidapiKey : "01d6665ba777fdb4117cdmshc742d5373fae8f1cp148639jsn1" // this is an example, do not try to use it for real
}
},
````
**Notes**
* `rapidapiKey` is **required**. You should first create an account on https://rapidapi.com/ and then go to https://rapidapi.com/astsiatsko/api/coronavirus-monitor, and use `cases_by_country` and `worldstat` endpoints## Updating
To update the module to the latest version, use your terminal to go to your MMM-COVID19 module folder and type the following command:
````
git pull
````Feel free to open any Issue :smiley: