Add council_names.json

This commit is contained in:
2024-07-28 19:05:08 +10:00
parent 02cfedd611
commit f149107943
2 changed files with 950 additions and 0 deletions

15
Readme.md Normal file
View File

@@ -0,0 +1,15 @@
# SPL Tools
SPL tools is a collection of tools to assist in building the Streets People Love website.
## council_names.json
Contains the name of each council, a "short" name, and the names of each ward in the council.
The "short" named is created by taking the electorate name and removing the words "Rural", "City", "Shire", or "Council".
The file can be generated using the jq tool and the VEC data:
'''
jq '[.[] | {name: .electorateName, electorateId: .electorateId, shortName: .parentElectorateName | match("(.*?)(?:(?: Rural)?(?: City| Shire) Council)").captures[0].string, parentElectorateId: .parentElectorateId, councilName: .parentElectorateName }] | group_by(.parentElectorateId) | map({shortName: .[0].shortName, councilName: .[0].councilName, wardNames: . | map(.name) }) | sort_by(.shortName)' "VEC Data\wards.json" > council_names.json
'''