User:Timeshifter/Sandbox119

From Wikipedia, the free encyclopedia

Scrollable table below now has sticky header row that stays visible while scrolling. See also:

See also: User:Timeshifter/Sandbox118

Modeled on this template:

Trying to only use its external style sheet:

  • Template:COVID-19 pandemic data/styles.css

At first I had to add this to get the country column text to align left:

  • Template:COVID-19 pandemic death rates by country/styles.css

The only part of the CSS from the link just above that was needed:

/* styling for first column */
.covid19-deathbycountry tr>:first-child {
	text-align:left;
}

A variation of it has been added to Template:COVID-19 pandemic data/styles.css

/* Column of country names left aligned when names are in first column. */
/* For John Hopkins table. */
.covid19-countrynames tr>:first-child {
	text-align:left;
}

So now the sandbox table, and the template table work fine. See i:

Table is updated by copying just the data wikitext (no header wikitext) from here:

Hidden notes in the template below show where to copy and paste the data wikitext.

{{nowrap}} has been removed from the caption. Non-breaking spaces are now in the date: 5 September 2020. Caption goes to 2 lines when zoomed high enough. Caption still disappears when scrolling. Regardless of the caption length, at a high enough zoom level the table extends beyond its scrollbox size horizontally. This happens when the header words are wide enough. These words: confirmed, population. Also, the country names.

Scrollable table with sticky header row

