Template talk:COVID-19 pandemic data/Per capita

Table alignment on page
Why does the table hang to the right side of the page? I'm genuinely curious, looked at the markup and couldn't figure it out. Please help! Thank you! Kvwiki1234 (talk) 07:06, 8 June 2020 (UTC)


 * , I think it's likely coded in the class or div-ID, both of which I copied from the non-per capital table. &#123;{u&#124; Sdkb  }&#125;  talk 13:12, 8 June 2020 (UTC)

We're close to having this work properly
You are invited to join the discussion at Village_pump_(technical). &#123;{u&#124; Sdkb  }&#125;  talk 00:07, 9 June 2020 (UTC)

Still problems...
Several of the figures are still wildly inaccurate. For instance, the table reports 20,000 cases per million in Panama (the actual figure is about 4,000) and shows Spain with over 1,000 deaths per million (actually around 600). On the other hand, the table reorts Mauritania with 2 cases per million (it should be around 160) Grutness... wha?   13:31, 11 June 2020 (UTC)
 * , the issue with Panama is because the most recent change to the Wikidata item population count was to enter the 1950 population count. We need to change the mechanism so that it uses the most recent count in terms of year, not most recent in terms of most recent entered value.
 * For Spain, it looks like the Wikidata item hasn't been updated since May and has a death count double what's in the actual tweet used as a source. Not sure why that is.
 * For Mauritania, it looks like it only had 9 cases when the item was last updated in May. &#123;{u&#124; Sdkb  }&#125;  talk 01:46, 12 June 2020 (UTC)
 * For Mauritania, it looks like it only had 9 cases when the item was last updated in May. &#123;{u&#124; Sdkb  }&#125;  talk 01:46, 12 June 2020 (UTC)
 * For Mauritania, it looks like it only had 9 cases when the item was last updated in May. &#123;{u&#124; Sdkb  }&#125;  talk 01:46, 12 June 2020 (UTC)

Faroe Islands is showing as having more cases than inhabitants
Well done for this template, it is very close to working! I just noticed that the template marks Faeroe Islands as having 3 million cases per million inhabitant, which is funny. Probably the table points to the wrong Faeroe Islands Wikidata entry for population. Please also check San Marino and Finland, which seems to have numbers that are very off. Courage for the last modifications and make the table current! Raphaël Dunant (talk) 13:15, 12 June 2020 (UTC)
 * , it looks like the Faeroe Islands thing just popped up with the most recent update. Any idea what's going on? &#123;{u&#124; Sdkb  }&#125;  talk 17:17, 12 June 2020 (UTC)
 * Hey, thanks for the feedback! This is actually working as intended. The population of the Faroe Islands is very small - only 52,154 - so a per million measurement is always going to seem way out. In this case, it's doing 184 cases divided by that figure, and then multiplying out for a million. It may have changed recently as I changed the bot to make sure it understood preferred Wikidata claims - see wikidata:Q87906931 and wikidata:Q4628. Naypta ☺ &#124; ✉ talk page &#124; 17:23, 12 June 2020 (UTC)
 * Ah... no. Ignore that. 3 million per million... yeah that's a problem. I think it's an order of magnitude out... I copied over the multiplication factor from the previous version of this template, but evidently didn't check it well enough! Fixing. Naypta ☺ &#124; ✉ talk page &#124; 17:37, 12 June 2020 (UTC)
 * What had actually happened wasn't anything to do with that, but rather that the preferred claim had a point as a place value separator rather than as a decimal separator, but Wikidata interpreted it as a decimal point. Fixed the entry on Wikidata, and the bot's rerunning now to match. Naypta ☺ &#124; ✉ talk page &#124; 17:46, 12 June 2020 (UTC)

