From 2bca19e47cd4a8a2162a931ef44966cc52e0bac8 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sun, 24 Jan 2021 12:10:42 +1100 Subject: [PATCH 1/5] fix link formatting in sources page --- sources.md | 2 +- website/sources/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources.md b/sources.md index 9ea203d..519c45d 100644 --- a/sources.md +++ b/sources.md @@ -41,7 +41,7 @@ Library locations are generally provided by state government departments. | Source | Link | License | |--- |--- | ---| | Libraries Tasmania / data.gov.au | [Libraries Tasmania locations](https://data.gov.au/dataset/ds-dga-409f7f64-35ef-4a70-8db1-dd737a6fabec/details?q=libraries) | CC-BY 4.0 | -| Vicmap Features of Interest | https://discover.data.vic.gov.au/dataset/vicmap-features-of-interest | CC-BY 4.0 | +| Vicmap Features of Interest | [data.vic.gov.au FoI](https://discover.data.vic.gov.au/dataset/vicmap-features-of-interest) | CC-BY 4.0 | | ACT Open Data Portal | [ACT Libraries locations](https://www.data.act.gov.au/dataset/Library-Locations-Map/3nit-7kex) | CC-BY 4.0 | | NSW State Library (NSW library locations and contacts) | [Public library services](https://www.sl.nsw.gov.au/public-library-services/about-public-library-services/find-public-library-nsw) | © (fair dealing) | | State Library of Queensland | [Queensland public libraries directory](https://www.data.qld.gov.au/dataset/public-libraries) | CC-BY 4.0 | diff --git a/website/sources/index.html b/website/sources/index.html index 41f0c69..37d8a59 100644 --- a/website/sources/index.html +++ b/website/sources/index.html @@ -145,7 +145,7 @@ Vicmap Features of Interest - https://discover.data.vic.gov.au/dataset/vicmap-features-of-interest + data.vic.gov.au FoI CC-BY 4.0 From 7df9b47ddab4df7da1b7ee04833092675f51ddb0 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sun, 24 Jan 2021 12:17:14 +1100 Subject: [PATCH 2/5] update contributing page info --- contributing.md | 2 +- website/contributing/index.html | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/contributing.md b/contributing.md index 2ec3d08..70af223 100644 --- a/contributing.md +++ b/contributing.md @@ -19,7 +19,7 @@ To update information about library *locations* (e.g. street address, phone numb * `website/data/nsla_library_locations.csv` * `website/data/public_library_locations.csv` -Do not directly edit JSON files - these are [updated programatically](about#important-files-that-are-not-in-this-repository). +Do not directly edit JSON files - these are [updated programatically](https://github.com/hughrun/public_library_map/blob/master/about.md#important-files-that-are-not-in-this-repository). ### Citing and crediting data sources diff --git a/website/contributing/index.html b/website/contributing/index.html index 3d21bfd..fb6a52a 100644 --- a/website/contributing/index.html +++ b/website/contributing/index.html @@ -31,20 +31,37 @@

How to contribute your idea, bug report or improvement

  1. You can create an issue on GitHub.
  2. -
  3. You can send a pull request — though it is strongly preferred that you either ask to be assigned to an existing issue, or create a new issue, first.
  4. -
  5. You can just send an email to librarymap@hugh.run
  6. +
  7. You can send a pull request — though it is strongly preferred that you either ask to be assigned to an existing issue, or create a new issue, first.
  8. +
  9. You can just send an email to librarymap@hugh.run.
+

Which files to update

+

To update information about library services (e.g. fines info, loan period etc) you should edit website/data/library_services_information.csv

+

To update information about library locations (e.g. street address, phone number, coordinates) you shoudl edit the relevant csv location file:

+ +

Do not directly edit JSON files - these are updated programatically.

+

Citing and crediting data sources

+

If you are adding a lot of data and have a new source for it, make sure it is cited. You should update the list of sources at both sources.md and website/sources/index.html. If your source is “I just know because it’s my local library” or “I looked it up on their website” you don’t need to add that to the list of sources. If your source is “I found a PDF listing every public library on the State Library website”, you do.

Missing or inaccurate data

Currently we’re missing data for some library services in relation to standard loan periods and fines for overdue items.

It’s likely that some library location data is inaccurate — especially for New South Wales. It’s also possible that the address data is wrong (even though the location shown may be correct), and in some cases it is missing.

It’s possible that some of the fines data for Queensland is a little off. This came from the State Library of Queensland but I know for a fact that some of the data was wrong (e.g. Gold Coast Libraries does not charge overdue fines, but the SLQ reports says it does).

I am particularly interested if you know of data sources for entire regions, states, or Australia — especially if they’re reliably kept up to date.

+

If you can fill in any of these blanks, please update the relevant CSV file and send a pull request. If your data is coming from somewhere in particular, you should also add that to sources.md in the relevant table.

Ideas for additional data

You might have an idea for library data that would be useful to map. I’m really happy to hear about these ideas! It’s possible that the information you want to map is unavailable, or just really hard to get, or maybe I will disagree that it’s useful. That’s ok - please ask anyway, expecially if you know where to find the data.

Improvements to documentation

I’m always — always — happy to hear how I can improve documentation. Even better if you make the edit and then send a pull request.

Improvements to the website design, layout, or information

You might have an idea for an improvement that’s not about the data per se, but rather about the website. Maybe there’s some accessibilty improvements I can make. Let me know!

+ +

By contributing to this project you agree to license your work under the following licenses:

+

/website/data/*: CC-BY-SA

+

everything else: GPL-3.0-or-later

\ No newline at end of file From 259a29be22ab61e0f74fd371b16e185862cfde24 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sun, 24 Jan 2021 12:18:03 +1100 Subject: [PATCH 3/5] add contributing info to readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5692c11..7b6e91f 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ See [sources](sources.md). ## Want to help? -See [contributing](contributing.md). +See [contributing](contributing.md), especially *[which files to update](https://github.com/hughrun/public_library_map/blob/master/contributing.md#which-files-to-update)*. ## Licenses From bd664dd17d12effe687bf8c9095f76030092fd81 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sun, 24 Jan 2021 12:40:17 +1100 Subject: [PATCH 4/5] fix styling for mobile - remove overlays on small screens - minimise control on small screens - add popup on zooming to area (since touchscreen devices have no 'hover') - fix navigation menu for small screens - add footer with licensing info - fix table display on small screens fixes #4 fixes #11 --- website/about/index.html | 95 ++++----- website/contributing/index.html | 99 +++++----- website/index.html | 76 ++++---- website/load-map.js | 62 ++++-- website/sources/index.html | 335 ++++++++++++++++---------------- website/style.css | 135 +++++++++---- 6 files changed, 452 insertions(+), 350 deletions(-) diff --git a/website/about/index.html b/website/about/index.html index 2d22293..90da553 100644 --- a/website/about/index.html +++ b/website/about/index.html @@ -15,51 +15,56 @@

About Library Map

Beta!

+ - -
-

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. I’m surprised by some of the results — do some libraries really have a standard loan period of six weeks? Seems kind of long. Why do so many rural libraries only lend items for two weeks? Is it because country people read faster, or something to do with limited book stock? 🤔

-

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, helps library managers to identify nearby colleagues who have already made their library fine-free and may be able to provide advice, and also allows activists to identify which libraries and local councils would benefit from some encouragement.

-

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.

-

Fines for children

-

Some libraries charge fines or fees for late-returned items, but exempt members who are under the age of (variously) 12, 16, 17, or 18; and/or for items designated as “for children”. Rather than creating my own specific definition I classify all libraries with a fine regime like this as “no fines for children”. Wouldn’t it be better if they just didn’t charge overdue fines at all?

-

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. I make no claim or warranty that the data being complete, accurate, or up to date — though I aim for it to be all of those things. If in doubt, always check with the library directly.

-

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
  • -
-
+
+
+

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. I’m surprised by some of the results — do some libraries really have a standard loan period of six weeks? Seems kind of long. Why do so many rural libraries only lend items for two weeks? Is it because country people read faster, or something to do with limited book stock? 🤔

+

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, helps library managers to identify nearby colleagues who have already made their library fine-free and may be able to provide advice, and also allows activists to identify which libraries and local councils would benefit from some encouragement.

+

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.

+

Fines for children

+

Some libraries charge fines or fees for late-returned items, but exempt members who are under the age of (variously) 12, 16, 17, or 18; and/or for items designated as “for children”. Rather than creating my own specific definition I classify all libraries with a fine regime like this as “no fines for children”. Wouldn’t it be better if they just didn’t charge overdue fines at all?

+

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. I make no claim or warranty that the data being complete, accurate, or up to date — though I aim for it to be all of those things. If in doubt, always check with the library directly.

+

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
  • +
+
+
+
+

This website and the data it uses licensed CC-BY-4.0

+
\ No newline at end of file diff --git a/website/contributing/index.html b/website/contributing/index.html index fb6a52a..c4313d2 100644 --- a/website/contributing/index.html +++ b/website/contributing/index.html @@ -15,53 +15,58 @@

Contributing to Library Map

Beta!

+ - -
-

Contributing

-

I’d love your help to make Library Map as accurate and useful as possible.

-

How to contribute your idea, bug report or improvement

-
    -
  1. You can create an issue on GitHub.
  2. -
  3. You can send a pull request — though it is strongly preferred that you either ask to be assigned to an existing issue, or create a new issue, first.
  4. -
  5. You can just send an email to librarymap@hugh.run.
  6. -
-

Which files to update

-

To update information about library services (e.g. fines info, loan period etc) you should edit website/data/library_services_information.csv

-

To update information about library locations (e.g. street address, phone number, coordinates) you shoudl edit the relevant csv location file:

-
    -
  • website/data/indigenous_knowledge_centre_locations.csv
  • -
  • website/data/mechanics_institute_locations.csv
  • -
  • website/data/nsla_library_locations.csv
  • -
  • website/data/public_library_locations.csv
  • -
-

Do not directly edit JSON files - these are updated programatically.

-

Citing and crediting data sources

-

If you are adding a lot of data and have a new source for it, make sure it is cited. You should update the list of sources at both sources.md and website/sources/index.html. If your source is “I just know because it’s my local library” or “I looked it up on their website” you don’t need to add that to the list of sources. If your source is “I found a PDF listing every public library on the State Library website”, you do.

-

Missing or inaccurate data

-

Currently we’re missing data for some library services in relation to standard loan periods and fines for overdue items.

-

It’s likely that some library location data is inaccurate — especially for New South Wales. It’s also possible that the address data is wrong (even though the location shown may be correct), and in some cases it is missing.

-

It’s possible that some of the fines data for Queensland is a little off. This came from the State Library of Queensland but I know for a fact that some of the data was wrong (e.g. Gold Coast Libraries does not charge overdue fines, but the SLQ reports says it does).

-

I am particularly interested if you know of data sources for entire regions, states, or Australia — especially if they’re reliably kept up to date.

-

If you can fill in any of these blanks, please update the relevant CSV file and send a pull request. If your data is coming from somewhere in particular, you should also add that to sources.md in the relevant table.

-

Ideas for additional data

-

You might have an idea for library data that would be useful to map. I’m really happy to hear about these ideas! It’s possible that the information you want to map is unavailable, or just really hard to get, or maybe I will disagree that it’s useful. That’s ok - please ask anyway, expecially if you know where to find the data.

-

Improvements to documentation

-

I’m always — always — happy to hear how I can improve documentation. Even better if you make the edit and then send a pull request.

-

Improvements to the website design, layout, or information

-

You might have an idea for an improvement that’s not about the data per se, but rather about the website. Maybe there’s some accessibilty improvements I can make. Let me know!

- -

By contributing to this project you agree to license your work under the following licenses:

-

/website/data/*: CC-BY-SA

-

everything else: GPL-3.0-or-later

-
+
+
+

Contributing

+

I’d love your help to make Library Map as accurate and useful as possible.

+

How to contribute your idea, bug report or improvement

+
    +
  1. You can create an issue on GitHub.
  2. +
  3. You can send a pull request — though it is strongly preferred that you either ask to be assigned to an existing issue, or create a new issue, first.
  4. +
  5. You can just send an email to librarymap@hugh.run.
  6. +
+

Which files to update

+

To update information about library services (e.g. fines info, loan period etc) you should edit website/data/library_services_information.csv

+

To update information about library locations (e.g. street address, phone number, coordinates) you shoudl edit the relevant csv location file:

+
    +
  • website/data/indigenous_knowledge_centre_locations.csv
  • +
  • website/data/mechanics_institute_locations.csv
  • +
  • website/data/nsla_library_locations.csv
  • +
  • website/data/public_library_locations.csv
  • +
+

Do not directly edit JSON files - these are updated programatically.

+

Citing and crediting data sources

+

If you are adding a lot of data and have a new source for it, make sure it is cited. You should update the list of sources at both sources.md and website/sources/index.html. If your source is “I just know because it’s my local library” or “I looked it up on their website” you don’t need to add that to the list of sources. If your source is “I found a PDF listing every public library on the State Library website”, you do.

+

Missing or inaccurate data

+

Currently we’re missing data for some library services in relation to standard loan periods and fines for overdue items.

+

It’s likely that some library location data is inaccurate — especially for New South Wales. It’s also possible that the address data is wrong (even though the location shown may be correct), and in some cases it is missing.

+

It’s possible that some of the fines data for Queensland is a little off. This came from the State Library of Queensland but I know for a fact that some of the data was wrong (e.g. Gold Coast Libraries does not charge overdue fines, but the SLQ reports says it does).

+

I am particularly interested if you know of data sources for entire regions, states, or Australia — especially if they’re reliably kept up to date.

+

If you can fill in any of these blanks, please update the relevant CSV file and send a pull request. If your data is coming from somewhere in particular, you should also add that to sources.md in the relevant table.

+

Ideas for additional data

+

You might have an idea for library data that would be useful to map. I’m really happy to hear about these ideas! It’s possible that the information you want to map is unavailable, or just really hard to get, or maybe I will disagree that it’s useful. That’s ok - please ask anyway, expecially if you know where to find the data.

+

Improvements to documentation

+

I’m always — always — happy to hear how I can improve documentation. Even better if you make the edit and then send a pull request.

+

Improvements to the website design, layout, or information

+

You might have an idea for an improvement that’s not about the data per se, but rather about the website. Maybe there’s some accessibilty improvements I can make. Let me know!

+ +

By contributing to this project you agree to license your work under the following licenses:

+

/website/data/*: CC-BY-SA

+

everything else: GPL-3.0-or-later

+
+
+
+

This website and the data it uses licensed CC-BY-4.0

+
\ No newline at end of file diff --git a/website/index.html b/website/index.html index 8b8752f..882b19c 100644 --- a/website/index.html +++ b/website/index.html @@ -19,44 +19,48 @@

Library Map

Beta!

+ - +
+
Loading, please be patient...
-
Loading, please be patient...
- - - - - - - - - - -
-

Made by Hugh Rundle using open data. Play with the layers by using the layer control at the top right of the map.

-

Email librarymap@hugh.run if you have any tips or suggestions.

-

You need a modern browser with JavaScript enabled to use Library Map. This site does not work in Internet Explorer.

-
- -
-
- -
- -
- - - - + + + + + + + + + +
+

Made by Hugh Rundle using open data. Play with the layers by using the layer control at the top right of the map.

+

Email librarymap@hugh.run if you have any tips or suggestions.

+

You need a modern browser with JavaScript enabled to use Library Map. This site does not work in Internet Explorer.

+
+ +
+
+ +
+ +
+ + + + +
+
+

This website and the data it uses licensed CC-BY-4.0

+
diff --git a/website/load-map.js b/website/load-map.js index 599abb0..7c909e7 100644 --- a/website/load-map.js +++ b/website/load-map.js @@ -74,7 +74,7 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches]) layer.on({ mouseover: e => highlightFeature(e), mouseout: e => resetHighlight(e, fines), - click: zoomToFeature + click: e => zoomToFeature(e, feature.properties), }) } }); @@ -320,10 +320,11 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches]) } // add control layers + var isSmallScreen = window.screen.availWidth < 800; var mapControl = L.control.layers( baseMaps, overlayMaps, - { "collapsed" : false } + { "collapsed" : isSmallScreen } ).addTo(map); // scale @@ -344,15 +345,19 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches]) setGeneral() mapControl.remove(); infoBoxes.branches.remove() - mapControl = L.control.layers(baseMaps, overlayMaps, {"collapsed": false}).addTo(map); - infoBoxes.branches.addTo(map) + mapControl = L.control.layers(baseMaps, overlayMaps, {"collapsed": isSmallScreen}).addTo(map); + if (!isSmallScreen) { + infoBoxes.branches.addTo(map) + } } else { sessionStorage.setItem('mapMode', 'fragile'); setFragile() mapControl.remove(); infoBoxes.branches.remove() - mapControl = L.control.layers(baseMaps, overlayMaps, {"collapsed": false}).addTo(map); - infoBoxes.branches.addTo(map) + mapControl = L.control.layers(baseMaps, overlayMaps, {"collapsed": isSmallScreen}).addTo(map); + if (!isSmallScreen) { + infoBoxes.branches.addTo(map) + } } } @@ -379,15 +384,32 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches]) if (!L.Browser.ie && !L.Browser.opera && !L.Browser.edge) { layer.bringToFront(); } - infoBoxes.serviceInfo.addTo(map) - infoBoxes.serviceInfo.update(layer.feature.properties); + if (!isSmallScreen) { + infoBoxes.serviceInfo.addTo(map) + infoBoxes.serviceInfo.update(layer.feature.properties) + } + } + + + function zoomToFeature(e, props) { + map.fitBounds(e.target.getBounds()); + e.target.bindPopup(` + ${props.name}` + + `

Fines: ` + + ( + props.fines === "no" ? "No" : + props.fines == "no_unconfirmed" ? "Probably no" : + props.fines === "yes" ? "Yes" : + props.fines == "adults" ? "No for children" : + props.fines == "by_lga" ? "Varies by LGA" : "Unknown" + ) + + `
Loans : ` + + (!props.standard_loan_weeks || props.standard_loan_weeks == "?" ? `Unknown` : `${props.standard_loan_weeks} weeks`) + + `

` + ).openPopup() } // clear on mouseout - function zoomToFeature(e) { - map.fitBounds(e.target.getBounds()); - } - function resetHighlight(e, layer) { layer.resetStyle(e.target); infoBoxes.serviceInfo.remove() @@ -423,7 +445,9 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches])

Library Branches

Circles represent an 800 metre radius from the library location. This is the distance generally used by urban planners to represent "conceptually within walking distance" for most people.

`}; - infoBoxes.branches.addTo(map) // add by default + if (!isSmallScreen) { + infoBoxes.branches.addTo(map) // add by default it larger screen + } // STANDARD LOAN PERIOD LEGEND infoBoxes.loanPeriod.onAdd = addLegend; @@ -498,10 +522,14 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches]) // add info boxes & markers when relevant layer is added map.on('overlayadd', l => { if (l.name == "Fines") { - infoBoxes.fines.addTo(map) + if (!isSmallScreen) { + infoBoxes.fines.addTo(map) + } } if (l.name == "Loan Period") { - infoBoxes.loanPeriod.addTo(map) + if (!isSmallScreen) { + infoBoxes.loanPeriod.addTo(map) + } loanPeriod.bringToBack() } }) @@ -533,7 +561,9 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches]) for (let k in overlayMaps ) { mapControl.addOverlay(overlayMaps[k], k) } - infoBoxes.branches.addTo(map); + if (!isSmallScreen) { + infoBoxes.branches.addTo(map) + } modeButton.setAttribute('class', 'visible'); } }) diff --git a/website/sources/index.html b/website/sources/index.html index 37d8a59..575561e 100644 --- a/website/sources/index.html +++ b/website/sources/index.html @@ -15,171 +15,176 @@

Sources & Attributions

Beta!

+ - -
-

Sources & Attributions

-

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

-

If you believe I have breached a license in using your data, or attributed it incorrectly, please get in touch at librarymap@hugh.run

-

Visualisation

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SourceLinkLicense
leaflet.jsleafletjs.comBSD-2-Clause
leaflet.geoCSVGitHubGPL-3.0-or-later
leaflet.patternGitHubBSD-2-Clause
MapBoxmapbox.comcustom ToS
OpenStreetMapopenstreetmap.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
PSMAdata.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 Interestdata.vic.gov.au FoICC-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 NTNT government website© (fair dealing)
WA NSLA statisticspersonal communication© (fair dealing)
Public Library Services (DoPC South Australia)Find a Library© (fair dealing)
-
+
+
+

Sources & Attributions

+

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

+

If you believe I have breached a license in using your data, or attributed it incorrectly, please get in touch at librarymap@hugh.run

+

Visualisation

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SourceLinkLicense
leaflet.jsleafletjs.comBSD-2-Clause
leaflet.geoCSVGitHubGPL-3.0-or-later
leaflet.patternGitHubBSD-2-Clause
MapBoxmapbox.comcustom ToS
OpenStreetMapopenstreetmap.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
PSMAdata.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 Interestdata.vic.gov.au FoICC-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 NTNT government website© (fair dealing)
WA NSLA statisticspersonal communication© (fair dealing)
Public Library Services (DoPC South Australia)Find a Library© (fair dealing)
+
+
+
+

This website and the data it uses licensed CC-BY-4.0

+
diff --git a/website/style.css b/website/style.css index 9108e7d..a358e0f 100644 --- a/website/style.css +++ b/website/style.css @@ -1,3 +1,13 @@ +html { + height: 100%; +} + +body { + min-height: 100%; + display: grid; + grid-template-rows: auto 1fr auto; +} + html, body { font-family: "Calibri", Arial, Tahoma, sans-serif; @@ -5,6 +15,13 @@ body { padding: 0; } +code, +pre { + font-family: "Jetbrains Mono", "Consolas", "Courier New", monospace; + background-color: #eee; + padding: 0 0.5em; +} + a, a:active { color: #FF3961; @@ -25,13 +42,27 @@ a:hover { header { margin: 0; + padding: 0; + display: grid; + grid-template-columns: auto 1fr auto; + font-family: "Calibri", Arial, Tahoma, sans-serif; + background-color: #000; + color: #fff; +} +/* NAVIGATION */ +/* ========== */ + +nav { + margin: 0; + padding: 0; + grid-row: 3; } -nav, nav ul { font-family: "Calibri", Arial, Tahoma, sans-serif; background-color: #000; margin: 0; + padding-left: 2em; } nav li { @@ -56,8 +87,52 @@ nav li a:hover { .active-tab { color: #000; background-color: #fff; + border-top-right-radius: 10px; } +@media only screen and (max-width: 800px) { + + nav ul { + margin-left: 0; + padding-left: 0; + } + + nav li { + display: block; + margin: 0; + padding: 0.5em 0 0.5em 1em; + border-color: #777; + border-left: none; + border-right: none; + } +} + +#title { + display: flex; + align-items: center; + margin: 0; + padding: 0.5em 1em; +} + +#logo { + height: 4em; + margin: 0 1em; +} + +#beta { + font-family: "Comic Sans", Helvetica, Arial, sans-serif; + font-weight: bold; + font-size: 1.4em; + margin-left: 1em; + transform: rotate(-35deg); + background-color: #fff; + color: #FF3961; + padding: 0.25em 0.5em; + border-radius: 5px; +} + +/* loading */ +/* ======= */ #loading { font-family: "Calibri", Arial, Tahoma, sans-serif; font-size: 20px; @@ -107,36 +182,10 @@ nav li a:hover { font-family: "Calibri", Arial, Tahoma, sans-serif; } -header { - margin: auto; - display: grid; - grid-template-columns: auto 1fr auto; - padding: 0.5em 1em; - font-family: "Calibri", Arial, Tahoma, sans-serif; - background-color: #000; - color: #fff; -} - -#title { - display: flex; - align-items: center; -} - -#logo { - height: 4em; - margin-right: 1em; -} - -#beta { - font-family: "Comic Sans", Helvetica, Arial, sans-serif; - font-weight: bold; - font-size: 1.4em; - margin-left: 1em; - transform: rotate(-35deg); - background-color: #fff; - color: #FF3961; - padding: 0.25em 0.5em; - border-radius: 5px; +footer { + border-top: 1px solid #eee; + width: 100%; + text-align: center; } #mode-switch { @@ -169,10 +218,12 @@ header { } table { - margin: auto; border-collapse: collapse; + table-layout: fixed; border: 1px solid #000; - width: 80%; + margin: 0 auto 0 -25%; + width: 150%; + max-width: 54em; } thead { @@ -190,21 +241,23 @@ tbody td { padding: 0.5em 1em; } -.sources table { - margin: 0 auto 0 -25%; - width: 150%; - max-width: 54em; -} - +/* when below max width of para */ @media only screen and (max-width: 54em) { + .info-page, .sources { width: 95vw; + padding: 0 2.5vw; } - .sources table { + table { margin: 0 auto; width: 100%; - max-width: 100%; + max-width: 100vw; + font-size: smaller; + } + + td { + line-break: anywhere; } } \ No newline at end of file From 8c99dfc3fa04cba934b8decfc7a78d64becfd0ea Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sun, 24 Jan 2021 12:53:55 +1100 Subject: [PATCH 5/5] keep infoboxes regardless of overlays active This does not apply on smaller screens, where we hide the infoboxes fixes #9 --- website/load-map.js | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/website/load-map.js b/website/load-map.js index 7c909e7..f34485a 100644 --- a/website/load-map.js +++ b/website/load-map.js @@ -509,27 +509,9 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches]) )} } - // remove info boxes & markers when relevant layer is removed - map.on('overlayremove', l => { - if (l.name == "Fines") { - infoBoxes.fines.remove() - } - if (l.name == "Loan Period") { - infoBoxes.loanPeriod.remove() - } - }) - - // add info boxes & markers when relevant layer is added + // loan period layer is always at bottom map.on('overlayadd', l => { - if (l.name == "Fines") { - if (!isSmallScreen) { - infoBoxes.fines.addTo(map) - } - } if (l.name == "Loan Period") { - if (!isSmallScreen) { - infoBoxes.loanPeriod.addTo(map) - } loanPeriod.bringToBack() } }) @@ -551,6 +533,10 @@ Promise.all([boundaries, branchesCsv, ikcCsv, mechanics, nslaBranches]) mapControl.removeLayer(overlayMaps[i]) overlayMaps[i].remove() } + if (!isSmallScreen) { // only add infoboxes to larger screens + infoBoxes.loanPeriod.addTo(map) + infoBoxes.fines.addTo(map) + } modeButton.setAttribute('class', 'hidden'); // hide the mode button when it's not relevant } else { mapControl.removeLayer(fines)