fix Actions #55

Merged
hughrun merged 2 commits from testing into master 2021-01-29 08:36:25 +11:00
6 changed files with 6 additions and 11 deletions

View file

@ -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)

View file

@ -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

View file

@ -5,7 +5,6 @@ on:
- master
paths:
- website/data/library_services_information.csv
- website/data/boundaries.topo.json
jobs:
mergeData:
runs-on: ubuntu-latest

View file

@ -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