Local Coronavirus COVID-19 info (notification)

This macro gives you a notification with the current Corona (COVID-19) data for a selected region.

  1. Make sure the macro group, where the macro is in, is enabled.
  2. In the header of the macro, set the desired hotkey trigger and make sure the Triggered by checkbox is selected.
  3. Make sure you are connected to the internet.
  4. Run the macro via its hotkey trigger.

In the list that should pop up, select your region/state/country, like this:

or

Then press Return and you will get a notification with the following data:

  • Country/region & time stamp
  • Number of confirmed/recoverd
  • Diff of confirmed/recovered against previous data (day before)

More info:

The data is pulled from this:

It seems an updated table (with the data of the previous day) is uploaded once per day. So, it makes no sense to repeatedly run the macro for the same region on one day. This would only produce unnecessary traffic.

Issues

Currently (as of 2020-03-12) you will get an error when demanding data for certain regions (for example France [France works again as of 2020-03-13]). This is because the current data format (last day) for some regions differs from the previous data format, for example “France” is Country and State vs “France” is only Country, and State is "" (empty).

I don’t know why they don’t publish the data with a consistent format, but I guess this will go away in a couple of days. If not, I’ll have to modify the macro.

For issues concerning the data itself, see the Issue Tracker.

Social implications

It is not point of this macro to panic you. I’m completely aware that certain factions/companies may profit from people being panicked and may even push this ahead. Point of this macro simply is to facilitate quickly getting the desired information for a given region. It is up to you to handle this information responsibly.


Local COVID-19 info (notification) <46AE 200314T145232>.kmmacros (30.4 KB)


Changes:

0.8.4 (2020-03-14T14:55+01)

  • Using GMT offset now (should save a few http requests)

0.8.3 (2020-03-13T23:28+01)

  • Better mechanics to make sure always the latest data is pulled (considering the possible “dead” hour between 0h and ~1h and the different time zones)

0.8.2 (2020-03-13T15:35+01)

  • Fixed local variable issue

0.8.1 (2020-03-13T00:52+01)

  • Added a check for if the data has not been updated yet (mainly shortly after 0:00h); we take the previous data as “latest” then, and pull the data from 2 days before for the “previous”.

  • Added time to the notification (the region-specific time stamp as in the latest pulled table)

5 Likes

This macro looks interesting but it does not work.

Here is the error:

2020-03-13 10:34:42 Prompt With List failed with no result Macro “Local COVID-19 info (notification)” cancelled (while executing Prompt With List from Variable “Local Geo List”).

Any help?

If you run the macro the first time you have to forward-type in the list. For example if you look for the UK:

Type “uk” in the list prompt and you should get this:

Then just select (Return key) the desired entry. For the next run it will remember the previous selection.

Also make sure to download the latest version. (I have uploaded a couple of fixes after the first post.)

@carycrusiau

Uhps, found an error. Please download the latest version. Sorry for the inconvenience, and thanks for the pointer.

1 Like

Hi @Tom, again a very good macro from you :+1:

I have made it a little easier for myself and call up the information on this website.

2020_03_13_Support_1

COVID.kmmacros (39,5 KB)

2020_03_13 11)COVID

1 Like

Yes, there are several similar websites (with different data sources). Initial reason for me to write the macro was that one of these websites didn’t work properly with Safari :wink:

1 Like

Help! When I type a country into the prompt it doesn't take me to the data for the country I just typed in, why is that?

If you are referring to my macro: What happens when you type “spain” into the list prompt and select Spain with the Return key?

(In case you are referring to @appleianer’s macro, I would suggest to discuss it on a separate thread, since it works completely differently and has a different purpose.)

14 posts were split to a new topic: Enhancements to Tom's Coronavirus Maceo

That’s what I proposed, no? Sorry.

There have been several macro ideas, related to the current crisis:


PS:

The point of the macro of this thread is to give a quick and short notification, including the diff against the previous day. Point is not to display a persistent window or to open a web page.

If you only want to see info on one specific region (e.g. the region you are living in), then just eliminate the list prompt and adapt the rest of the macro accordingly. Keep in mind tough that the entry notations in the source list seem to be a bit inconsistent (still).

(For example, one day the country name is “UK”, the other day it is “United Kingdom”. But I think this will “normalize”. But (for the time being), in these cases having the whole list – and the list prompt – is the best way to target the entry.)

1 Like

Sorry, the URL and the pages tree have changed. Not sure if I’m going to adapt the macro.

This site proclaims to be fed by the same database: https://coronamap.org

If this is correct, it should be an OK source.

And, BTW, friends, I will retire from this place. I love KM and I love Peter, but I do not love some things that are happening here, specifically the way some people are behaving. This is not related to Corona in no way.

Of course, I will try to maintain my published macros. And you always can contact me via PM. See you.

Thank you for everything you've contributed. Best wishes.

@Tom

I, personally, do NOT except your Retirement. I saw @Sleepy remove himself and it really disturbed me. He brought an alternative view that provided a different aspect or devil's advocate aspect per se. Your willingness to help people, with Keyboard Maestro and Mac Automation, is a strong attribute. Your posts have helped tremendously.

As you know, there are various solutions to problems/issues, sometimes things break, sometimes people have strong opinions as to the way you accomplish a task and sometimes people just need to lighten up. Most of the Keyboard Maestro forum members/regulars/helpers love to solve problems and those people (or any for that matter) shouldn't go at each other. It's fine to disagree but that's where it should end. Whether it's a KM newbie or KM seasoned vet. We need to be more cordial, less entitled, less egotistical and more humble towards each other.

We are at a time where all of us are in this life together. If folks don't recognize that, they should watch the news.

I vote that @Tom stays and vote that this whole thread is deleted.

KC

1 Like

Hey @kcwhat , thanks for that post. I appreciate it.

I didn’t want to go into the details publicly, but it seems now I’m forced to:

I have an obviously major (and long-standing) problem with one of the forum mods (it’s not Peter). I have put up with his behavior for years. Lately it got to the point where I decided to no longer say “Yeah, sure, you are right.”. As to be expected this escalated into a not so nice “discussion”, mainly but not only via PM.

I decided to retire from this place because I want to avoid any further unnecessary contact with that person, and the resulting pointless discussions. This is the only viable solution, I think. Currently I’m just tired of too much nonsense, sorry.

“Retiring” does not mean that I have cancelled my account. I will still be maintaining my posted macros and answer to questions in my macro topics, or to username-tagged questions. I just try to reduce my activities to a level that allows me to communicate in a more annoyance-free way, hopefully.

--
Tom

And, BTW, this macro (the macro of this topic) actually is dead. The publisher has changed the table structure, and now it is better than before. Though it requires some work to filter the new structure, in order to make the macro functional again. (50 minutes or so)

Anyone interested in a working version of the macro? Please hit the Heart button. As soon as I see two Hearts I will update the macro. (Maybe already with one Heart.)

Otherwise consider the macro / topic dead. Excuse my profanity.

2 Likes

:confused:

No, with a Heart I meant the symbol thingy in the bottom bar of the post (it looks like a heart).

What you have posted is a rather ugly murky slimey. Thanks anyway.