Template talk:Croatian Census 2011

HTML tables
I'm thinking of a way to streamline the process of referencing HTML tables. What bugs me at the moment is that there are 21 different URLs (and potentially 21 different titles) for "Population by age and sex, by settlements". So, for e.g. Krapina-Zagorje, with the current template it's: (1)

Rather unwieldy. Sure, one could simply paste the URL, but the title is all caps originally and can't be readily pasted. What I would prefer - and it's not that difficult to implement - is something like:

(2)

or perhaps even:

(3)

I'd keep the url and title parameters though for manual override. GregorB (talk) 15:27, 24 December 2012 (UTC)


 * Um... That's 21 different URLs for "Population by age and sex, by municipalities"; for settlements, there are as many URLs as there are municipalities in Croatia, i.e. 400+. That's nasty. I'll try to figure out a solution. GregorB (talk) 22:33, 27 December 2012 (UTC)
 * Short of using a 400-case switch statement, I think I have it. Shown in the Examples table. GregorB (talk) 23:01, 27 December 2012 (UTC)
 * Slightly amended the above examples. The way template is implemented now, (1) and (2) should behave exactly the same, which hopefully illustrates why (2) is convenient - yet, the user is free to go with (1) if (s)he so chooses. On the other hand, (3) would help slightly with per-county tables, but unfortunately not with per-municipality tables. GregorB (talk) 23:39, 27 December 2012 (UTC)
 * Now it's:

(4)
 * with an automatically decoded county name, works the same as (2). Can't think of anything much "smarter" than that. GregorB (talk) 13:01, 28 December 2012 (UTC)

Remaining questions

 * 1) Are template parameters OK, generally speaking? I'm considering shortening TC, TE, TR to just C, E, R respectively (contingents, ethnicity, religion - "town/municipality" is implied).


 * Is there another option, other than "town/municipality"? --Joy &#91;shallot&#93; (talk) 07:49, 7 January 2013 (UTC)
 * Basically the options present themselves here: http://www.dzs.hr/Eng/censuses/census2011/results/censustabshtm.htm. The template might be expanded to cover some more. (But I don't really see anything worthwhile, as title and url can be supplied by hand just as well.) GregorB (talk) 08:54, 7 January 2013 (UTC)
 * Yes, that's what I meant, it's doubtful that the others are worth implementing. --Joy &#91;shallot&#93; (talk) 21:28, 7 January 2013 (UTC)
 * Population by mother tongue might be somewhat interesting and could be implemented easily should the need arise. The rest would, if implemented, have a very small number of transclusions. I'm therefore simplifying TC, TE, TR to C, E, R. GregorB (talk) 20:50, 9 January 2013 (UTC)


 * 1) Is accessdate useful as a parameter? (Not really, I'd say.) I'd like to keep it just in case, but should we advise its use?


 * I'd stick with it for the time being, because we don't know if this is going to get updated some more - they've fumbled a lot so far, there's not much reason to trust that all the numbers are now immutable. --Joy &#91;shallot&#93; (talk) 07:49, 7 January 2013 (UTC)
 * Good point. GregorB (talk) 08:54, 7 January 2013 (UTC)


 * 1) Is "Excel functionality" useful or you'd agree that it be removed? This would simplify the template code considerably. Note Excel tables can be cited regardless by using the url and title parameters.


 * I'd remove it then, definitely. --Joy &#91;shallot&#93; (talk) 07:49, 7 January 2013 (UTC)


 * 1) Is the template expansion (i.e. the right column in the Examples table) generally OK? (This is not a pressing issue, because formatting could still be changed in the future if the need arises.)


 * It's good for now, although it would eventually be nice to be able to connect this with the ISSN of the publication (regardless of whether it's the paper ISSN or the web ISSN). --Joy &#91;shallot&#93; (talk) 07:49, 7 January 2013 (UTC)
 * Shouldn't be a problem. GregorB (talk) 08:54, 7 January 2013 (UTC)


 * 1) The template says "County of Foo" instead of "Foo County" because DZS uses these names. Okay or not? (Again, very easy to change anytime.)


 * I won't complain unless the county moniker is stripped, because that would make it strange. --Joy &#91;shallot&#93; (talk) 07:49, 7 January 2013 (UTC)

I'd like to hear your comments on the above points. GregorB (talk) 21:12, 30 December 2012 (UTC)

doc
The documentation needs to advise how to actually find the numbers. I'll see if I can document it myself. --Joy &#91;shallot&#93; (talk) 07:50, 7 January 2013 (UTC)
 * I meant to include it, might do it today. GregorB (talk) 08:46, 7 January 2013 (UTC)

title param with #3
If the third unnamed parameter is specified, then the default value for title could be the PAGENAME variable (of the article, not the template). --Joy &#91;shallot&#93; (talk) 08:01, 7 January 2013 (UTC)
 * Done. Tested in Daruvar. GregorB (talk) 18:02, 7 January 2013 (UTC)