More information Country, Confirmed cases ...
Country Confirmed cases Deaths Case fatality rate Deaths per 100,000 population
 San Marino735425.7%124.32
 Peru657,12929,0684.4%90.87
 Belgium85,9119,89811.5%86.66
 Andorra1,199534.4%68.83
 United Kingdom340,92941,60212.2%62.57
 Spain479,55429,1946.1%62.48
 Chile414,73911,3442.7%60.57
 Brazil3,997,865123,7803.1%59.09
 Italy271,51535,49713.1%58.74
 Sweden84,5325,8206.9%57.15
 United States6,113,510185,7203.0%56.77
 Mexico610,95765,81610.8%52.16
 Panama94,0842,0302.2%48.60
 Bolivia117,9285,2034.4%45.83
 France331,06030,6929.3%45.82
 Colombia633,32120,3453.2%40.98
 Ecuador115,4576,6195.7%38.74
 Ireland29,1141,7776.1%36.61
 Netherlands74,6606,2678.4%36.37
 Armenia44,0758842.0%29.95
 North Macedonia14,6006064.2%29.09
 Moldova37,7401,0242.7%28.88
 Iran378,75221,7975.8%26.65
 Kosovo12,6834883.8%26.45
 South Africa630,59514,3892.3%24.90
 Canada131,9419,1827.0%24.78
 Switzerland42,7632,0114.7%23.61
 Argentina439,1729,1182.1%20.49
 Luxembourg6,7451241.8%20.40
 Honduras62,5261,9243.1%20.07
 Romania89,8913,7214.1%19.11
 Bosnia and Herzegovina20,5176273.1%18.86
 Iraq242,2847,2013.0%18.74
 Portugal58,6331,8273.1%17.77
 Kyrgyzstan44,0361,0592.4%16.77
 Montenegro5,0191042.1%16.71
 Dominican Republic95,6271,7651.8%16.61
 Guatemala75,6442,7903.7%16.18
 Oman85,9286890.8%14.27
 Kuwait86,4785350.6%12.93
 Suriname4,149721.7%12.50
 Bahrain52,8071900.4%12.11
 Russia1,001,96517,3651.7%12.02
 Saudi Arabia317,4863,9561.2%11.74
 El Salvador25,9047312.8%11.38
 Germany247,4119,3223.8%11.24
 Israel121,4649690.8%10.91
 Denmark17,6206263.6%10.80
 Albania9,7282963.0%10.33
 Serbia31,5817162.3%10.25
 Bulgaria16,6176483.9%9.23
 Costa Rica43,3054531.0%9.06
 Kazakhstan106,0321,5881.5%8.69
 Austria27,9697342.6%8.30
 Eswatini4,668942.0%8.27
 Turkey273,3016,4622.4%7.85
 Cape Verde4,048411.0%7.54
 Belarus72,1416911.0%7.28
 Qatar119,2061990.2%7.15
 São Tomé and Príncipe896151.7%7.11
 Slovenia2,9791344.5%6.48
 Equatorial Guinea4,965831.7%6.34
 Hungary6,6226199.3%6.34
 Djibouti5,387601.1%6.26
 Finland8,1613364.1%6.09
 Ukraine128,8332,7052.1%6.06
 Maldives8,140290.4%5.62
 Egypt99,2805,4615.5%5.55
 Poland68,5172,0783.0%5.47
 Azerbaijan36,7325381.5%5.41
 Guyana1,382413.0%5.26
 Paraguay19,1383581.9%5.15
 India3,853,40667,3761.7%4.98
 Norway11,0342642.4%4.97
 Estonia2,415642.7%4.85
 Croatia10,7251911.8%4.67
 United Arab Emirates71,5403870.5%4.02
 Czech Republic25,7734251.6%4.00
 Afghanistan38,2431,4093.7%3.79
 Libya15,1562501.6%3.74
 Mauritania7,0891602.3%3.63
 Algeria45,1581,5233.4%3.61
 Palestine23,8751620.7%3.55
 Philippines226,4403,6231.6%3.40
 Belize1,101131.2%3.39
 Morocco65,4531,2161.9%3.38
 Namibia7,844821.0%3.35
 Antigua and Barbuda9433.2%3.12
 Lithuania2,958862.9%3.08
 Pakistan297,0146,3282.1%2.98
 Indonesia180,6467,6164.2%2.85
 Iceland2,121100.5%2.83
 Australia26,0496782.6%2.71
 Bangladesh317,5284,3511.4%2.70
 Malta1,931130.7%2.69
 Lebanon18,3751771.0%2.58
 Greece10,7572732.5%2.54
 Gabon8,538530.6%2.50
 Barbados17674.0%2.44
 Nicaragua4,6681413.0%2.18
 Trinidad and Tobago1,920281.5%2.01
 Sudan13,1898236.2%1.97
 Congo4,6281022.2%1.94
 Haiti8,2582062.5%1.85
 Guinea-Bissau2,205341.5%1.81
 Senegal13,7432872.1%1.81
 Cyprus1,495211.4%1.77
 Latvia1,406342.4%1.76
 Liberia1,305826.3%1.70
 Zambia12,4152922.4%1.68
 Cameroon19,4604152.1%1.65
 Lesotho1,085312.9%1.47
 Zimbabwe6,6382063.1%1.43
 Venezuela48,8833980.8%1.38
 Central African Republic4,712621.3%1.33
 Uruguay1,626442.7%1.28
 Kenya34,4935811.7%1.13
 Japan69,6191,3271.9%1.05
 Uzbekistan42,4373270.8%0.99
 Malawi5,5791753.1%0.96
 Sierra Leone2,029713.5%0.93
 Ghana44,6582760.6%0.93
 Nepal41,6492510.6%0.89
 Cuba4,126982.4%0.86
 Comoros42771.6%0.84
 Jamaica2,683240.9%0.82
 Mauritius356102.8%0.79
 Ethiopia54,4098461.6%0.77
 Tajikistan8,654690.8%0.76
 Madagascar15,0231961.3%0.75
 Tunisia4,196811.9%0.70
 Brunei14432.1%0.70
 Mali2,8021264.5%0.66
 Somalia3,310983.0%0.65
 South Korea20,6443291.6%0.64
 Slovakia4,042330.8%0.61
 Nigeria54,4631,0271.9%0.52
 Georgia1,548191.2%0.51
 Chad1,017777.6%0.50
 Singapore56,860270.0%0.48
 Guinea9,479590.6%0.48
 Ivory Coast18,1611170.6%0.47
 New Zealand1,759221.3%0.45
 South Sudan2,532471.9%0.43
 Malaysia9,3601281.4%0.41
 Togo1,434302.1%0.38
 Angola2,7771124.0%0.36
 Benin2,194401.8%0.35
 China89,9534,7275.3%0.34
 DR Congo10,1142592.6%0.31
 Niger1,176695.9%0.31
 Burkina Faso1,370554.0%0.28
 Botswana1,72460.3%0.27
 Jordan2,161150.7%0.15
 Rwanda4,218170.4%0.14
 Mozambique4,117250.6%0.08
 Thailand3,427581.7%0.08
 Uganda3,112321.0%0.07
 Papua New Guinea47151.1%0.06
 Sri Lanka3,101120.4%0.06
 Tanzania509214.1%0.04
 Vietnam1,046343.3%0.04
 Taiwan48971.4%0.03
 Yemen1,97657128.9%nan
 Syria2,8981204.1%nan
 Gambia3,067973.2%nan
 Bahamas2,337502.1%nan
Diamond Princess712131.8%nan
 Burma99560.6%nan
Close

Related Articles

Wikiwand AI