Template talk:Infobox settlement

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Stray tags[edit]

When I imported this template to a local wiki for testing purposes, a stray </th></tr> tag appears: I have Scribunto installed already. What am I missing in the import? Thanks in advance. --Marianian(talk) 12:56, 5 September 2015 (UTC)

Are you saying that when using the imported template, the html output has stray tags? Please provide a very brief example of input which shows the problem. When viewing the html source, quote a bit of the text which includes a stray tag so people here can see where it occurs. A confounding issue is that Wikipedia uses HTML Tidy so stray tags may be generated here as well, but they are removed. If you don't get an answer here, a better place for tricky problems is WP:VPT. Johnuniq (talk) 02:51, 6 September 2015 (UTC)
Hi, here is the example: https://nsindex.net/wiki/Vorbarr_Sultana. As far as I know I have already imported the dependencies. --Marianian(talk) 11:36, 7 September 2015 (UTC)
may be coming from Template:Infobox settlement/columns, but who knows since I can't make test edits on your site. here, as pointed out, we use the HTML Tidy extension to clean most of these up. Frietjes (talk) 12:57, 6 October 2015 (UTC)

TD and file description[edit]


could you add table data to this template and move the position of file description just next to the file. It would shorten our time necessary to edit Wikipedia, which will lead to the editor happiness being able to add more information in the short time. Thx!--Juandev (talk) 10:06, 10 September 2015 (UTC)

not sure what you are asking. Frietjes (talk) 13:05, 6 October 2015 (UTC)

Merging the PH wikidata[edit]

currently, many Philippines articles are using template:PH wikidata to grab settlement-specific data from wikidata for use in this template. It has been proposed a couple times that we should just merge that template with this one. Basically, any field that isn't specified in the infobox could be populated from wikidata if the information exists on wikidata. for an example of the fields that would be potentially imported, see template:PH wikidata. basically, the plan would be to make the 'PH wikidata' a subtemplate of this template, and use it if the information is not specified in the infobox in the article. in other words, the order would be (1) article, (2) wikidata. the other option would be to check wikidata first, so the order would be (1) wikidata, (2) article. a third/fourth option would be either of the first two options, but only turn on this feature if someone specifies |use_wikidata= in the infobox. comments? suggestions? thank you. Frietjes (talk) 13:05, 6 October 2015 (UTC)

Thanks Frietjes. In order to take full advantage of Wikidata's intended purpose and features, I would propose that the Wikidata would become the default for populating the templates, with the option to enter data in the articles (as usual) to override Wikidata or to provide info not yet in Wikidata. That way transition would be seamless. -- P 1 9 9   13:48, 6 October 2015 (UTC)
I'd definitely welcome linking the infobox with Wikidata population - I feel that the current practice of updating population figures in every single Wikipedia edition is hugely wasteful.
The infobox should also be able to track discrepancies between Wikipedia and Wikidata, i.e. to detect if the WD population is different to that in the infobox and signalize it by using a tracking category.
However, that's the easy part, because there are some tricky implementation issues:
  1. Simply invoking the P1082 property - like {{PH wikidata}} currently does - won't work correctly when there are multiple statements referring to different points in time. If that's the case, I suppose we need to iterate over all statements and fetch only the one which refers to the most recent point in time. That would require Lua scripting IIRC.
  2. Like {{PH wikidata}}, we need to fetch the determination method too (P459): is it a census or an estimate? Tricky bit: if there is at least one census figure, should we (always?) override it with more recent estimate figures?
  3. If we actually draw a population figure from Wikidata, what happens with |population_footnotes=? It is not a good idea to decouple referencing from the figure itself (i.e. allow the possibility for the figure to change while the ref stays the same), but what to do instead then?
  4. Differentiating between urban, rural and metro populations might be tricky too. Not sure if Wikidata supports these qualifiers.
Not entirely straightforward... GregorB (talk) 20:33, 20 October 2015 (UTC)
Thanks for pointing out some of the intricacies. I think we should focus on getting those improvements in that are straightfoirward, rather than trying to replace this derivative template at once. I'd be happy to prepare a new sandbox version introducing the easier cases first (possibly including some of Template:Infobox Syrian district, too), as soon as the flaws I came up with are fixed. Cheers, PanchoS (talk) 17:16, 24 October 2015 (UTC)
I agree, it is better to start with simpler properties - population seems to be rather challenging, although it would have been a big win. GregorB (talk) 20:54, 24 October 2015 (UTC)

Template-protected edit request on 24 October 2015[edit]

Please commit my latest edit from sandbox to fix a logic error:

{{{population_total}}} is expected to be displayed in a mergedtoprow unless a {{{total_type}}} is specified. This behaviour is helpful, whenever the infobox holds only population data of a single scope. The current, flawed logic (involving an &nbsp;) however prevents merging {{{population_total}}} with the top row unless &nbsp; is specified as {{{total_type}}}.

If I merged the 58 and 59 fields, this is only for simplicity, because only either of these will ever be rendered: "Population" shows up as a header, unless there is data in the same field. Note that I hesitated to renumber the following ones because it didn't seem to make too much sense.

Cheers, PanchoS (talk) 17:01, 24 October 2015 (UTC)

For backwards compatibility, perhaps it would be better if a blank {{{total_type}}} had no effect, and "&nbsp;" were simply replaced with something that makes sense, like "none". Alakzi (talk) 17:34, 24 October 2015 (UTC)
Red information icon with gradient background.svg Not done for now: Please reactivate the edit request when you have reached a consensus for how the template should be changed. Best — Mr. Stradivarius ♪ talk ♪ 06:14, 25 October 2015 (UTC)

Population density not displaying[edit]

On this page, I have tried multiple variations and pop density will not display. B137 (talk) 20:14, 17 November 2015 (UTC)

I figured it out but it brings up a bigger issue.


There is no clear way of adding a citation for population density, and due to automatic calculations you cannot add it manually after the figure. They seem to be implying that a reference is not needed because Wikipedia can just divide the population total by the land area, but that is concocting data, which is usually admonished no matter how obvious or intuitive it is. B137 (talk) 20:24, 17 November 2015 (UTC)

Not necessarily - see WP:CALC. GregorB (talk) 20:30, 17 November 2015 (UTC)