Template talk:Infobox settlement

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Geography (Rated Template-class)
WikiProject icon This template is within the scope of WikiProject Geography, a collaborative effort to improve the coverage of geography on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 Template  This template does not require a rating on the project's quality scale.
 
WikiProject Cities (Rated Template-class)
WikiProject icon This template is within the scope of WikiProject Cities, a collaborative effort to improve the coverage of cities, towns and various other settlements on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
 Template  This template does not require a rating on the project's quality scale.
 

Embedding[edit]

I have added an optional parameter, |embed= which allows this infobox to be embedded into another. for an example, see here. let me know if you see any problems. Frietjes (talk) 20:11, 23 February 2017 (UTC)

Thanks. Should be useful in cases where there's two or more infoboxes (such as for old municipalities).♦ Dr. Blofeld 20:25, 23 February 2017 (UTC)

Affecting output of contained templates[edit]

The {{When}} template doesn't like it inside this infobox - I assume the problem is there rather than here, but in case there is a wider issue I thought I would mention it here - see discussion at : Template_talk:When#Breaks_inside_Infobox_settlement Le Deluge (talk) 20:11, 27 February 2017 (UTC)

responded there. Frietjes (talk) 21:10, 27 February 2017 (UTC)
@Frietjes: For the record, I've come across the same effect on {{dead link}} on stat2-data/stat3-data at King Khalid International Airport (presumably bot-added?) and a {{dubious}} on population_urban on Machiques. I don't know whether it's possible to do a general exclusion on formatnum'ing any templates in the infobox? Le Deluge (talk) 22:01, 27 February 2017 (UTC)

subdivision_name ?[edit]

In the description of the parameter subdivision_name, it says " sample: United States or United States, ". What does this mean? AxelBoldt (talk) 16:47, 9 March 2017 (UTC)

AxelBoldt, it really depends on what is in |subdivision_type=. if |subdivision_type=Country, then |subdivision_name= is the name of the country. Frietjes (talk) 17:09, 9 March 2017 (UTC)
Yes, but why do they say "United States or United States" in the description? Why the repetition? AxelBoldt (talk) 17:17, 9 March 2017 (UTC)
It was changed in this edit back in 2013. That edit looks completely wrong to me. I recommend reverting it, but subsequent changes prevent a straight revert. It will need to be fixed manually. – Jonesey95 (talk) 19:58, 9 March 2017 (UTC)

Kreis Meseritz[edit]

Does anyone know how to fix the infobox in Kreis Meseritz so that it doesn't try to populate the non-existent (and obviously incomplete) Category:Former districts of?

The red-linked category pops up in Special:WantedCategories, where I and others are trying to clear a massive backlog.