List of countries whose cases per capita is noticeably incorrect
Thanks again for the nice work. Here is the full list of countries where there is a factor of at least two between the real value and the table value, and where the number of cases is greater than 100: I hope this list will help make the table more correct and usable as a source of data for. Raphaël Dunant (talk) 13:31, 13 June 2020 (UTC)
 * Hey, thanks for your work here. How are you calculating this data? Taking, for example, the DRC from this list: my bot takes wikidata:Q87706558's latest figure, 471, and then divides that by the population at wikidata:Q974, 86790567. The template then takes that figure and multiplies up by a factor of a million to get the rate per million - which, indeed, is 5.42. Your table says it ought to be 53 - which is obviously quite a significant difference. How are you generating that? Naypta ☺ &#124; ✉ talk page &#124; 13:37, 13 June 2020 (UTC)
 * The main sources of data for this comparison are Template:COVID-19 pandemic data and List of countries and dependencies by population. For DR. Congo, the official number of infections is 4724 (source). Best. Raphaël Dunant (talk) 14:12, 13 June 2020 (UTC)
 * Thanks, I've updated that specific one, but clearly other Wikidata entries are also out of date if the problem is of this scale. Might you and/or be able to help me out in updating them with the relevant data? Cheers! Naypta ☺ &#124; ✉ talk page &#124; 14:33, 13 June 2020 (UTC)
 * , I saw at some point while I was digging through Wikidata that someone mentioned that Johns Hopkins releases their data in a way that makes it importable to Wikidata, and there was interest in setting it up to do so. I think the more durable solution (as opposed to patchwork fix) is to nudge them to get that up and running. I mean, this is the number one data-related thing happening in the world right now, so they really ought to get their act together and give us more up-to-date figures to work with. &#123;{u&#124; Sdkb  }&#125;  talk 17:38, 13 June 2020 (UTC)
 * If you're aware of where that discussion is, it'd be great to see it - happy to help with the technical heavy lifting for that if I can. Naypta ☺ &#124; ✉ talk page &#124; 17:52, 13 June 2020 (UTC)
 * , found it: wikidata:Wikidata:Requests for permissions/Bot/CovidDatahubBot. Looks like it's in progress. &#123;{u&#124; Sdkb  }&#125;  talk 18:00, 13 June 2020 (UTC)
 * Brilliant, cheers! I've dropped a message over there just notifying the folks involved that we're interested in it, and offering my help if there's anything I can help with. Naypta ☺ &#124; ✉ talk page &#124; 20:06, 13 June 2020 (UTC)
 * Great that you found the bot proposal! It had gotten behind in the priorities ranking for me, but this nudge has made it go quite a few positions up. It has been hard to assemble all the people and asynchronously clean up the way Wikimedia handles this data. Genuinely hard, I've been 3 months deep in trying to do it. I was wondering, would an event maybe help? Like a Wikimedia COVID-19 Case Data Conference/Hackathon/Edit-a-thon ? TiagoLubiana (talk) 00:57, 15 June 2020 (UTC)

Remaining bugs/to do item
For bugs, it looks like South Ossetia isn't generating any data, and the United States isn't generating references. For a to-do item, we should copy over the notes from the main template specifying things like, for Northern Cyprus, Cases from this de facto state are not counted by Cyprus. I hate the fork that that creates (it would be much better if the per capita and non-per capita tables were built off of the same core), but I don't see any easy way to avoid it. &#123;{u&#124; Sdkb  }&#125;  talk 00:46, 15 June 2020 (UTC)
 * US issue fixed - the name in the template for the US references was wrong. South Ossetia has no data available on Wikidata, so some needs to be sourced for it. As to copying notes across, are we sure that those notes still apply, given that the sources on Wikidata may be different to the sources on the main template? Naypta ☺ &#124; ✉ talk page &#124; 08:37, 15 June 2020 (UTC)
 * Looks good; thanks for fixing the Wikidata South Ossetia gap! And that's a good question — I'm not sure how Wikidata handles that. (For Northern Cyprus, it looks like there's a "geoshape" value that defines the border.) Oh, and one other thing we should probably do: get the table to default sort by cases, rather than alphabetically. &#123;{u&#124; Sdkb  }&#125;  talk 00:16, 16 June 2020 (UTC)