commit
d2fe80e0c8
2
.github/scripts/merge_csv_to_topojson.py
vendored
2
.github/scripts/merge_csv_to_topojson.py
vendored
|
@ -10,7 +10,7 @@ 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']['geometries']:
|
||||
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)
|
||||
|
|
5
.github/scripts/minify-map-json.sh
vendored
5
.github/scripts/minify-map-json.sh
vendored
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
sudo npm install -g mapshaper
|
||||
mapshaper ./boundaries.geo.json snap -clean -o force precision=0.0001 format=geojson ./boundaries.geo.json
|
||||
sudo npm install -g topojson-server
|
||||
geo2topo ./boundaries.geo.json -q 50000 > ./website/data/boundaries.topo.json
|
1
.github/workflows/merge-csv-to-topojson.yml
vendored
1
.github/workflows/merge-csv-to-topojson.yml
vendored
|
@ -5,7 +5,6 @@ on:
|
|||
- master
|
||||
paths:
|
||||
- website/data/library_services_information.csv
|
||||
- website/data/boundaries.topo.json
|
||||
jobs:
|
||||
mergeData:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
1
.github/workflows/minify-map-json.yml
vendored
1
.github/workflows/minify-map-json.yml
vendored
|
@ -19,6 +19,7 @@ jobs:
|
|||
mapshaper boundaries.geo.json snap -clean -o force precision=0.0001 format=geojson boundaries.geo.json
|
||||
sudo npm install -g topojson-server
|
||||
geo2topo boundaries.geo.json -q 50000 > website/data/boundaries.topo.json
|
||||
python3 ./.github/scripts/merge_csv_to_topojson.py
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue