Talk:List of South American countries by population

Add topic
Active discussions

External links modifiedEdit

Hello fellow Wikipedians,

I have just modified 2 external links on List of South American countries by population. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:

When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.

This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}} (last update: 18 January 2022).

  • If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
  • If you found an error with any archives or the URLs themselves, you can fix them with this tool.

Cheers.—InternetArchiveBot (Report bug) 10:18, 27 December 2017 (UTC)


As I mentioned to you on the template talk page, Jonesey95, this version you reverted to has far greater problems than a comma on the date. The population figures are completely off from current estimates and the calculated numbers totally divorced from them. Guarapiranga (talk) 06:27, 22 November 2019 (UTC)

The data in the current version of the article is sourced. The version as of 9 November 2019 is full of red error messages, a "Rank" column that is disconnected from the table (and makes no sense if the table is sorted), has year values with commas in them, and much more. This is a live encyclopedia that is shown to readers around the world. If there is a version of the article with accurate data that does not have these rendering errors, use that version. If you can fix the template, do so. – Jonesey95 (talk) 15:12, 22 November 2019 (UTC)
As I said in the template talk page, I couldn't fix it, Jonesey95. You said you can, so why didn't you?
The current data shown, not only is not sourced (calculated figures are divorced from population numbers with no audit trail, i.e. they're not verifiable), but also way out of date. The rank column is not disconnected from the table, it's fixed (as recommended at Help:Tables for tables with more than one sortable column). Guarapiranga (talk) 20:12, 22 November 2019 (UTC)
I played around in the template's sandbox for a bit, created a testcases page, and updated the template's documentation, but it would have taken me multiple hours to learn and re-learn the needed string manipulation templates. I am a volunteer, as are most of us here, and I prefer to spend my time on other tasks. As I said on the template's talk page, I was inclined to let you have the first crack at it. The testcases page should help you. Take one piece at a time. In the meantime, you can update this article if there are new sources; just please don't use buggy templates to do it. – Jonesey95 (talk) 20:36, 22 November 2019 (UTC)
Jonesey95 Guarapiranga The figures on the reversion are a little out of date, I will have a go updating it on the weekend. I think it is a bit of overkill to do a template in order to link it to a population clock; population doesn't change much within 6 to 12 months - the figures just need to be indicitive that you get a relative comparison between countries. Having one respected source for the entire page for these type of demographic and economic country lists (commonly CIA World Factbook, IMF, World Bank) I believe instills a lot more confidence to the reader than linking to seperate sources for every entry, with each country's statistical agency having different methodologies, varied competencies and update frequencies. Maranello10 (talk) 09:57, 28 November 2019 (UTC)
There, fixed and updated to the latest UN figures. Guarapiranga (talk) 23:19, 30 November 2019 (UTC)

Using Lua to get the dataEdit

Following the discussion at the Village pump, I put together a prototype Lua function to generate a similar table, using the section markup in List of countries by population (United Nations).

{{#invoke:Country population|populations|ARG|BOL|BRA|COL|PER|VEN|XXX|CHL|ECU|PRY|URY|GUY|GUF|SUR|FLK}}
CountryProjected population
(4 February 2023)
Pct of
UN Population estimatesAnnual growthDoubling time
1 July 20191 July 2018IncrementRate
  French Guiana309,4840.07%282,731275,7137,0182.55%28
  Falkland Islands3,9460.00%3,3773,2341434.42%16

A few comments of differences and issues:

  1. The preprocessor visited node count is only 1,164. This means much larger tables can be used.
  2. The data is sorted. This means if the projected population order changed, this is handled automatically.
  3. I added the two columns for the years with actual data. A proper module could make columns optional.
  4. The total is calculated from the country data.
  5. I still haven't solved the rounding after the maths calcualtions (projected population and doubling time). For some reason the zero precision rounding doesn't work in the function I use after these calculations, but does for the simpler percentage calculations. This is presumably fixable.
  6. The projected population numbers are different. This is because the time factor calculated using {{a.y}} is rounded to 1.4 rather than using higher precision.
  7. This function uses the section markup in the list article. Using data in a subpage is an alternative, that might be easier to update.

If you think this is a good idea, this could be made into a more flexible module. Any thoughts?   Jts1882 | talk  08:17, 9 December 2019 (UTC)

This is excellent, Jts1882, thank you. The only thing I'd like to suggest is using {{significant figures}} for the pcts, so Falkland Islands—or other similarly small entries in other tables—don't show up as zero.
Also, the projected population doesn't need to show decimals (I think).
And if you could go ahead and total the previous population column, so we can fill out the rest of the calculated cells, that'd be great.
For this case, putting the data in a subpage may indeed be the best compromise between flexibility and stability, but in others—typically those amalgamating data from various sources, e.g. national population statistics—it may be better to pulling the data via the markup, so common editors without knowledge of Lua can ensure it stays correct and current. Guarapiranga (talk) 08:33, 9 December 2019 (UTC)
This was just a first pass at something that works to show the principle. Now you've shown interest I will put it into a module and organise the code properly. I know there is an issue with the rounding and agree that significant figures is better, but these are details that must have solutions.
An example of a data subpage is this FIFA World Rankings one used for sports rankings tables. They are easily updated with the help of Excel. A module subpage could also hold population data for many years if desired. While there is something to be said for making the pages editable by anyone, the section markup makes it difficult to update. Data only needs to be updated occasionally, while page content describing and putting the data into context remains readily editably. You could argue that removing huge blocks of data tables makes it easier to edit the rest of the content.
I'm going to think about this a bit. Yesterday was just a bored rainy day activity. Please feel free to add any suggestions or ideas here.   Jts1882 | talk  09:31, 9 December 2019 (UTC)
As for markup, what I found is that it doesn't stand in the way of edits via VE; VE simply puts the cell contents first in the cell, so the beginning section markup needs to be put at the end of the formatting part of the cell, e.g.:
| style="…" <section begin=name1/> | cell 1 || <section end=name1/> style="…" <section begin=name2/> | cell 2 || <section end=name2/> …
Guarapiranga (talk) 21:48, 9 December 2019 (UTC)


I've created Module:Country population and the table above now uses the updated version. The only thing I haven't done is put significant figures on the % of total column. I'm looking for the best way of doing this. It's probably best if this is called from a template, which will need a few changes. Any thoughts on template name? Or should it just be an option for {{Country population}}?   Jts1882 | talk  16:52, 10 December 2019 (UTC)

I've added a piechart function.

South American population by country (top 10)

  Brazil (49.4%)
  Colombia (11.8%)
  Argentina (10.5%)
  Peru (7.6%)
  Venezuela (6.7%)
  Chile (4.4%)
  Ecuador (4.1%)
  Bolivia (2.7%)
  Paraguay (1.6%)
  Uruguay (0.8%)
  Other (0.4%)
{{#invoke:Country population|piechart|ARG|BOL|BRA|COL|PER|VEN|XXX|CHL|ECU|PRY|URY|GUY|GUF|SUR|FLK
|caption=South American population by country (top 10)
It is a wrapper for the {{Pie chart}} but automatically retrieves the data for the listed countries from the UN population article for the |label= and |value= parameters. The |slices= parameter determines the number of countries to show as slices, with the remainder going in other.   Jts1882 | talk  08:13, 14 December 2019 (UTC)
@Jts1882: Is the module ready for release? The article is broken and fixing it would be ugly. It relies on lots of code to extract numbers from named sections which complicates the wikitext. I believe the fundamental problem at the moment is that the total is calculated by an amazing template which adds up numbers from various named sections. However, that total is used to generate the pie chart, and adjusting the total section to include the total template does not work. Before the last edit, a hard-coded value for the total made the pie chart work, but there were then two total values (slightly disagreeing which each other!) and they were concatenated in the article. Johnuniq (talk) 09:49, 7 June 2020 (UTC)
@Johnuniq: I haven't done anything since the above comment; the discussion petered out. It looks like it is getting the numbers from the UN population page correctly and both table and piechart look OK. It would be best if someone else can double check the numbers, but the current state of the article is far from ideal. I think it's ready to fix this article, but if it is to be used more widely would need further work.
The thing I couldn't get to work properly was the static rank column. It is fine most of the time, but fails to align on some screen sizes and zooms, which is unsatisfactory. —  Jts1882 | talk  11:53, 7 June 2020 (UTC)
@Jts1882: Thanks, that's much better! One glitch is that you have a nice minus sign for Venezuala's increment, but just a hyphen for the negative percentage. If you fix that, please also remove the hidden comment in line 2 of the article which complains about the hyphen that occurred from the old wikitext. I gave the numbers a rough check and they seem good. I know very little about complex tables but I wouldn't think it was possible to have the static rank column always aligned. You could incorporate it into the table as was done before which would make it not static—that could be regarded as a feature? Anyway, it's working and is much cleaner. Johnuniq (talk) 04:09, 8 June 2020 (UTC)

Remove numbering for French Guiana and Falkland Islands?Edit

Can we remove the numbering for dependent territories, similar to what is done on the List of Oceanian countries by population and the List of European countries by population? Cstanford.math (talk) 20:05, 2 September 2021 (UTC)

I've added handling for a norank parameter, e.g. |norank=FLK,GUF by Module:Country population.
This adds the class static-row-numbers-norank which suppresses the display of rank and increment for the automatic row numbering using {{static row numbers}} and templatestyles. This new class can be used in any table using {{static row numbers}}. —  Jts1882 | talk  09:07, 3 September 2021 (UTC)
Awesome, that's great that there's already a parameter for that. Thanks! Cstanford.math (talk) 00:05, 4 September 2021 (UTC)