Talk:List of countries and dependencies by population density

Demographics of X links
Per WP:EASTEREGG these links, which seemingly lead to each country's page which shows most of what one might want to know about a country, instead go to the Demographics of X page, which show less and more specific material. I myself have always sighed whenever a flag link goes to the Demographics page, because it's never what I'm looking for. The other big lists have dropped such links or never had them. Wizmut (talk) 12:20, 26 November 2023 (UTC)
 * I moved the relevant line closer to the table:
 * Asterisks (*) below are for "Demographics of LOCATION" links.
 * You are the first person I have seen who has complained about having the more relevant links. People who want the general info about a country will see that link at the top of the demographics article. So if you want population info it is better to have demographics links. Most people coming to this list are looking for population info. --Timeshifter (talk) 12:34, 26 November 2023 (UTC)
 * > Most people coming to this list are looking for population info.
 * I would have no idea how to tell without asking people. For myself I'm always looking for a wide variety of things about, say, Georgia, when I click on " Georgia". What are the administrative divisions, the population in each? Where exactly are its borders, what neighbors? Wizmut (talk) 12:44, 26 November 2023 (UTC)
 * I don't think it is an inaccurate assumption on my part. So I think we should aim to keep the most people happy. As I said it is only an extra click to go to the general page. But it is often not easy to quickly find the population info on a general country page. It is often buried in some subsection. And it is not much info compared to the demographics page. --Timeshifter (talk) 12:49, 26 November 2023 (UTC)
 * I guess we just disagree then. Would be interested to here from others and what they tend to look for (random like me or focused like you). Wizmut (talk) 12:54, 26 November 2023 (UTC)
 * @Wizmut: I was never very happy when I first came across this some time ago. I agree that WP:EASTEREGG is being contravened. The links should be to what their text suggests, which is their country article or equivalent. Marking with an asterisk is a possible WP:ACCESSIBILITY issue.
 * If you really want a link to a demographics article, add another column to hold a link: that's what tables are for. I am happy to do that work if needed. Bazza (talk) 13:27, 26 November 2023 (UTC)
 * It is not an accessibility issue. There is a blind editor admin who uses a screen reader, and has commented on stuff on Help:Table, etc.. He has not mentioned any accessibility problems with the asterisks.
 * Making tables wider though hurts access on cell phones, etc.. Narrowing tables is what I often work on.
 * WP:EASTEREGG is not being contravened. There is a line at the top of the table explaining what is going on.
 * See Help:Table
 * It is used on many tables:
 * See Global Search at Toolforge. Search for
 * "{{flagg|us*eft" - in quotes. To get transclusion count and list of articles.
 * --Timeshifter (talk) 14:09, 26 November 2023 (UTC)
 * You've assumed that WP:ACCESSIBILITY concerns only "blind people": wrong. WP:EASTEREGG does not contain any allowance for explanatory notes, which may well be missed. I agree that tables are problematic on mobiles, and I also try to keep them narrow (with difficulty). In this case, a narrow column (with a vertically-aligned column header) containing only a linked {{char|*}} (or similar symbol) linking to the appropriate demographics article would suffice.

{{mw-datatable}}{{sort under}}{{sticky header}}{{table alignment}}{{static row numbers}}
 * {| class="wikitable sortable mw-datatable sort-under sticky-header static-row-numbers col1left" {{right}}

! Location ! class=unsortable {{vertical header|Demographics}} ! Density{{br}}/km{{sup|2}} ! Density{{br}}/mi{{sup|2}} ! Population ! Area{{br}}km{{sup|2}} ! Area{{br}}mi{{sup|2}} ! class="unsortable"|Notes
 * {{flag|Macau}} (China) || * || {{convert|21000|sqmi|km2|disp=table|sortable=on}} || 704,150 || {{convert|33|km2|disp=table}} ||
 * {{flag|Monaco}} || * || {{convert|18000|sqmi|km2|disp=table|sortable=on}} || 36,298 || {{convert|2.0|km2|disp=table}} ||
 * {{flag|Singapore}} || * || {{convert|8250|sqmi|km2|disp=table|sortable=on}} || 6,014,723 || {{convert|729|km2|disp=table}} ||
 * }
 * Bazza (talk) 16:43, 26 November 2023 (UTC)
 * {{flag|Singapore}} || * || {{convert|8250|sqmi|km2|disp=table|sortable=on}} || 6,014,723 || {{convert|729|km2|disp=table}} ||
 * }
 * Bazza (talk) 16:43, 26 November 2023 (UTC)

{{outdent}} Please sign your comment. From WP:EASTEREGG: "Do not use piped links to create 'Easter egg' links that require the reader to open them (or, at least, to hover their mouse pointer on those links to get page previews in the form of navigation popups) before understanding where they lead." By the way, that is a help page, not a guideline or policy page. So it is not holy writ. And see the emphasis I added above.

So it is not a surprise to most people, because there is a line just above the table explaining it. Very few people complain about this.

I like your table. I will probably be adding a version of it to that section of Help:Table I linked to. So people have the option. But it is more work, and not necessary in my opinion. Most people won't add both, I believe.

On the other hand I may not add it to Help:Table, because '''it makes the vertical header height larger. That is a problem with sticky headers on cell phones.'''

See also: Help:Table. Some people have asked for the asterisks to be removed if all instances of the location links are the specialized links. Then there is no need for the asterisk. Just have to be sure to have the explanatory line at the top of the table. And it makes the table slightly narrower. Every little bit counts.

