Wikipedia talk:WikiProject UK geography/How to write about UK postal administration

Postcode districts transclusion test

edit

I've experimented with User:MRSC/List of postcode districts, which transcludes the tables from three postcode area articles. I think we should use List of postcode districts in the United Kingdom to get the postcode area tables up to a decent standard and then construct the list article from transclusions to avoid duplication. Interested to hear your thoughts? MRSC (talk) 11:01, 30 March 2010 (UTC)Reply

Some impressive work you've been doing on the postcode area articles. If it's any consolation for your hard work, I do feel guilty standing here on the sidelines idly waving! Though I have been experimenting with some map making.
Anyway, that said...
  • List content:
List of postcode districts in the United Kingdom is already a very large page and can be very slow to render. I'm concerned that if we replace its narrowly-defined (but complete) content with the more detailed (but less verifiable) content from transcluding the area article lists, we'll make a page that is too large to be usable – but which, being prominently linked from navboxes and related pages, unsuspecting readers will often find themselves loading and perhaps freezing their browser.
This is a dilemma and my unorthodox but pragmatic suggestion is to keep the content of the existing list article but to add a prominent link at the top to another page containing the detailed transcluded list, and a warning alongside the link that it leads to a very large page.
I've not seen any precedent for this on Wikipedia, so perhaps there is a more conventional solution. But the existing list is (on my PC) a test of patience, so I'd worry if we lost it to something that was an order of magnitude slower.
A penny for your thoughts!
  • Transclusion method:
Because editors are likely to insert hatnotes and other markup at the start and end of the article pages, I suggest that you replace:
<noinclude> <!-- Top of article -->
...before...
{{postcode area table start}}
</noinclude> <!-- Top of table -->
|-
! AB10
| ABERDEEN
...etc...
| Moray
<noinclude> <!-- Bottom of table -->
|}
...after...
</noinclude> <!-- Bottom of article -->
with:
...before...
{{postcode area table start}}
<onlyinclude>
|-
! AB10
| ABERDEEN
...etc...
| Moray
</onlyinclude>
|}
...after...
(Tentatively assuming that no linebreak issues arise with the onlyinclude tags being on lines of their own.)
An example (using an old version of the postcode area article) is at User:Richardguk/AB postcode area which has its district list transcluded into User:Richardguk/Postcode areas transcluded (along with lists for all other areas). Loading this latter page should give an idea of the server and browser delays for a full set of transclusions. (I'm using IE8 which I know is notorious for slow rendering, but still valid as a likely-use scenario!)
Incidentally, I notice that you experimented with sortable tables in {{postcode area table start}}. Perhaps it could take sortable as an optional parameter to allow for experimentation.
Richardguk (talk) 01:12, 31 March 2010 (UTC)Reply

Thanks for the feedback. I took out sortable because the sort for postcode districts didn't work. It sorted AL1, AL10, AL2. I think there are technical workarounds for this, but will need to be repeated 100+ for very little gain. That said, I have no moral objection to it being there if it worked. Good call on the simpler code. I hadn't realised it could be done that way and anything that produces less code is good, especially as the top and bottom of articles can be dumping grounds. Your existing list rendered acceptably quickly on Chrome on a currently average spec PC.

We essentially have two different lists. List of postcode districts in the United Kingdom is exactly what it says on the tin. What we could produce via transclusion is a list with coverage (albeit only sort/searchable via browser searching) so it could exist at an article title such List of coverage of postcode districts in the United Kingdom or List of settlements in the United Kingdom by postcode district. Or something more snappy. The point is, it is a complete list of UK settlements sorted by postcode district and this does not exist elsewhere. I have a feeling that once the list is made it will enable editors to notice postcode area articles that are lacking, identify good practice, and generally will cause improvement. MRSC (talk) 05:56, 31 March 2010 (UTC)Reply

Great. You'll see in List of postcode districts in the United Kingdom how I use hidden text to make the postcode districts sortable, essentially padding single-letter areas and single-digit districts with zeroes (but note that E1W becomes E001W not E01W – so all the alpha-districts are expanded to 5 characters and all the ordinary districts are expanded to 4 if they do not already have 4 characters). For example:
!<span style="display:none">B001 </span>B1
I think there's a template for this but that would increase the burden on the rendering servers. Note that the space is to reduce the likelihood of search engines interpreting the text as a single word "B001B1". I think you already acknowledged that rowspans would also need to be removed for sortable tables to work.
Regarding the name, I like the way you're thinking; perhaps it might be helpful to insert the word "detailed", so people seeing links to both articles can deduce that the new one will be bigger. It certainly makes sense for you to continue to develop the prototype in your userspace and seek feedback until the transcluded list is working coherently there, and only then move it into article space with a name along the lines you've suggested. Then, if anyone were to propose a merger, there would be established articles for everyone to make a proper comparison.
I might be able to produce a near-comprehensive list of local authority areas and postally localities which could be checked against the new transcluded list, although clearly the Coverage column is never likely to be standardised given the ambiguity of most non-statutory non-postal boundaries. In theory, Royal Mail "postally-required locality" would be a subset of the places listed under "Coverage" and a superset of post towns.
I'll try to get round to tabulating this in my user space, perhaps with the list of sorting offices by postcode sector that I drew to your attention a couple of months ago.
By the way, did you notice that someone has rewritten KA postcode area to give sector-level details? Could be progress to be encouraged, or could be a bad thing to be too detailed and non-standard, or maybe vive la différence! In any case, it seems to be a work in progress but the Post town and Coverage columns have needlessly been transposed.
Is there an appropriate article or WP talk page we should move this discussion to? Not that postcoding seems to be a widely shared interest, but you never know.  
Richardguk (talk) 02:56, 1 April 2010 (UTC)Reply

If you want to make the tables sortable that would be great. The scenario I see where it would provide value is being able to sort by post town and then back to district. Coverage/LAA there is less value in as the entries are comma separated.

The Address Management Guide has a list of commonly used localities for each postcode sector, but there are a number of limitations. 1) No localities at all for London; 2) No localities for the core districts in large cities; 3) Some of the localities appear historical/rarely used and may not match up to what readers will expect.

List of postcode districts in the United Kingdom with detailed coverage perhaps?

I think sector level information is useful where there is more than one post town in a postcode district. This has been presented a number of different ways in various articles and I am unsure which is the best way to present this. MRSC (talk) 06:22, 1 April 2010 (UTC)Reply

With the OS OpenData release of Code-Point Open today (cached at MySociety), we've got an official source of geocoords and administrative area lookups right down to postcode level, free of charge (subject to attribution), so maybe it would be worth converting all the area articles to provide sector level coverage.
As a side benefit, that would establish a clear distinction between the transcluded area-articles list and the existing district-level list: make the area articles into lists of postcode sectors, so the transcluded list is a clear order of magnitude more detailed than the existing list of districts.
So much data, so little time!
Richardguk (talk) 19:24, 1 April 2010 (UTC)Reply

Positive side of including the sector information is that the coverage and local authority columns will correspond to only one name, rather than a long unsortable list. On the negative side it will create a very long transcluded list article. However, this could be overcome by dividing up List of United Kingdom postcode sectors into several (maybe five) articles as is done for List of United Kingdom locations. MRSC (talk) 20:17, 1 April 2010 (UTC)Reply