Compare commits
No commits in common. "main" and "mergers" have entirely different histories.
27
README.md
27
README.md
|
@ -18,28 +18,19 @@ See [contributing](https://librarymap.hugh.run/contributing/), especially *[whic
|
|||
|
||||
## Deployment
|
||||
|
||||
The website for this project uses [git-webhooks](https://git.suboptimal.solutions/hugh/git-webhooks) with a customisation to run the `process.js` file that is found in this repository on each pull. The `process.js` file **is stored with the webhooks files** so that everything can be `npm install`ed together. Remember this if you ever need to update the file.
|
||||
The website for this project uses [git-webhooks](https://git.suboptimal.solutions/hugh/git-webhooks) with a customisation to run the `process.js` file that is found in this repository on each pull. The file is stored with the webhooks files so that everything can be `npm install`ed together.
|
||||
|
||||
This `process.js` file syncs any changes from the csv files into the topojson attributes (e.g. when a library changes their ILS).
|
||||
|
||||
## Updating the topojson
|
||||
|
||||
**NOTE**: If you update the topojson file and push, the server webhook will fail because there will be local changes. TODO: some way to fix this.
|
||||
### Update boundaries
|
||||
|
||||
### 1. Update boundaries
|
||||
* make a copy of `/public_library_map/boundaries.geo.json`
|
||||
* update in `qgis`
|
||||
* save the copied file
|
||||
|
||||
This could be a bit of faffing around, depending what you are trying to do. Merging existing entities together is reasonably easy, but if you need to pull a council area out of a regional library, for example, you might need to mess around with LGA maps.
|
||||
|
||||
**Always work with copies of the original files**.
|
||||
|
||||
1. `boundaries.geo.json` should be aligned with `boundaries.topo.json`. If in doubt, use `topojson-client`'s `topo2geo` to get a geojson file with the most up to date data from the topojson:
|
||||
|
||||
`topo2geo boundaries_new.geo.json < boundaries.topo.json`
|
||||
|
||||
2. update in `qgis`
|
||||
3. export out to geojson
|
||||
|
||||
### 2. Simplify to reduce the file size
|
||||
### Simplify to reduce the file size
|
||||
|
||||
#### Option 1
|
||||
|
||||
|
@ -50,13 +41,13 @@ This could be a bit of faffing around, depending what you are trying to do. Merg
|
|||
#### Option 2
|
||||
|
||||
```bash
|
||||
sudo npm install -g mapshaper # if not already installed
|
||||
sudo npm install -g mapshaper
|
||||
mapshaper boundaries.geo.json snap -clean -o force precision=0.0001 format=geojson boundaries.geo.json
|
||||
```
|
||||
### 3. Turn it back into `topojson`:
|
||||
### Turn it into `topojson`:
|
||||
|
||||
```bash
|
||||
sudo npm install -g topojson-server # if not already installed
|
||||
sudo npm install -g topojson-server
|
||||
geo2topo boundaries.geo.json -q 50000 > website/data/boundaries.topo.json
|
||||
```
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"name": "data-to-topo",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"main": "process.js",
|
||||
"dependencies": {
|
||||
"csv-parser": "^3.2.0"
|
||||
}
|
||||
}
|
|
@ -28,9 +28,8 @@ fs.createReadStream(`${data_directory}/library_services_information.csv`)
|
|||
// write back to file
|
||||
try {
|
||||
fs.writeFileSync(`${data_directory}/boundaries.topo.json`, JSON.stringify(data))
|
||||
console.log('topo updated')
|
||||
} catch (err) {
|
||||
console.error('ERROR writing topo file')
|
||||
console.error(err)
|
||||
console.err('ERROR writing topo file')
|
||||
}
|
||||
console.log('topo updated')
|
||||
})
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -6,6 +6,7 @@ Balranald Library,Balranald,nsw,yes,2,DECD Bookmark,http://www.balranald.nsw.gov
|
|||
Bathurst Library,Bathurst Regional,nsw,yes,4,Civica Spydus,https://www.bathurst.nsw.gov.au/library.html,
|
||||
Bayside Library,Bayside_nsw,nsw,yes,3,AIT Aurora,https://library.bayside.nsw.gov.au/resources/LocationsandHours.aspx#,
|
||||
Bega Valley Shire Library,Bega Valley,nsw,no,4,Libero,https://library.begavalley.nsw.gov.au,
|
||||
Berrigan Shire Library Service,Berrigan,nsw,yes,2,Libero,https://www.berriganshire.nsw.gov.au/library,
|
||||
Big Sky Libraries,Big Sky,nsw,yes,4,Civica Spydus,https://bsl.nsw.gov.au/elibrary,
|
||||
Blacktown City Libraries,Blacktown,nsw,no,3,Civica Spydus,https://www.blacktown.nsw.gov.au/Services/Libraries/Locations-and-hours,
|
||||
Blue Mountains City Library,Blue Mountains,nsw,no,3,SirsiDynix Symphony,https://library.bmcc.nsw.gov.au/client/en_AU/default,
|
||||
|
@ -42,7 +43,7 @@ Ku-ring-gai Library,Ku-Ring-Gai,nsw,yes,4,Civica Spydus,https://www.krg.nsw.gov.
|
|||
Lachlan Shire Library Service,Lachlan,nsw,?,?,Libero,https://www.lachlan.nsw.gov.au/community/lachlan-libraries.aspx,
|
||||
Lake Macquarie City Library,Lake Macquarie,nsw,yes,4,Civica Spydus,https://library.lakemac.com.au/Visit/Locations,
|
||||
Lane Cove Library,Lane Cove,nsw,adults,3,AIT Aurora,http://www.lanecove.nsw.gov.au/Community/Library/Pages/default.aspx,
|
||||
Wagga Wagga City Library,Wagga Wagga,nsw,no,4,Libero,https://waggalibrary.com.au/,
|
||||
Leeton Shire Major Dooley Library,Leeton,nsw,?,?,Libero,https://www.leeton.nsw.gov.au/community-services/library.aspx,
|
||||
Lithgow Library Learning Centre,Lithgow,nsw,no,4,Civica Spydus,http://library.lithgow.com/,
|
||||
Liverpool City Library,Liverpool,nsw,yes,3,Civica Spydus,https://mylibrary.liverpool.nsw.gov.au/,
|
||||
Macquarie Regional Library,Macquarie Regional,nsw,yes,3,Civica Spydus,http://www.mrl.nsw.gov.au/,
|
||||
|
|
|
Loading…
Reference in a new issue