One thing to remember is that it is an easter egg only once for most people who don't read the line above table. Most will remember in the future to read the line. It is cost-benefit analysis in the end. --Timeshifter (talk) 15:31, 26 November 2023 (UTC)


 * @Timeshifter: {{small|Apologies for not signing: I usually leave it to the visual editor to auto-sign, but it didn't want to cooperate when I inserted the table so I reverted to the old-fashioned way and forgot the important bit.}}
 * I was invited by @Wizmut to express an opinion, and have. I don't agree with putting the onus on the reader (who may have other things to also consider when reading an article) to work out that they need to read an instruction before ingesting the data. We'll have to agree to disagree; I won't be making any change to the page. Regards, Bazza (talk) 16:49, 26 November 2023 (UTC)
 * I removed the asterisks themselves but kept the links (although I still disfavor them).
 * But if the links are staying, they should work correctly. One is broken, Palestine. Demographics of the State of Palestine is a valid destination but the template isn't finding it. Demographics of Palestine already redirects to it, so I'm not sure what the problem is.
 * The other outlier is Caribbean Netherlands. But I changed the note to warn the reader that not all entries will lead to a demography page. Wizmut (talk) 01:00, 1 December 2023 (UTC)

Demographics of the State of Palestine
I started this talk subsection so I can refer to it elsewhere while I try to get this problem fixed.

State of Palestine is the current page name. There are over 23,000 direct links to it on Wikipedia. See:
 * https://linkcount.toolforge.org/?project=en.wikipedia.org&page=State+of+Palestine

Demographics of Palestine redirects to Demographics of the State of Palestine

Palestine is the name in the list. But it is a disambiguation page.


 * produces this:

It uses: Template:Country data Palestine

That is the problem. It needs to redirect to Template:Country data State of Palestine

But instead Template:Country data State of Palestine redirects to Template:Country data Palestine

If this were fixed then

would link to Demographics of the State of Palestine, I believe.

See: Template talk:Country data Palestine. --Timeshifter (talk) 01:50, 1 December 2023 (UTC)


 * It has been fixed a different way. See Template talk:Country data Palestine.
 * In the list the link is now as it should be:
 * Demographics of the State of Palestine
 * --Timeshifter (talk) 04:05, 1 December 2023 (UTC)

Maybe alphabetize the list. Easier to maintain
And with static row numbers one can use the sort button to see a ranked list for any column. See example:
 * List of countries by intentional homicide rate

To alphabetize the list quickly:
 * Help:Sortable tables

Once alphabetized it is easy to update the table. Anyone can update a few or many countries. And no moving around countries in the wikitext is ever required again. --Timeshifter (talk) 16:54, 30 November 2023 (UTC)


 * This table has always used UN data except for the few non ISO-3166 entries. Similar to List of countries by population (United Nations). This means one update a year, really.
 * There are advantages to being able to see the most densely population places without having to know how to sort wikitables. Wizmut (talk) 19:36, 30 November 2023 (UTC)
 * There are very few people left on the web who don't know how to click a sorting button on a table. They are common across the web.
 * I guess it depends on how often individual locations are updated in between yearly updates. And if there is someone around to fix the order in the wikitext if necessary. --Timeshifter (talk) 23:38, 30 November 2023 (UTC)
 * You'd be surprised what people don't know. And it seems like putting the needs of editors ahead of the users. Talking about the cases of the very few, there aren't many editors who don't know how to cut and paste, especially among page watchers.
 * Country lists of different topics have different editors, but all of the most prominent ones sort by their topic, not alphabetically. A broad consensus. Wizmut (talk) 23:48, 30 November 2023 (UTC)
 * Many people don't know about the existence of Template:Static row numbers.
 * Some people may want to see ranking by population, and not just density. Can't do that with a row number column that is not static. --Timeshifter (talk) 00:00, 1 December 2023 (UTC)
 * If they want to see the ranking of countries by population then they should head to List of countries and dependencies by population and/or List of countries by population (United Nations). And it seems that they already are, as the main population article is viewed three times as much as this density one.
 * The only reason the population and area are included is because there's room and readers are likely to be curious about the data the density is derived from. But they're here for density, and more than that, density extremes. Wizmut (talk) 00:12, 1 December 2023 (UTC)
 * Slipped my mind that we now use Template:Static row numbers here. So it is possible to rank any column now. So it is OK to start with one column in rank order, as long as it is maintainable. A list that is mainly updated once a year makes that more possible. Though the editors that do that maintenance sometimes leave Wikipedia for awhile. Then the list can become a mess if editors only update individual countries, but not their order in the list. --Timeshifter (talk) 01:13, 1 December 2023 (UTC)

Gaza
gaza is 25 x 5 and has 2 million people. Making the density 21,000/square mile

Sourcing

https://www.cnn.com/2023/10/11/middleeast/maps-population-density-gaza-israel-dg/index.html Teenyplayspop (talk) 01:49, 14 December 2023 (UTC)

Source needed
@EldritchEmpress please attach a source to edits which deviate from the default UN source. The footnote column on the left can be used for each. Regards, Wizmut (talk) 13:18, 1 January 2024 (UTC)


 * My apologies, the Japan edit was a mistake on my part since I didn't expect the number to go down. Here's the source for Nigeria: https://www.cia.gov/the-world-factbook/countries/nigeria. I'll wait for a reply before aditing in case something else comes up. EldritchEmpress (talk) 16:04, 1 January 2024 (UTC)
 * Go ahead and edit the page again to add the source. The simplest example to follow might be the Gibraltar entry, or perhaps the Monaco or Vatican entry if more details are required. Wizmut (talk) 16:12, 1 January 2024 (UTC)

New template that might help
Hi! I just created Template:Get cell. It basically allows to get the content of any table cell (A1, B2, C7, etc) and re-use it other cells for subsequent calculations. I figured it could be useful in tables such as the one in this article. Sophivorus (talk) 14:24, 30 April 2024 (UTC)