Wikipedia:WikiProject Ireland/CatNavProposal

Proposal by User:BrownHairedGirl to improve navigation between Irish by-county categories. You may find it easiest to start by looking at the.

Please leave feedback on the talk page: Wikipedia talk:WikiProject Ireland/CatNavProposal

Irish Counties
Ireland has a broadly stable set of 32 counties for over 400 years, since County Wicklow was created in 1606. (Yes, a few minor tweaks in 1898, and County Dublin was subdivided in 1994, but it's basically the same 32). This stable set of subdivisions makes geographical categorisation of Irish topics easy, beacuse "in County Dublin"/"in County Fermanagh"/"in County Kerry"/"in County Leitrim"/"in County Wicklow" etc means exactly the same thing in 2018 as it did in 1918, 1818, 1718 and 1618. By contrast, our neighbours in Britain made two sets of big changes to county boundaries in the last 50 years, so they don't have such continuity.

This stable geography means that Irish topics can be easily categorised by county. So there are about 2,500 Irish by-county categories (i.e. those named "Foo in/of/from County Bar" etc), and their meaning is clear. So far, v v good.

Navigation
However, navigation between the county categories is not easy. Wikipedia's crude category interface is OK for going to a sub-category, poor for going to a higher category (they are listed at the bottom of the page), but appalling for going to a sibling category. Look for example at Category:History of County Louth:


 * 1) Five subcats clearly listed in a section labelled "subcategories".  Badly formatted, but visible on the first screen, without scrolling
 * 2) The 3 parent categories are listed at the bottom of the page.  So a new reader may never even notice that Category:History of County Louth is a subcat of Category:County Louth, Category:History of the Republic of Ireland by county and Category:History of Ireland by county
 * 3) Worst of all, there is no explicit note anywhere that this is part of a series of "History of County Foo" categories.  There is:
 * 4) * no statement anywhere on the page that there are 31 other such categories from Category:History of County Antrim to Category:History of County Wicklow
 * 5) *No explicit pointer on how to find those similar categories. We hope that readers will spot the parent Category:History of Ireland by county and figure out that they should look there.  But how many do?
 * 6) *No set of links to the other by-county categories, which would be the most user-friendly option

Problem #3 means the only way to go from Category:History of County Louth to another Category:History of County Foo is to: a) scroll to the bottom of the page b) go to Category:History of Ireland by county c) choose a another category, e.g. Category:History of County Waterford. Usability fail.

On some other sets of categories, we solve problem #3 by using navigation templates to provide links to similar categories. See e.g. Category:1957 in Ireland (Years in Ireland makes links to Category:1949 in Ireland .. Category:1960 in Ireland) and the other Ireland by-year categories, or Category:1850s in Ireland (links to Category:1790s in Ireland .. Category:1900s in Ireland).

It makes navigation much easier. So why not do that for counties?

Template problem
Years in Ireland works well beacuse one template works on 800 categories all named "YYYY in Ireland". However, a template is not an easy solution for counties because there are so many permutations: "County Foo-related lists", "People from County Foo", "Islands of Foo" etc. I estimate that there ~100 such sets; no county has all of them, but all counties have at least 50.

So even though each set is consistently named, we would still need to either have ~100 templates (, ,   etc), or apply parameters on each page, e.g.  .  Either option would be a nightmare to apply (plenty of scope for errors), and a nightmare to maintain: update each page or template when the categories are moved, make a new template when a new category set is created.

So I reckoned this was only worth doing if there was a smart template which could work on all categories without parameters: just place it on the page, and it will know what to do.

Solution
Using WP:LUA, I have developed a working prototype of a smart template. does the job with no parameters.

However, there are several possible ways of presenting the navbox, so this prototype does take parameters to set the mode of presentation. Hopefully after evaluation, we can reduce or eliminate the options.

Design principles

 * 1) links to corresponding categories for other counties. The template parses the category name and creates links to corresponding categories for other counties. So if you put it on Category:Islands of County Donegal, it will make links to Category:Islands of County Clare, Category:Islands of County Cork etc
 * 2) Full set of relevant counties, even if if not all the pages exist.
 * 3) No variations.  Categories should be consistently named (see WP:NCCAT), and any outliers should be speedily renamed via WP:CFDS.  So the template only links to categories using exactly the same naming format, and doesn't attempt to look for variations
 * 4) No redlinks.  If a category in the list doesn't exist (e.g. Category:Islands of County Offaly), the title will be displayed in grey: e.g Islands of County Offaly
 * 5)  No display on invalid pages. No attempt to make navigation unless the template is used on a page which is i) a category and ii) includes in its title the name of an Irish county. So no output if the template is used on Lough Melvin (not a category), Category:Skibbereen (no county in name) or Category:Lakes of County Durham (not an Irish county).  The final version will include error messages and tracking categories in such cases, but for now it just does nothing.

