Closed DrMeers closed 3 years ago
Hmm, I'm getting a server error: https://represent.opennorth.ca/boundaries/prince-edward-island-electoral-districts-2017/?format=apibrowser
The log files are not helpful.
I'm assuming it's due to the polygons without names (the ...
lines at the end of the output). Can you make a PR to add: is_valid_func=lambda f: f.get('DISTRICT')
?
Indeed, that fixes it. I'll make the commit.
Thanks @jpmckinney ! One more question though -- trying to fix the PE scraper, and I get pupa.exceptions.UnresolvedIdError: cannot resolve pseudo id to Post: ~{"label": "Tyne Valley - Sherbrooke", "organization__classification": "legislature", "role": "MLA"}
-- how do I update scrapers-ca
with the new boundaries from epresent-canada-data
?
Ideally, you would update this scraper: https://github.com/opencivicdata/ocd-division-ids/blob/master/scripts/country-ca/ca_pe_electoral_districts.rb
Otherwise, you can directly edit this CSV: https://github.com/opencivicdata/ocd-division-ids/blob/master/identifiers/country-ca/province-pe-electoral_districts.csv
Then, you need to re-compile the identifiers for Canada with this script: https://github.com/opencivicdata/ocd-division-ids/tree/master/scripts#usage
And create a PR against that repository. Once that's merged, you'd copy the updated country-ca.csv to https://github.com/opencivicdata/scrapers-ca
Aha! Thanks @jpmckinney , would not have figured that out on my own :)
And create a PR against that repository.
Done: https://github.com/opencivicdata/ocd-division-ids/pull/248
Once that's merged
Or theoretically beforehand / in faith? See https://github.com/opencivicdata/scrapers-ca/pull/270
Hmm, I merged this without realizing that I had already added PEI in the private repo (we don't actually have an open data license for the files in this PR). I might have just not deployed it at the time.
Please let me know if this looks correct. The shapefiles contain separate polygons for each polling area within each district. I ran it with:
And all looks correct in the Django admin.