Snowy monaro #152

Merged
hughrun merged 3 commits from east-gip into main 2022-10-09 15:01:39 +11:00
3 changed files with 2 additions and 68 deletions

View file

@ -1,30 +0,0 @@
#!/usr/bin/env python3
import csv
import json
# files to merge
csv_file = './website/data/library_services_information.csv'
topojson_file = './website/data/boundaries.topo.json'
geo = open(topojson_file, 'r') # open the topo.json file
json_data = json.loads(geo.read()) # read the file and load into a dict
# for each feature, if the name in the json matches the name in the csv, add new properties to the json
for feature in json_data['objects']['boundaries.geo']['geometries']:
with open(csv_file, newline='') as f:
# use DictReader so we can use the header names
reader = csv.DictReader(f)
for row in reader:
# look for match
if row['name'] == feature['properties']['name']:
# create new properties in topojson
for k in row:
if k != "long_name" and k != "": # ignore long_name and any blank column names
feature['properties'][k] = row[k]
f.close() # close csv
geo.close() # close geo and flush
# open topojson file again and overwrite it
with open(topojson_file, 'w') as newfile:
json.dump(json_data, newfile, separators=(',', ':'))
newfile.close()

View file

@ -1,36 +0,0 @@
name: topo update (push)
on:
push:
branches:
- master
- main
paths:
- 'website/data/library_services_information.csv'
workflow_dispatch:
jobs:
auto-topo-updater:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Merge CSV to TopoJSON
run: |
python3 ./.github/scripts/merge_csv_to_topojson.py
- name: Update contributors
run: |
npm install cheerio
npm install pretty
node ./.github/scripts/contributors.js
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: merge csv data to topo
commit_author: Library Map Bot <librarymap@hugh.run>

View file

@ -69,7 +69,7 @@ Ryde Library Service,Ryde,nsw,yes,3,Civica Spydus,https://www.ryde.nsw.gov.au/Li
Shellharbour City Libraries,Shellharbour,nsw,no,3,OCLC WorldShare,https://libraries.shellharbour.nsw.gov.au/, Shellharbour City Libraries,Shellharbour,nsw,no,3,OCLC WorldShare,https://libraries.shellharbour.nsw.gov.au/,
Shoalhaven Libraries,Shoalhaven,nsw,no,4,Libero,https://www.shoalhavenlibraries.com.au/Our-Libraries, Shoalhaven Libraries,Shoalhaven,nsw,no,4,Libero,https://www.shoalhavenlibraries.com.au/Our-Libraries,
Singleton Public Library,Singleton,nsw,yes,3,AIT Aurora,https://www.singleton.nsw.gov.au/236/Library, Singleton Public Library,Singleton,nsw,yes,3,AIT Aurora,https://www.singleton.nsw.gov.au/236/Library,
Snowy Monaro Regional Library,Snowy Monaro Regional,nsw,?,4,OCLC Amlib,https://www.snowymonaro.nsw.gov.au/152/Library-Services, Snowy Monaro Regional Library,Snowy Monaro Regional,nsw,?,4,Libero,https://www.snowymonaro.nsw.gov.au/152/Library-Services,
South Coast Cooperative Libraries,Kiama,nsw,yes,4,Libero,https://library.kiama.nsw.gov.au/, South Coast Cooperative Libraries,Kiama,nsw,yes,4,Libero,https://library.kiama.nsw.gov.au/,
Stanton Library,Stanton,nsw,yes,3,AIT Aurora,https://www.northsydney.nsw.gov.au/Library_Databases, Stanton Library,Stanton,nsw,yes,3,AIT Aurora,https://www.northsydney.nsw.gov.au/Library_Databases,
Strathfield Library and Information Centre,Strathfield,nsw,yes,3,Civica Spydus,https://www.strathfield.nsw.gov.au/play/strathfield-council-library/, Strathfield Library and Information Centre,Strathfield,nsw,yes,3,Civica Spydus,https://www.strathfield.nsw.gov.au/play/strathfield-council-library/,
@ -257,7 +257,7 @@ Central Highlands Libraries,Central Highlands VIC,vic,by_lga,4,SirsiDynix Sympho
City of Melbourne Libraries,Melbourne,vic,yes,3,Civica Spydus,https://www.melbourne.vic.gov.au/community/libraries/Pages/libraries.aspx, City of Melbourne Libraries,Melbourne,vic,yes,3,Civica Spydus,https://www.melbourne.vic.gov.au/community/libraries/Pages/libraries.aspx,
Corangamite Regional Library Corporation,Corangamite,vic,adults,3,Civica Spydus,https://www.crlc.vic.gov.au/, Corangamite Regional Library Corporation,Corangamite,vic,adults,3,Civica Spydus,https://www.crlc.vic.gov.au/,
Darebin Libraries,Darebin,vic,yes,3,Civica Spydus,https://www.darebinlibraries.vic.gov.au/default.aspx, Darebin Libraries,Darebin,vic,yes,3,Civica Spydus,https://www.darebinlibraries.vic.gov.au/default.aspx,
East Gippsland Shire Library,East Gippsland,vic,yes,4,OCLC Amlib,https://www.eastgippsland.vic.gov.au/leisure/libraries, East Gippsland Shire Library,East Gippsland,vic,yes,4,SirsiDynix Symphony,https://www.eastgippsland.vic.gov.au/leisure/libraries,
Eastern Regional Libraries Corporation,Eastern,vic,no,3,Civica Spydus,https://www.yourlibrary.com.au/, Eastern Regional Libraries Corporation,Eastern,vic,no,3,Civica Spydus,https://www.yourlibrary.com.au/,
Frankston City Libraries,Frankston,vic,no,3,Civica Spydus,https://library.frankston.vic.gov.au/Home, Frankston City Libraries,Frankston,vic,no,3,Civica Spydus,https://library.frankston.vic.gov.au/Home,
Gannawarra Library Service,Gannawarra,vic,?,4,SirsiDynix Symphony,https://www.gannawarra.vic.gov.au/Community-Services/Libraries, Gannawarra Library Service,Gannawarra,vic,?,4,SirsiDynix Symphony,https://www.gannawarra.vic.gov.au/Community-Services/Libraries,

