Add council_names.json
This commit is contained in:
15
Readme.md
Normal file
15
Readme.md
Normal 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
|
||||
'''
|
||||
Reference in New Issue
Block a user