It is currently May 26th, 2020, 8:22 pm

COVID-19 Statbar

Post your work-in-progress and completed skins to share and discuss.
ms310
Posts: 195
Joined: April 1st, 2015, 7:16 am

COVID-19 Statbar

Post by ms310 »

This is my new Covid-19 tracker. It uses data from https://ncov2019.live/data. Arrows by some of the numbers indicate an increase, decrease or no change. If you update often you will see "no change" as the values are saved during every refresh.

Actions:
  • Hover anywhere: the top 5 countries displayed below skin
  • Hover over the bar: tool-tip with percentages of deaths, serious condition, recovered. Yellow= serious, purple=deaths, blue = recovered. Also, the colors from Chameleon will popup with the luminance value. Feel free to comment these out - the skin colors change based on the part of the wallpaper that is directly below the skin.
  • Click anywhere: takes you to the source site
img1.png
img2.png
COVID19 Statbar_20200407.01.rmskin

Special thanks to Balala, JSMORLEY, Eclectic-tech, and mak-kawa for their help as I went on this journey.[attachment=0]COVID19

20200407.01 Fixed regex
20200406.01 Fixed Regex, added Japan at the bottom of the popup list
20200403.01 Tweaked look and feel
20200403.01 Fixed Regex
20200402.01 Added Chameleon plugin to the skin package (thanks Balala and eclectic-tech)
20200401.01 Initial Release
You do not have the required permissions to view the files attached to this post.
Last edited by ms310 on April 7th, 2020, 12:12 am, edited 6 times in total.
mak_kawa
Posts: 642
Joined: December 30th, 2015, 9:47 am

Re: COVID-19 Statbar

Post by mak_kawa »

Nice work...
ms310
Posts: 195
Joined: April 1st, 2015, 7:16 am

Re: COVID-19 Statbar

Post by ms310 »

mak_kawa wrote:
April 1st, 2020, 6:17 am
Nice work...
Thanks. I had to leverage work done by JSMORLEY to tinker with the RegEx to turn off "greedy", skip spaces, and then turn "greedy" back on. This is very powerful when you are scraping web pages where HTML has a lot of spaces and carriage returns.

Code: Select all

<tr>
                  <td class="text--gray">
                    
                    <span class="save-button" data-status="unselected" data-type="country" data-name="United States">&#9733;</span>
                    
                    United States
                  </td>

                  <td class="text--green">
                    188,592
                  </td>

Code: Select all

<tr>.*data-type="country" data-name="(.*)".*</span>.*<td class="text--green">(?-U)[\s]+(?U)(.*)\s.*</td>.*<tr>.*
The website https://ncov2019.live/data has great repeatable data - so I can just repeat the above regex any number of times to get the top entries.

(?-U) turns greedy off
[\s]+ matches multiple spaces
[?U) turns greedy back on
\s matches up to the last space

This is a very powerful tool for scraping web pages.
User avatar
balala
Rainmeter Sage
Posts: 10605
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: COVID-19 Statbar

Post by balala »

ms310 wrote:
April 1st, 2020, 4:00 am
This is my new Covid-19 tracker. It uses data from https://ncov2019.live/data. Arrows by some of the numbers indicate increase, decrease or no change. If you update often you will see "no change" as the values are saved during every refresh.
Although the skin uses the Chameleon plugin, this isn't included into the skin installer, though it should. Don't distribute a skin which uses a plugin, without including the plugin into the installer. Probably there are a lot of people who don't have it installed.
ms310
Posts: 195
Joined: April 1st, 2015, 7:16 am

Re: COVID-19 Statbar

Post by ms310 »

balala wrote:
April 1st, 2020, 9:52 am
Although the skin uses the Chameleon plugin, this isn't included into the skin installer, though it should. Don't distribute a skin which uses a plugin, without including the plugin into the installer. Probably there are a lot of people who don't have it installed.
Thanks - I didn’t realize this was missing. I will take another try at packaging the plugin using the installer. I thought the installer included the plugins automatically. I will fox it!

Followup - I cannot find the Chameleon.dll - can someone please give me a hint where it exists? The location for both the 32 and 64 bit versions are not in the standard location the gui goes to when clicking the button to add the plugin.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3933
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: COVID-19 Statbar

Post by eclectic-tech »

ms310 wrote:
April 2nd, 2020, 12:03 am
Thanks - I didn’t realize this was missing. I will take another try at packaging the plugin using the installer. I thought the installer included the plugins automatically. I will fox it!

Followup - I cannot find the Chameleon.dll - can someone please give me a hint where it exists? The location for both the 32 and 64 bit versions are not in the standard location the gui goes to when clicking the button to add the plugin.
You should see a "@Vault" folder when you click to select a plugin. When you open that folder you will see a "Plugins" folder.
That folder will contain versions of every plugin that was installed when you installed any packages.

Select the Chameleon version folder you want to install, and select the 32bit version, then repeat for the 64bit version.
pluginselect.png
You do not have the required permissions to view the files attached to this post.
mak_kawa
Posts: 642
Joined: December 30th, 2015, 9:47 am

Re: COVID-19 Statbar

Post by mak_kawa »

Hi ms310

I too have switched the data site for my COVID skin from the worldometers to the ncov2019. The ncov2019 seems to be updated much quickly especially for my country.

I don't use the "greedy switching" RegExp as you said, because of my skill shortage. Instead, I use some substitutions to avoid "extra spaces and line feeds" for RegExp captures. Really poor solution. :-)
ms310
Posts: 195
Joined: April 1st, 2015, 7:16 am

Re: COVID-19 Statbar

Post by ms310 »

eclectic-tech wrote:
April 2nd, 2020, 3:20 am
You should see a "@Vault" folder when you click to select a plugin. When you open that folder you will see a "Plugins" folder.
That folder will contain versions of every plugin that was installed when you installed any packages.

Select the Chameleon version folder you want to install, and select the 32bit version, then repeat for the 64bit version.
pluginselect.png
Thanks! Implemented.
User avatar
balala
Rainmeter Sage
Posts: 10605
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: COVID-19 Statbar

Post by balala »

ms310 wrote:
April 2nd, 2020, 12:03 am
Followup - I cannot find the Chameleon.dll - can someone please give me a hint where it exists?
Or, besides eclectic-tech's reply, here you can download it.
ms310
Posts: 195
Joined: April 1st, 2015, 7:16 am

Re: COVID-19 Statbar

Post by ms310 »

The site change and my regex broke - I have fixed it - download on the first post.