1 long_name name state fines standard_loan_weeks ILS website
69 Shellharbour City Libraries Shellharbour nsw no 3 OCLC WorldShare https://libraries.shellharbour.nsw.gov.au/
70 Shoalhaven Libraries Shoalhaven nsw no 4 Libero https://www.shoalhavenlibraries.com.au/Our-Libraries
71 Singleton Public Library Singleton nsw yes 3 AIT Aurora https://www.singleton.nsw.gov.au/236/Library
72 Snowy Monaro Regional Library Snowy Monaro Regional nsw ? 4 OCLC Amlib Libero https://www.snowymonaro.nsw.gov.au/152/Library-Services
73 South Coast Cooperative Libraries Kiama nsw yes 4 Libero https://library.kiama.nsw.gov.au/
74 Stanton Library Stanton nsw yes 3 AIT Aurora https://www.northsydney.nsw.gov.au/Library_Databases
75 Strathfield Library and Information Centre Strathfield nsw yes 3 Civica Spydus https://www.strathfield.nsw.gov.au/play/strathfield-council-library/
257 City of Melbourne Libraries Melbourne vic yes 3 Civica Spydus https://www.melbourne.vic.gov.au/community/libraries/Pages/libraries.aspx
258 Corangamite Regional Library Corporation Corangamite vic adults 3 Civica Spydus https://www.crlc.vic.gov.au/
259 Darebin Libraries Darebin vic yes 3 Civica Spydus https://www.darebinlibraries.vic.gov.au/default.aspx
260 East Gippsland Shire Library East Gippsland vic yes 4 OCLC Amlib SirsiDynix Symphony https://www.eastgippsland.vic.gov.au/leisure/libraries
261 Eastern Regional Libraries Corporation Eastern vic no 3 Civica Spydus https://www.yourlibrary.com.au/
262 Frankston City Libraries Frankston vic no 3 Civica Spydus https://library.frankston.vic.gov.au/Home
263 Gannawarra Library Service Gannawarra vic ? 4 SirsiDynix Symphony https://www.gannawarra.vic.gov.au/Community-Services/Libraries