diff --git a/about.md b/about.md index 51453e7..2d57498 100644 --- a/about.md +++ b/about.md @@ -51,3 +51,16 @@ If this naming convention makes you uncomfortable, you may view the map in *Whit * Indigenous Knowledge Centres * Mechanics Institutes * National & State Libraries + +### Important files that are not in this repository + +If you look at `merge_service_data.py` you will notice that there are two files used in creating `website/data/boundaries.topo.json` that are missing from this repository: + +* website/data/boundaries.geojson +* website/data/all_library_services.geojson + +The first is the "core" geojson file with boundaries for each library service. The only other data it holds is the name of each area. The second is the file created when we run `merge_service_data.py` to merge data from `website/data/library_services_information.csv` into `website/data/boundaries.topo.json`. + +These files aren't included in the GitHub repo for the simple reason that Git has a 100MB limit, and both files are larger than that. + +If you want to update library service data (e.g. to add missing data about the standard loan period for a particular library service) then **you should edit `website/data/library_services_information.csv`** — *not* `website/data/boundaries.topo.json`. After I merge your PR I will then pull down the updated file, run the merge script, and update the topoJSON file. It would be better to automate this and I can probably rewrite the script to update the TopoJSON directly, but currently that's the workflow, and it will *always* be that contributors should update the CSV file, not the JSON. \ No newline at end of file diff --git a/contributing.md b/contributing.md index edc7913..2ec3d08 100644 --- a/contributing.md +++ b/contributing.md @@ -8,6 +8,23 @@ I'd love your help to make *Library Map* as accurate and useful as possible. 2. You can [send a pull request](https://docs.github.com/en/github/.collaborating-with-issues-and-pull-requests/about-pull-requests) — though it is *strongly preferred* that you either ask to be assigned to an existing issue, or create a new issue, first. 3. 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: + +* `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](about#important-files-that-are-not-in-this-repository). + +### 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**. @@ -30,4 +47,12 @@ I'm always — *always* — happy to hear how I can improve documentatio ### 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! \ No newline at end of file +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! + +### Licensing and copyright + +By contributing to this project you agree to license your work under the following licenses: + +**/website/data/\***: [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) + +**everything else**: [GPL-3.0-or-later](https://www.gnu.org/licenses/gpl-3.0.txt) \ No newline at end of file diff --git a/merge_service_data.py b/merge_service_data.py index 4599a13..7f74b57 100644 --- a/merge_service_data.py +++ b/merge_service_data.py @@ -5,15 +5,15 @@ 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' +geojson_file = 'website/data/all_library_services.geojson' +csv_file = 'website/data/library_services_information.csv' # fields to match on geojson_match = 'name' csv_match = 'short_name' # output file name -output_file = 'data/boundaries.geojson' +output_file = 'website/data/boundaries.geojson' # open the geojson file file = open(geojson_file, 'r')