Options
As I developed this, it became clear that some choices need to be made. So I programmed for all options, to show what they look like and let others decide.


 * 1) Use the full county name (e.g. Cork, Kerry) or an abbreviated version (e.g. CO, KY).  I can see benefits both ways (clear-but-bulky vs compact-but-a-bit-obscure).  See  below on how I chose the codes
 * 2) Which counties to include on each page's links? Options include
 * 3) * All 32 counties as a flat list from Antrim to Wicklow
 * 4) * All 32 counties, divided into Norniron and Republic
 * 5) * Just the counties in the same set (e.g. the 6 counties for an Armagh category, the 26 counties for a Longford category)
 * 6) *Include the post-1994 "new counties" (Fingal, South Dublin, Dún Laoghaire–Rathdown) when the list includes Dublin?
 * 7) What about GAA topics? (the GAA counties use "Derry" instead of "Londonderry", and omit the word "County" -- e.g. Category:Cork inter-county Gaelic footballers, Category:Mayo GAA club championships)

BHG preference
I can see a case for all approaches, but for now my preference is:


 * Default: include all 32 counties, split into North & Republic, plus the new counties. That makes a clear and compehensive set, and it covers ~90% of all categories.

... but create a few exceptions
 * allow an undivided 32-county mode (without the "new counties") for topics which wholly predate partition, e.g. Category:Members of the Parliament of Ireland (pre-1801) for County Westmeath constituencies etc
 * allow a 26-county mode for topics which are wholly RoI, e.g. Category:National Monuments of Ireland by county, and Category:Local councillors in County Galway. (Category:Councillors in Northern Ireland doesn't use the word "local" and doesn't use counties)
 * allow a 6-county mode for topics which are wholly Northern Ireland, e.g. Category:The Troubles in County Down
 * a GAA mode (for Category:Monaghan inter-county Gaelic footballers etc) which:
 * uses a flat list of all 32 GAA counties in Ireland
 * doesn't expect the word "County" in the title

