From 95f603ef12f91550b4653af629db8ffa28b9c222 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sun, 17 Jan 2021 22:38:39 +1100 Subject: [PATCH] update website files * update readme * new TopoJSON file with initial capitalised names * add python script for merging csv and geojson * add and update various web pages --- about.md | 51 ++++++++++++ merge_service_data.py | 41 ++++++++++ website/sources.html | 181 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 273 insertions(+) create mode 100644 about.md create mode 100644 merge_service_data.py create mode 100644 website/sources.html diff --git a/about.md b/about.md new file mode 100644 index 0000000..b063946 --- /dev/null +++ b/about.md @@ -0,0 +1,51 @@ +## About Library Map + +This project collects and maps data from public libraries across the Australia and the external Australian Territories of Christmas Island and the Cocos (Keeling) Islands. In the long term I hope to include more data that can be combined and cross-referenced, e.g. library funding from local and state governments, HILDA data etc. + +You should be able to find the location of every public library in Australia territory, plus the standard loan period for each libary service, and whether they charge overdue fines (if known, in both cases). + +Soon you will be able to see which integrated library system (ILS/LMS) each library service uses. + +### Why this data? + +When I worked as a systems librarian in public libraries I often wondered how the social networks of decision makers - most obviously reflected by geography and state borders - affected decision making on things like library sofware procurement. I thought mapping systems visually might reveal things that are less obvious on a simple table or list. + +Rules about loan periods are arbitrary. I thought it might be interesting to see whether there are any regional trends. + +Fines for overdue library books are inefficient, ineffective, perverse, and regressive. "Punishable by fine" simply means "legal for rich people". Mapping library fine regimes provides a view of any regional patterns, and also allows activists to target libraries that still charge overdue fines. + +### Definitions + +#### Overdue fines + +A library service is classified as charging fines for overdue items if any kind of non-refundable fee is charged prior to **28 days overdue**. This period has been chosen because some libraries declare an item "lost" around that time, and invoice the borrower for a *replacement fee*. Designating these libraries as "not charging overdue fines" and others that charge e.g. a "notice fee" at the same cutoff time as "charging overdue fines" starts to get a bit weird. + +#### Standard loan period + +The "standard loan period" is the loan period applied to an ordinary book, and may apply to other items or indeed all items held in a library. Data for Western Australia is provisional and in some cases has been rounded to the nearest "week" (e.g. a 19 day loan period is recorded as 3 weeks). + +#### Indigenous Knowledge Centre + +Currently, only libraries classified as *Indigenous Knowledge Centres* by the State Library of Queensland are classified as such on this map. In future there may be other centres so identified. + +### Caveats + +Most of the data for the map comes from government open data sources. As such it is subject to government bias, and may be out of date or over/under sampled. + +### Nomenclature + +Library locations are classified into four types. In general mode these are: + +* Settler Knowledge Centres +* Indigenous Knowledge Centres +* Worker Pacification Centres +* Imperial Knowledge Centres + +If this naming convention makes you uncomfortable, you may view the map in *White fragility mode*, in which case the names are: + +* Public Libraries +* Indigenous Knowledge Centres +* Mechanics Institutes +* National & State Libraries + +I will explain a little more about why this is the case, in my talk at the GO GLAM miniconf at linuxconf.au 2021. \ No newline at end of file diff --git a/merge_service_data.py b/merge_service_data.py new file mode 100644 index 0000000..4599a13 --- /dev/null +++ b/merge_service_data.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python3 + +import csv +import json +from titlecase import titlecase # you need to install the titlecase package from PyPi :-) + +# files to merge +geojson_file = 'data/all_library_services.geojson' +csv_file = 'data/library_services.csv' + +# fields to match on +geojson_match = 'name' +csv_match = 'short_name' + +# output file name +output_file = 'data/boundaries.geojson' + +# open the geojson file +file = open(geojson_file, 'r') +# read the file and then load the json so it's a dict +json_data = json.loads(file.read()) + +# for each geojson feature, if a field in the json matches a field in the csv, add new properties to the json +for feature in json_data['features']: + 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[csv_match] == feature['properties'][geojson_match]: + # create new properties in geojson + for k in row: + feature['properties'][k] = row[k] + + downcased = titlecase(feature['properties'][geojson_match]) # titlecase name + feature['properties']['name'] = downcased + + +# write out new geojson file with the updates +with open(output_file, 'w') as newfile: + json.dump(json_data, newfile, indent=2) diff --git a/website/sources.html b/website/sources.html new file mode 100644 index 0000000..490b2d4 --- /dev/null +++ b/website/sources.html @@ -0,0 +1,181 @@ +!DOCTYPE html> + + + + + + About - Library Map + + + + +
+
+ +

Sources & Attributions

+

Beta!

+
+
+ +
+

Library Map was written and conceived on unceded Wurundjeri Woi Wurrung land.

+

Visualisation

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SourceLinkLicense
leaflet.jshttps://leafletjs.comBSD-2-Clause
leaflet.geoCSVhttps://github.com/joker-x/Leaflet.geoCSVGPL-3.0-or-later
leaflet.patternhttps://github.com/teastman/Leaflet.patternBSD-2-Clause
MapBoxhttps://www.mapbox.com/custom ToS
OpenStreetMaphttps://www.openstreetmap.orgCC-BY-SA
+

Library services

+

The library service boundaries are derived from local government boundary data care of PSMA and accessed from data.gov.au.

+

Data about fines and lending periods is a mix of original research, plus data provided by State Libraries and Public Libraries Victoria.

+

Data about language holdings (TODO) provided by various sources.

+

Data about Integrated Library Systems (ILS) (TODO - almost done) is mostly original research, with some data from State Library of Queensland, and some checked at Marshall Breeding’s librarytechnology.org site.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SourceLinkLicense
PSMAhttps://data.gov.auCC-BY 4.0
Victorian GovernmentDirectory of Public Libraries in Victoria© (fair dealing)
NSW GovernmentSpatial NSWCC-BY
Queensland Government (Library Service data)Public Libraries Annual StatisticsCC-BY-4.0
Stat Library QueenslandPublic Libraries Statistical BulletinCC-BY-SA
WA NSLA statisticspersonal communication© (fair dealing)
Public Library Services (DoPC South Australia)Find a Library© (fair dealing)
+

Library locations

+

Library locations are generally provided by state government departments.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SourceLinkLicense
Libraries Tasmania / data.gov.auLibraries Tasmania locationsCC-BY 4.0
Vicmap Features of Interesthttps://discover.data.vic.gov.au/dataset/vicmap-features-of-interestCC-BY 4.0
ACT Open Data PortalACT Libraries locationsCC-BY 4.0
NSW State Library (NSW library locations and contacts)Public library services© (fair dealing)
State Library of QueenslandQueensland public libraries directoryCC-BY 4.0
Find a library in the NThttps://nt.gov.au/leisure/arts-culture-heritage/libraries-and-records/find-a-library-in-the-ntn/a
WA NSLA statisticspersonal communication© (fair dealing)
Public Library Services (DoPC South Australia)Find a Library© (fair dealing)
+
+ +