🦠 CoronaVirus COVID-19 Statistics in TouchBar

Are you interested in having the CoronaVirus COVID-19 Statistics in your country on the MacBook Pro touchbar?
IMG_0282 2



Enjoying This Preset? PayPal.me/K2DesignLab

UPDATED: 04/06/2021
Download Preset: K2 CoronaVirus.bttpreset (617.9 KB)

Notes:

  1. Changed to NEW data URL.

  2. Fixed display based on new code changes from tracker.

  3. Changed some display config for values to fit properly. Needed to expand the data value fields.

  4. Added placeholder for chart data (coming soon)

  5. I added a LONG PRESS action/trigger to the Main button (COVID CASES) and Country button on the CoronaVirus full details view. Long Press the main display button and enter your country name or ISO Country CODE. example: Hong Kong = HK

  6. I also added a SHORT PRESS action on the Country button in the full display. This short tap action will open the Webpage of Country Codes.

PLEASE NOTE:
I made the "Corona Virus Country" to a variable (LONG PRESS MAIN BUTTON or Country on full display to set your country), Enter country name or country ISO 3166-1 code. (ie. "USA", "GB", "GBU", "DE", "DEU")

Country Codes: Short Press the country name on the full display view. https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes#Current_ISO_3166_country_codes

License: COVID-19 Tracker CLI is Developed by Waren Gonzaga and Ian Vizarra licensed under GNU General Public License v3 Novel COVID API

I am ! :wink:

What is the source for the data?

Data Source: https://disease.sh

I think you should be careful with that. Worldometers does not allow usage of their data without payment, I had looked into that a while ago. But maybe giving instructions on how to access the data is fine :wink: I'd not publish a complete widget though as that might violate their copyright.

Does John Hopkins or Bing.com doesn't have an API for the maps they show with all country specific numbers?

Thanks for that FYI...

Sources

License

COVID-19 Tracker CLI is licensed under MIT - https://opensource.org/licenses/MIT

Posted my sample code on Original Post.

Good day, i hope you're staying safe....i'm really interested in this, but i don't know how to implement the code you pasted, could you help me with the instructions, please, thanks and sorry for the inconvenience.

1 Like

Hey ! I'm totally new to this, do I only have to paste that in apple script ? Thanks ! :slight_smile:

PRESET in Original Post...

Oh... Ok I feel stupid :sweat_smile: It was late in my country when I posted. Thanks a lot !!

New Code / Preset posted in Original Post. Seems the tracker is down or URL has changed. If you have blank data or errors, try the updated preset.

1 Like

POSTED UPDATED PRESET in Original Post.
Updated: 04/18/2020
Notes: Changed some font spacing/formatting. Added "optional" country code display (pictured above).

Working on an update... Anyone have any requests for any features or fields you would like added?

Current Fields/Values Included:
Total Cases, Total Deaths, Mortality Rate%, Today Cases, Today Deaths

Other Available Data Fields NOT DISPLAYED:
Critical, Recovered, Recovery %, Active, Cases/Million

Also, in the near future, I hope to have the ability to narrow down results based on STATES.

hi. I put in the code for New Zealand (ISO 3166-2:NZ), which is where I live. It didn't work, this happened. it happened when I typed the words New Zealand as well.

this is the coding:

edit:
just realised that my country is getting pretty much no cases anymore (like 1 a week). could this be why?

Looks like the code: NZ works. Show me your output on Touch Bar.


what do you mean by 'output on touchbar'? this?

I changed to "NZ" and get the below.

just 'NZ'? not New Zealand? Ill try that...