Examples
Note that in each case below I have made an example of usage in an actual live category, and then reverted it. (This is only a test, which I don't want to deploy to readers). So the links below to category pages are all to old versions of the page.

Examples: Default version
all 32 counties, split into North & Republic, plus the new counties:

Note that on a Northern Ireland category, the Northern Ireland categories are listed first. On an RoI category, the Republic is listed first.


 * Category:Islands of County Fermanagh
 * Category:Islands of County Galway
 * Category:County Louth-related lists
 * Category:County Antrim-related lists
 * Category:Education in Fingal
 * Category:Education in County Longford

Examples: Default with abbreviations
abbreviated names of all 32 counties, split into North & Republic, plus the new counties:


 * Category:Islands of County Kerry
 * Category:Islands of County Dublin
 * Category:County Sligo-related lists
 * Category:County Armagh-related lists
 * Category:Education in Dún Laoghaire–Rathdown
 * Category:Education in County Monaghan

Examples: Default version, but without new counties
all 32 counties, split into North & Republic, plus the new counties
 * Category:Schools in County Armagh
 * Category:People from County Kilkenny

Examples: Default without new counties, with abbreviations
abbreviated names of all 32 counties, split into North & Republic:


 * Category:Secondary schools in County Tyrone
 * Category:Sportspeople from County Leitrim

Examples: All 32 counties without new counties, as a flat list
all 32 counties, without the new counties:
 * Category:Members of the Parliament of Ireland (pre-1801) for County Armagh constituencies
 * Category:Members of the Parliament of Ireland (pre-1801) for County Limerick constituencies

Examples: All 32 counties without new counties, as a flat list with abbreviations
all 32 counties, without the new counties:
 * Category:Members of the Parliament of Ireland (pre-1801) for County Tipperary constituencies
 * Category:Members of the Parliament of Ireland (pre-1801) for County Londonderry constituencies

Examples: All 32 counties with new counties as a flat list
all 32 counties, with the new counties:
 * Category:Rugby union clubs in Fingal
 * Category:Rugby union clubs in County Down

Examples: All 32 counties with new counties as a flat list with abbreviations
all 32 counties, with the new counties:
 * Category:Rugby union clubs in County Carlow
 * Category:Rugby union clubs in County Tyrone

Examples: 26-county list
all 26 counties, plus the new counties:


 * Category:Local councillors in County Cork
 * Category:National Monuments in County Wexford

Examples: 26-county list with abbreviations
all 26 counties, plus the new counties:


 * Category:Local councillors in County Westmeath
 * Category:National Monuments in County Donegal

Examples: 6-county list
all 6 counties of Northern Ireland:
 * Category:The Troubles in County Down
 * Category:Members of the Parliament of the United Kingdom for County Armagh constituencies (since 1922)

Examples: 6-county list with abbreviations
all 6 counties of Northern Ireland:
 * Category:The Troubles in County Londonderry
 * Category:Members of the Parliament of the United Kingdom for County Fermanagh constituencies (since 1922)

Examples: GAA mode
all 32 GAA counties:
 * Category:Antrim inter-county hurlers
 * Category:Mayo GAA club championships

Examples: GAA mode with abbreviations
all 32 GAA counties:
 * Category:Fermanagh Gaelic footballers
 * Category:Galway GAA matches

Northern Ireland
I can see some concerns about including Northern Ireland in this navbox. Those who take the view that Northern Ireland is a separate country may be inclined say "no navigation links to the Republic".

Without disrespecting that view, I don't think it's that simple:
 * 1) Some categories wholly predate partition (e.g. Category:Members of the Parliament of Ireland (pre-1801) by county and its subcats). It would be anchronistic to partition them
 * 2) Many categories relate to topics which are organised on a 32-county basis, e.g. Category:Religion in Ireland by county, and most sport categories
 * 3) Geographical categories all relate to topics unchanged by partition: towns, villages, townlands, landforms (mountains, bays, loughs etc). Since they are all on the same island and have mostly-shared history, isn't it helpful to readers to provide the links?
 * 4) Many categories span the pre- and post-partition eras: e.g. people, buildings and structures, history.  So facilitating navigation between all 32 counties seems helpful

So in cases 2–4 it seems to me to be best to provide the links, but clearly distinguish the north from the Republic.

However, I don't want to trigger an edit war across hundreds of category pages, so we need a north-south consensus on this.

Abbreviations
The abbreviations used for county names (e.g. DL=Donegal, WD=Waterford) are:
 * 1) ISO 3166-2:IE standard for the traditional 26 counties
 * 2) My own inventions for the others, all using first-letter/last-letter (like the ISO names) except:
 * 3) *"DLR" for Dún Laoghaire–Rathdown.
 * 4) *"DS" for South Dublin, like the old "TS" ISO code for now-abolished South Tipperary

Here's the full list:
 * traditional 26 counties of the RoI: CO=Cork, CE=Clare, CN=Cavan, CW=Carlow, D=Dublin, DL=Donegal, G=Galway, KE=Kildare, KK=Kilkenny, KY=Kerry, LK=Limerick, LD=Longford, LH=Louth, LM=Leitrim, LS=Laois, MH=Meath, MN=Monaghan, MO=Mayo, OY=Offaly, RN=Roscommon, SO=Sligo, TY=Tipperary, WD=Waterford, WH=Westmeath, WX=Wexford, WW=Wicklow
 * "new counties" dividing County Dublin: FL=Fingal, DS=South Dublin, DLR=Dún Laoghaire–Rathdown
 * 6 counties of Northern Ireland: AM=Antrim, AH=Armagh, DN=Down, FH=Fermanagh, LY=Londonderry, TE=Tyrone

I like the brevity of the abbreviations, but I fear that they will bewilder readers. Irish readers will recognise the first abbreviations from vehicle registration plates and may guess the others ... but readers from elsewhere may be puzzled until they mouseover the links.

I think that whatever decision is made should be applied consistently ... i.e. there should be no option to turn abbreviations on/off.

Code
The Lua module on which this prototype is based is at Module:Sandbox/BrownHairedGirl/IrelandByCountyCatNav20. It works, but I am just an occasional hacker rather than a professional programmer, and this is my first serious use of Lua.

So some of the code is ugly to my eyes, and I am sure that a professional programmer would recoil in horror. If you can do a pro garde rewrite, feel free to proceed.