Improving WikITree's WA LGA list

{ {post

| date        = 2024-03-30 03:00 +0000
| location    = Fremantle
| timezone    = +8
| keywords    = 
| description = 

}} I've written a little script that builds a table for the Western Australia Local Government Directory Free Space page on WikiTree. It was a rather messy bulleted list of LGAs with some of them linking to their Wikidata items, WikiTree categories, and Wikipedia articles. The script looks at Wikidata and creates a table like this:

One cool thing about OpenRefine is that you can copy and paste an HTML table like that directly into the new-project wizard, and quickly have the data ready to work with.

In this case, I

value.substring(15).substring(0,-9)

Copy and paste the two pages of place category names from

https://www.wikitree.com/wiki/Category:Western_Australia,_Places


value.split('(')[0].trim()

column Category: grel:if ( or( cells.LGA.value.startsWith( 'City' ), cells.LGA.value.startsWith( 'Town' ) ), cells.LGA.value.substring( 8 ), if ( cells.LGA.value.startsWith( 'Shire' ), cells.LGA.value.substring( 9 ), ) ).trim() + ", Western Australia"