This template does not require a rating on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||
|
I have suggested adding this template to COVID-19 pandemic by country and territory, but this would require changing the format of the template to be a box with scrolling, the same as Template:COVID-19 pandemic data. See the discussion at Talk:COVID-19 pandemic by country and territory#Add new template?. Do other editors agree to this change and if so does anyone know how to do it? Dudley Miles ( talk) 11:46, 27 August 2020 (UTC)
(Unindent). The simplest thing may be just to put the template in a fully collapsed table in the other article:
COVID-19 pandemic death rates by country. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Updated July 16, 2024.
|
{| class="wikitable mw-collapsible mw-collapsed" ![[COVID-19 pandemic death rates by country]]. |- |{{Template:COVID-19 pandemic death rates by country}} |}
References
The reference will show up in the article references. I used {{
talk refs}} here to place the references in this talk section.
--
Timeshifter (
talk)
19:28, 27 August 2020 (UTC)
I plan to add this table to COVID-19 pandemic by country and territory and that article uses British style dates. Is it OK if I change the date style in this template in order to avoid inconsistent styles in the article? Dudley Miles ( talk) 10:58, 29 August 2020 (UTC)
See:
Dudley Miles. I suggest using numbered sandboxes. You and others can then keep working on this. From Help:Table:
Sandboxes help a lot. For example; your user page: Special:MyPage. Create and bookmark some personal sandboxes too. Visual Editor will load very fast in empty sandboxes: Special:MyPage/Sandbox, Special:MyPage/Sandbox2, Special:MyPage/Sandbox3. As many as you want. Share the link when asking for help. To find all your sandboxes: Special:PrefixIndex/User: – click link, add user name to the spot labeled "Display pages with prefix:". |
-- Timeshifter ( talk) 06:37, 30 August 2020 (UTC)
I made the table narrower by putting breaks in the headers, and removing width: 6em;
from the CSS:
See diff. On my monitor at the default font size the table went from 9 7/8 inches wide to 8 1/4 inches wide. -- Timeshifter ( talk) 11:53, 30 August 2020 (UTC)
Adding country links is an improvement but how do we stop them being overwritten each time the table is updated? Dudley Miles ( talk) 13:24, 30 August 2020 (UTC)
Timeshifter and RexxS It would be best to link to the article on the COVID-19 outbreak in each country, as Template:COVID-19 pandemic data does. This could be achieved by converting each country name from eg San Marino to {{flag+link|COVID-19 pandemic in|San Marino}}, but is there a way of automating this so that it can be done after each update? Dudley Miles ( talk) 13:39, 30 August 2020 (UTC)
See: COVID-19 pandemic by country and territory. 2 scrolling tables are in the same section.
In list articles with separate tables from different sources it is common to put the source either in the section header or the table caption. See examples:
If the 2 scrolling tables in COVID-19 pandemic by country and territory were put in different sections, then the JHU source could be put in the section header. Then it could be removed again from the template caption.
In COVID-19 pandemic death rates by country the JHU source is mentioned in the lead. So it is not really necessary to repeat the source in the table caption. Because the table is in the section that immediately follows the lead. -- Timeshifter ( talk) 11:29, 2 September 2020 (UTC)
Comment. Please see previous replies. Why subject a blind reader to having to go to a reference in order to find out the difference in 2 tables at COVID-19 pandemic by country and territory? And see diff. I will be removing this template, its talk page, and COVID-19 pandemic death rates by country from my watchlist. I can find much more productive uses of my time. -- Timeshifter ( talk) 16:53, 2 September 2020 (UTC)
If anyone passing by feels like wanting to update this page, it is possible to do it in seconds by using the python script below (written by me, released here as public domain). Please only run if you are able to read it and conclude it is safe by yourself, wikimedia can't take any responsibility for scripts written by contributors. Also note that it works as of 2021-04-16, JHU can change their page formatting, and it would eventually break the script, so use your good judgment to conclude the data being generated is safe. If anything seems not correct please message brunoff asking for a fix or fix the script by yourself. Brunoff ( talk) 01:30, 3 January 2021 (UTC)
from requests import get as reqget from json import loads as jsonloads from pyperclip import copy as clipcp t = reqget('https://coronavirus.jhu.edu/data/mortality').text i = t.find('/static/js/main') t = reqget('https://coronavirus.jhu.edu'+t[i:t.find('.chunk.js"',i)+9]).text i = t.find('{"Country":{') t = t[i:t.find('}}\'',i)+2].replace('\\xf4','ô').replace('\\','').replace('"nan"','"-"') d = jsonloads(t) clipcp('|-\n'.join([f"|{{{{flag+link|COVID-19 pandemic in|{d['Country'][i]}}}}}||{d['Confirmed'][i]}||{d['Deaths'][i]}||{d['Case-Fatality'][i]}||{d['Deaths/100k pop.'][i]}\n" for i in d['Country'].keys()]))
Note: the pyperclip copy is optional. It copies the table contents to the clipboard, all needed after running the script is pasting the clipboard in the template source on its correct location.
Hello! I'm Tol, and I've been working on automating updating of COVID-19 data templates using Module:COVID-19 data. I've discussed this with Timeshifter on my talk ( permalink), and I'd like to see what the general opinion is. This would probably entail replacing deaths per hundred thousand with deaths per million, and may also include removing the case–fatality ratio (I could write some custom code to calculate it, but I'd prefer not to, and Timeshifter has brought up problems with it depending on testing rates). Please discuss at Template talk:COVID-19 pandemic death rates#Automation of updates to avoid a discussion fork. Thank you! Tol ( talk | contribs) @ 17:49, 23 September 2021 (UTC)
Jroberson108. See diff. I noticed that row numbers were removed recently: {{ Static row numbers}}.
I would like them returned. This is an expanded table, and many people like row numbers for ranking of any column. Row numbers are on many tables.
Keep {{ Import-blanktable}} for the row highlighting and white background. And so class=srn-white-background does not need to be returned.
Keep the plainrowheaders if they are used with a white background for the row headers. Keep the scopes. -- Timeshifter ( talk) 21:59, 15 January 2022 (UTC)
Not sure if it's my imagination, but I'm pretty sure until recently "World" didn't have a number against it in the left-hand column (which I assume is a simple ranking). This would make sense, since "World" is always at the top. The rank is one of the most impactful and quotable columns (country **** is the ****th worse for xxx), but is now compromised (e.g. at the time of writing, it appears that Romania has the 10th worst rate of deaths, rather than the 9th).
If this has been a glitch of some sort and someone is looking at changing it back, it would be useful to exclude the rank number for the European Union as well - it's interesting to see the grouping but (especially as it moves up the table) misleading. I understand this might be a different issue, since the EU number is sorted with the rest of the data rather than remaining distinct at the top. — Preceding
unsigned comment added by
2A00:23C6:7787:7601:542A:D95F:E851:B897 (
talk)
11:00, 10 December 2021 (UTC)
Tol. Would putting the EU row at the top like this be possible in your system?:
|- class="sorttop static-row-header" | style=text-align:left |European Union||
-- Timeshifter ( talk) 02:10, 11 December 2021 (UTC)
main()
(the main table-generating function), which I don't really want to do — vac()
, a main()
fork for
Template:COVID-19 vaccination data (which has a unique data fallback system) is already getting out of date, or|eu_top=yes
in the template, which would also be very tricky.
The Country Rank number has disappeared completely. Any chance it could be restored, since it's really useful? — Preceding
unsigned comment added by
2A02:C7F:8D60:9000:54D3:21E2:8795:E996 (
talk)
12:22, 16 January 2022 (UTC)
Jroberson108. See diff. Edit summary: "Revert, table's note outside accessibility, as we already discussed."
You left the sort month above the scrolling table after our last discussion. For these templates:
So I thought you understood my point of view. You are making the date inaccessible to the vast majority of readers by burying it in the scrolling table (after one scrolls deep into the table).
So I moved the date of the last update above the scrolling table. To get to the date it is a lot easier to scroll the whole page a couple inches, versus scrolling a couple feet if already deep inside the scrolling table. That is the only way to get back to the date of the last update. -- Timeshifter ( talk) 14:27, 3 February 2022 (UTC)
class="covid19-wrapper"
div element that wraps/contains content, which it currently contains the VTE links, expand/collapse links, table's note, and table in that order. The table note isn't "inaccessible" as you claim and you are misusing the term, probably confusing it with "
usability" (read
accessibility). If the table note were inaccessible, then everything else in the scrolling div would also be inaccessible. If you recall, you asked a visually impaired user to access the content in the scrolling div with their screen reader and I also tested it with Windows Narrator, which we both could access the content without issue.Jroberson108. Am I correct in assuming that the accessibility problem has been solved with this template, even though the note is above the scrolling part?:
And the reason it works is because the note is below the aria div and above the covid19-wrapper div? If so, I assume I can move the note up in this template since it now has the same order after this diff?:
-- Timeshifter ( talk) 15:25, 4 February 2022 (UTC)
This template does not require a rating on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||
|
I have suggested adding this template to COVID-19 pandemic by country and territory, but this would require changing the format of the template to be a box with scrolling, the same as Template:COVID-19 pandemic data. See the discussion at Talk:COVID-19 pandemic by country and territory#Add new template?. Do other editors agree to this change and if so does anyone know how to do it? Dudley Miles ( talk) 11:46, 27 August 2020 (UTC)
(Unindent). The simplest thing may be just to put the template in a fully collapsed table in the other article:
COVID-19 pandemic death rates by country. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Updated July 16, 2024.
|
{| class="wikitable mw-collapsible mw-collapsed" ![[COVID-19 pandemic death rates by country]]. |- |{{Template:COVID-19 pandemic death rates by country}} |}
References
The reference will show up in the article references. I used {{
talk refs}} here to place the references in this talk section.
--
Timeshifter (
talk)
19:28, 27 August 2020 (UTC)
I plan to add this table to COVID-19 pandemic by country and territory and that article uses British style dates. Is it OK if I change the date style in this template in order to avoid inconsistent styles in the article? Dudley Miles ( talk) 10:58, 29 August 2020 (UTC)
See:
Dudley Miles. I suggest using numbered sandboxes. You and others can then keep working on this. From Help:Table:
Sandboxes help a lot. For example; your user page: Special:MyPage. Create and bookmark some personal sandboxes too. Visual Editor will load very fast in empty sandboxes: Special:MyPage/Sandbox, Special:MyPage/Sandbox2, Special:MyPage/Sandbox3. As many as you want. Share the link when asking for help. To find all your sandboxes: Special:PrefixIndex/User: – click link, add user name to the spot labeled "Display pages with prefix:". |
-- Timeshifter ( talk) 06:37, 30 August 2020 (UTC)
I made the table narrower by putting breaks in the headers, and removing width: 6em;
from the CSS:
See diff. On my monitor at the default font size the table went from 9 7/8 inches wide to 8 1/4 inches wide. -- Timeshifter ( talk) 11:53, 30 August 2020 (UTC)
Adding country links is an improvement but how do we stop them being overwritten each time the table is updated? Dudley Miles ( talk) 13:24, 30 August 2020 (UTC)
Timeshifter and RexxS It would be best to link to the article on the COVID-19 outbreak in each country, as Template:COVID-19 pandemic data does. This could be achieved by converting each country name from eg San Marino to {{flag+link|COVID-19 pandemic in|San Marino}}, but is there a way of automating this so that it can be done after each update? Dudley Miles ( talk) 13:39, 30 August 2020 (UTC)
See: COVID-19 pandemic by country and territory. 2 scrolling tables are in the same section.
In list articles with separate tables from different sources it is common to put the source either in the section header or the table caption. See examples:
If the 2 scrolling tables in COVID-19 pandemic by country and territory were put in different sections, then the JHU source could be put in the section header. Then it could be removed again from the template caption.
In COVID-19 pandemic death rates by country the JHU source is mentioned in the lead. So it is not really necessary to repeat the source in the table caption. Because the table is in the section that immediately follows the lead. -- Timeshifter ( talk) 11:29, 2 September 2020 (UTC)
Comment. Please see previous replies. Why subject a blind reader to having to go to a reference in order to find out the difference in 2 tables at COVID-19 pandemic by country and territory? And see diff. I will be removing this template, its talk page, and COVID-19 pandemic death rates by country from my watchlist. I can find much more productive uses of my time. -- Timeshifter ( talk) 16:53, 2 September 2020 (UTC)
If anyone passing by feels like wanting to update this page, it is possible to do it in seconds by using the python script below (written by me, released here as public domain). Please only run if you are able to read it and conclude it is safe by yourself, wikimedia can't take any responsibility for scripts written by contributors. Also note that it works as of 2021-04-16, JHU can change their page formatting, and it would eventually break the script, so use your good judgment to conclude the data being generated is safe. If anything seems not correct please message brunoff asking for a fix or fix the script by yourself. Brunoff ( talk) 01:30, 3 January 2021 (UTC)
from requests import get as reqget from json import loads as jsonloads from pyperclip import copy as clipcp t = reqget('https://coronavirus.jhu.edu/data/mortality').text i = t.find('/static/js/main') t = reqget('https://coronavirus.jhu.edu'+t[i:t.find('.chunk.js"',i)+9]).text i = t.find('{"Country":{') t = t[i:t.find('}}\'',i)+2].replace('\\xf4','ô').replace('\\','').replace('"nan"','"-"') d = jsonloads(t) clipcp('|-\n'.join([f"|{{{{flag+link|COVID-19 pandemic in|{d['Country'][i]}}}}}||{d['Confirmed'][i]}||{d['Deaths'][i]}||{d['Case-Fatality'][i]}||{d['Deaths/100k pop.'][i]}\n" for i in d['Country'].keys()]))
Note: the pyperclip copy is optional. It copies the table contents to the clipboard, all needed after running the script is pasting the clipboard in the template source on its correct location.
Hello! I'm Tol, and I've been working on automating updating of COVID-19 data templates using Module:COVID-19 data. I've discussed this with Timeshifter on my talk ( permalink), and I'd like to see what the general opinion is. This would probably entail replacing deaths per hundred thousand with deaths per million, and may also include removing the case–fatality ratio (I could write some custom code to calculate it, but I'd prefer not to, and Timeshifter has brought up problems with it depending on testing rates). Please discuss at Template talk:COVID-19 pandemic death rates#Automation of updates to avoid a discussion fork. Thank you! Tol ( talk | contribs) @ 17:49, 23 September 2021 (UTC)
Jroberson108. See diff. I noticed that row numbers were removed recently: {{ Static row numbers}}.
I would like them returned. This is an expanded table, and many people like row numbers for ranking of any column. Row numbers are on many tables.
Keep {{ Import-blanktable}} for the row highlighting and white background. And so class=srn-white-background does not need to be returned.
Keep the plainrowheaders if they are used with a white background for the row headers. Keep the scopes. -- Timeshifter ( talk) 21:59, 15 January 2022 (UTC)
Not sure if it's my imagination, but I'm pretty sure until recently "World" didn't have a number against it in the left-hand column (which I assume is a simple ranking). This would make sense, since "World" is always at the top. The rank is one of the most impactful and quotable columns (country **** is the ****th worse for xxx), but is now compromised (e.g. at the time of writing, it appears that Romania has the 10th worst rate of deaths, rather than the 9th).
If this has been a glitch of some sort and someone is looking at changing it back, it would be useful to exclude the rank number for the European Union as well - it's interesting to see the grouping but (especially as it moves up the table) misleading. I understand this might be a different issue, since the EU number is sorted with the rest of the data rather than remaining distinct at the top. — Preceding
unsigned comment added by
2A00:23C6:7787:7601:542A:D95F:E851:B897 (
talk)
11:00, 10 December 2021 (UTC)
Tol. Would putting the EU row at the top like this be possible in your system?:
|- class="sorttop static-row-header" | style=text-align:left |European Union||
-- Timeshifter ( talk) 02:10, 11 December 2021 (UTC)
main()
(the main table-generating function), which I don't really want to do — vac()
, a main()
fork for
Template:COVID-19 vaccination data (which has a unique data fallback system) is already getting out of date, or|eu_top=yes
in the template, which would also be very tricky.
The Country Rank number has disappeared completely. Any chance it could be restored, since it's really useful? — Preceding
unsigned comment added by
2A02:C7F:8D60:9000:54D3:21E2:8795:E996 (
talk)
12:22, 16 January 2022 (UTC)
Jroberson108. See diff. Edit summary: "Revert, table's note outside accessibility, as we already discussed."
You left the sort month above the scrolling table after our last discussion. For these templates:
So I thought you understood my point of view. You are making the date inaccessible to the vast majority of readers by burying it in the scrolling table (after one scrolls deep into the table).
So I moved the date of the last update above the scrolling table. To get to the date it is a lot easier to scroll the whole page a couple inches, versus scrolling a couple feet if already deep inside the scrolling table. That is the only way to get back to the date of the last update. -- Timeshifter ( talk) 14:27, 3 February 2022 (UTC)
class="covid19-wrapper"
div element that wraps/contains content, which it currently contains the VTE links, expand/collapse links, table's note, and table in that order. The table note isn't "inaccessible" as you claim and you are misusing the term, probably confusing it with "
usability" (read
accessibility). If the table note were inaccessible, then everything else in the scrolling div would also be inaccessible. If you recall, you asked a visually impaired user to access the content in the scrolling div with their screen reader and I also tested it with Windows Narrator, which we both could access the content without issue.Jroberson108. Am I correct in assuming that the accessibility problem has been solved with this template, even though the note is above the scrolling part?:
And the reason it works is because the note is below the aria div and above the covid19-wrapper div? If so, I assume I can move the note up in this template since it now has the same order after this diff?:
-- Timeshifter ( talk) 15:25, 4 February 2022 (UTC)