A quick smple of Category:Districts of Prussia shows none of them using {{Infobox District DE}}. Is the solution here to remove the infobox from Kreis Meseritz? --BrownHairedGirl (talk) • (contribs) 11:20, 20 March 2017 (UTC)

  • It seems to me that {{Infobox District DE}} tries to be too smart for its own (or Wikipedia's) good. Its piece of code dealing with "Categorisation" doesn't deal with multiple states (as present in Meseritz) nor with historical states like Prussia or Posen. This "cleverness" again demonstrates the pitfalls of categorisation by template. That section in the template code ought to be removed. -- Michael Bednarek (talk) 13:07, 20 March 2017 (UTC)
I hacked it to add a default to the switch statement. – Jonesey95 (talk) 13:28, 20 March 2017 (UTC)

Widespread abuse of the word census[edit]

The word census is popping up everywhere it shouldn't be, its abused all over wikipedia as of 2017. It seems that either the general public or people who edit population information do not understand what is a census, that no nation carries one out annually. There are censuses, intercensal surveys, estimates, and projections, only one is an actual physical count, the others are guesstimates based on a count that itself is prone to error. That makes for a lot of unreliability. Some nations have not bothered to conduct a proper census even once in 30 years, the word census gives the appearance that data is sacrosanct, where it could very well be not even in the ballpark. It seems that a majority of editors of population data on wikipedia attach the word census to any figure without any distinction. For reference, here are listed dates: Population and housing censuses by country. I do not have permission to edit this template documentation, but this guidance should be repeated for quality control, as a minimum in documentation. Doseiai2 (talk) 22:49, 28 April 2017 (UTC)

Please link to an example of an article, or multiple articles, where this alleged abuse is taking place. – Jonesey95 (talk) 00:32, 29 April 2017 (UTC)

settlement_type problem[edit]

settlement_type discussion[edit]

Hello. I install Mediawiki 1.28.2 on XAMPP. I create this template. But when I try use I see that there is a problem. When I use settlement_type then there is occur additional

</th></tr>

code. How I can fix it? --Drabdullayev17 (talk) 17:33, 6 May 2017 (UTC)

Please post a minimal example of an infobox that works here and does not work in your setup (or which has invalid html). Remove everything from the example that is not needed to demonstrate the issue. If no useful response, try WP:VPT. Johnuniq (talk) 02:00, 7 May 2017 (UTC)
NAME
TYPE
Enter {{Infobox settlement|name=NAME|settlement_type=TYPE}} at Special:ExpandTemplates. Result:
<table class="infobox geography vcard" style="width:22em;width:23em"><tr><th colspan="2" style="text-align:center;font-size:125%;font-weight:bold;font-size:1.25em; white-space:nowrap"><span class="fn org">NAME</span><tr><td colspan="2" style="text-align:center;background-color:#cddeff; font-weight:bold;">
<span class="category">TYPE</span></td></tr></th></tr></table>
I think the first row should have ended with </th></tr> before the second began like this:
<table class="infobox geography vcard" style="width:22em;width:23em"><tr><th colspan="2" style="text-align:center;font-size:125%;font-weight:bold;font-size:1.25em; white-space:nowrap"><span class="fn org">NAME</span></th></tr><tr><td colspan="2" style="text-align:center;background-color:#cddeff; font-weight:bold;">
<span class="category">TYPE</span></td></tr></table>
The bad code works here, maybe due to HTMLTidy, but may fail at other wikis. See mw:Manual:Using content from Wikipedia#HTMLTidy. PrimeHunter (talk) 10:05, 7 May 2017 (UTC)

────────────────────────────────────────────────────────────────────────────────────────────────────This has been raised also at VPT. @PrimeHunter: Previewing the following wikitext in a sandbox gives the result shown below.

{{#invoke:dump|dumphtml|1={{Infobox settlement|name=NAME|settlement_type=TYPE}}}}

<table class="infobox geography vcard" style="width:22em;width:23em">
    <tr>
        <th colspan="2" style="text-align:center;font-size:125%;font-weight:bold;font-size:1.25em; white-space:nowrap">
            <span class="fn org">NAME</span>
            <tr>
                <td colspan="2" style="text-align:center;background-color:#cddeff; font-weight:bold;">
                    <span class="category">TYPE</span>
                </td>
            </tr>
        </th>
    </tr>
</table>

You are saying that it should be:

<table class="infobox geography vcard" style="width:22em;width:23em">
    <tr>
        <th colspan="2" style="text-align:center;font-size:125%;font-weight:bold;font-size:1.25em; white-space:nowrap">
            <span class="fn org">NAME</span>
        </th>
    </tr>
    <tr>
        <td colspan="2" style="text-align:center;background-color:#cddeff; font-weight:bold;">
            <span class="category">TYPE</span>
        </td>
    </tr>
</table>

Later, if no one else has a go, I'll look at where that might be happening. Johnuniq (talk) 11:11, 7 May 2017 (UTC)

When I use old template there is no problem. Can somebody find solution? --Drabdullayev17 (talk) 05:13, 8 May 2017 (UTC)

settlement_type analysis[edit]

It appears that all versions of {{infobox settlement}} based on {{infobox}} are mishandling settlement_type. HTMLTidy is correcting the HTML in the output so the problem has not been noticed. See my sandbox2 (permalink) for a demonstration which uses {{infobox settlement/sandbox}} that currently contains the version just before the template was switched to use {{infobox}}.

I think that {{infobox settlement|name=NAME|settlement_type=TYPE}} causes the template to handle settlement_type as below. That causes the HTML output to include the tr row for TYPE in the th header with the NAME.

{{Infobox
...
| above = <span class="fn org">NAME</span>{{infobox|child=yes|decat=yes
  | subheaderstyle = background-color:#cddeff; font-weight:bold;
  | subheader = <span class="category">TYPE</span>
  ...}}
...
}}

This should be fixable. I'll ping a couple of fixers later. Johnuniq (talk) 07:57, 9 May 2017 (UTC)


Is the child infobox needed? Using the example input as above in this section, should the output from this template be as follows?

{{Infobox
| above = <span class="fn org">NAME</span>
| subheaderstyle = background-color:#cddeff; font-weight:bold;
| subheader = <span class="category">TYPE</span>
}}

That produces the infobox and HTML below.

NAME
TYPE
<table class="infobox" style="width:22em">
    <tr>
        <th colspan="2" style="text-align:center;font-size:125%;font-weight:bold">
            <span class="fn org">NAME</span>
        </th>
    </tr>
    <tr>
        <td colspan="2" style="text-align:center;background-color:#cddeff; font-weight:bold;">
            <span class="category">TYPE</span>
        </td>
    </tr>
</table>

Something more would be needed to reproduce the infobox shown in the previous section because it has a box around TYPE.

Johnuniq (talk) 10:38, 9 May 2017 (UTC)


Ping Frietjes and Plastikspork and PrimeHunter. The child infobox has a lot more stuff in it, so perhaps it cannot be removed. Can someone work out its purpose and a solution? Note that Template:Infobox#Porting to other MediaWikis says that HTMLTidy is required! Johnuniq (talk) 11:07, 9 May 2017 (UTC)

Johnuniq, the use of many child infoboxes in this template is mostly a vestige of the days before module:infobox, when there was an upper limit on the total number of rows. I put a new version in the sandbox here which doesn't use child infoboxes. the bigger question is what to do about all the other templates which use child infoboxes. we could probably make something which emits valid HTML, and doesn't require tidy to clean it up (in most cases). the problem is that (a) child boxes are sometimes embedded in header rows and sometimes in data rows, and (b) the parent has no knowledge of the embedding. so, we could (1) have the child emit some sort of marker to signal the parent that there is embedded content, and have the parent fix the HTML so that the resulting markup is valid, or (2) have a way to insert html rows directly into an infobox, without the old embedding hack (e.g., {{infobox | labe1 = foo | data1 = bar | row2 = {{infobox|embed=yes|label1 = something | data1 = else ....}} | ...}}). Frietjes (talk) 13:30, 9 May 2017 (UTC)
Frietjes, it looks like the sandbox version is working. We should definitely use a single infobox whenever it works. Thanks! Plastikspork ―Œ(talk) 20:13, 9 May 2017 (UTC)
Sensational! Thanks Frietjes. I'm afraid I can't think about those points you mentioned at the moment, but I'm probably good for some Lua work later if needed. Johnuniq (talk) 03:34, 10 May 2017 (UTC)

@Drabdullayev17: Frietjes has updated the template and it works well. Johnuniq (talk) 12:10, 10 May 2017 (UTC)

Population estimates[edit]

Northern England (Infobox settlement)
Region
Sovereign state United Kingdom
Country England
Area
 • Region 14,414 sq mi (37,331 km2)
Population (2011 census)
 • Region 14,933,000
 • Estimate (2015) 15,189,032
 • Density 1,000/sq mi (400/km2)
 • Urban 12,782,940
 • Rural 2,150,060
Demonym(s) Northerner

At present, the way this template handles population estimates is confusing - it mixes them up with census population, making it very difficult to tell what year different counts are from. See for instance this box for Northern England. Why is the 2015 population estimate presented as part of the 2011 census data? Are the urban/rural splits from 2011 or 2015? What about the population density? Can the fields be reorganized (either adding the year to each field, or to have two separate groups - one list of estimated populations, one of counted populations? Smurrayinchester 09:04, 22 May 2017 (UTC)

  • I propose to remove estimates altogether. By its very definition, an estimate is unreliable. And as I've noted many times, this field is prone to OR and "guesstimates". -- P 1 9 9   16:08, 23 May 2017 (UTC)
Practically all countries publish reliable, official population estimates (see the UK's for instance). In some cases, it's probably necessary to list these (a boom town or ghost town's population may have changed dramatically since the last census - see for instance New Orleans#Changes in population), and even when it's not, if the data is there why not include it? I don't think there's a case for taking it out altogether. Smurrayinchester 09:57, 24 May 2017 (UTC)
Just because the data exists is not automatically a reason to include it (WP:NOTEVERYTHING). But on the other hand, if it's an official estimate and properly referenced, I would support that. Unfortunately, in my observations, that doesn't seem to happen. Most of the time the estimate is just someone's guess (or taken from an unreliable source). True, I don't work on UK-related articles, so hopefully your experience is different. But I still prefer removing it because it is better to have no data than to have wrong data. -- P 1 9 9   13:18, 24 May 2017 (UTC)