Talk:List of South American countries by population
This article is rated List-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||||||||||
|
Reversion
[edit]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)
- 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)
- 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)
Using Lua to get the data
[edit]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}}
Country | Projected population (27 November 2024) | Pct of total | UN Population estimates | Annual growth | Doubling time (years) | ||
---|---|---|---|---|---|---|---|
1 July 2023 | 1 July 2022 | Increment | Rate | ||||
Brazil | 212,322,199 | 48.63% | 211,140,729 | 210,306,415 | 834,314 | 0.40% | 175 |
Colombia | 53,154,280 | 12.17% | 52,321,152 | 51,737,944 | 583,208 | 1.13% | 62 |
Argentina | 45,722,955 | 10.47% | 45,538,401 | 45,407,904 | 130,497 | 0.29% | 242 |
Peru | 34,374,292 | 7.87% | 33,845,617 | 33,475,438 | 370,179 | 1.11% | 63 |
Venezuela | 28,425,112 | 6.51% | 28,300,854 | 28,213,017 | 87,837 | 0.31% | 223 |
Chile | 19,808,916 | 4.54% | 19,658,835 | 19,553,036 | 105,799 | 0.54% | 128 |
Ecuador | 18,202,531 | 4.17% | 17,980,083 | 17,823,897 | 156,186 | 0.88% | 79 |
Bolivia | 12,483,457 | 2.86% | 12,244,159 | 12,077,154 | 167,005 | 1.38% | 50 |
Paraguay | 6,963,846 | 1.59% | 6,844,146 | 6,760,464 | 83,682 | 1.24% | 56 |
Uruguay | 3,384,094 | 0.78% | 3,388,081 | 3,390,913 | −2,832 | −0.08% | −830 |
Guyana | 833,046 | 0.19% | 826,353 | 821,637 | 4,716 | 0.57% | 121 |
Suriname | 637,040 | 0.15% | 628,886 | 623,164 | 5,722 | 0.92% | 76 |
French Guiana | 310,732 | 0.07% | 303,402 | 298,306 | 5,096 | 1.71% | 41 |
Falkland Islands | 3,459 | 0.00% | 3,477 | 3,490 | −13 | −0.37% | −186 |
Total | 436,625,959 | 100% | 433,024,175 | 430,492,779 | 2,531,396 | 0.58% | 118 |
A few comments of differences and issues:
- The preprocessor visited node count is only 1,164. This means much larger tables can be used.
- The data is sorted. This means if the projected population order changed, this is handled automatically.
- I added the two columns for the years with actual data. A proper module could make columns optional.
- The total is calculated from the country data.
- 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.
- 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.
- 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)
- 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.:
Update
[edit]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.
{{#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) |slices=10 |other=yes}}
- 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)
- @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)
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}} andtemplatestyles
. 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)
Complete update
[edit]I have added official figures and dates with detailed sources, so that the article no longer relies on a single source. To make room, I removed the doubling time and absolute change columns. I also added a map and tweaked the pie chart and See also section. I made a column for notes but there are currently none. Wizmut (talk) 03:27, 28 June 2023 (UTC)