opennorth / represent-canada-data

Digital electoral boundary files for Canada, its provinces and municipalities
http://represent.opennorth.ca/
Other
46 stars 17 forks source link

Move Ontario from private repository, now that open license is available #42

Closed JoeMurray closed 1 year ago

JoeMurray commented 2 years ago

I see 9 provinces and 1 territory in https://github.com/opennorth/represent-canada-data/tree/master/boundaries/ocd-division/country:ca . Is Ontario not covered, perhaps because of the license agreement requirement at https://www.elections.on.ca/en/voting-in-ontario/electoral-district-shapefiles/open-use-data-product-licence-agreement.html ?

jpmckinney commented 2 years ago

Ah, looks like they finally have an open license. We stored their shapefiles privately as they were distributing under this license: https://www.elections.on.ca/en/voting-in-ontario/electoral-district-shapefiles/limited-use-data-product-licence-agreement.html

jpmckinney commented 2 years ago

And yes, Ontario is in the API – it's just not in this repository of source files.

JoeMurray commented 2 years ago

Great!

JoeMurray commented 2 years ago

Just for my info, do you have a sense of when this ticket will be completed?

jpmckinney commented 2 years ago

Not sure – I don't really maintain this project anymore. What is your need? Adding it to this repository is just a convenience, rather than downloading it from the source.

JoeMurray commented 2 years ago

I don't have any GIS software currently installed on my desktop, so I have not run tested the PR I just submitted https://github.com/opennorth/represent-canada-data/pull/43 .

jpmckinney commented 1 year ago

Closing as not planned due to lack of resources – and because the file is easily discoverable on Elections Ontario's website, and the boundaries are queryable via the API – so there is really not much benefit to moving between repositories. (There would be a few extra steps on the server to prevent a conflict between the source/destination shapefiles.)

jpmckinney commented 1 year ago

FWIW, here is the definition.py file from the private repository (it differs from the one in the PR)

# coding: utf-8
from datetime import date

import boundaries

boundaries.register('Ontario electoral districts (Representation Act, 2015)',
    singular='Ontario electoral district',
    domain='Ontario',
    last_updated=date(2018, 4, 19),
    name_func=lambda f: f.get('ENGLISH_NA').replace('\x97', '—'),  # m-dash
    id_func=boundaries.attr('ED_ID'),
    authority='Her Majesty the Queen in Right of Ontario',
    source_url='https://www.elections.on.ca/en/voting-in-ontario/electoral-district-shapefiles/limited-use-data-product-licence-agreement/download-shapefiles.html',
    licence_url='https://www.elections.on.ca/en/voting-in-ontario/electoral-district-shapefiles/limited-use-data-product-licence-agreement.html',
    data_url='https://www.elections.on.ca/content/dam/NGW/sitecontent/2017/preo/shapefiles/Electoral%20District%20Shapefile%20-%202018%20General%20Election.zip',
    encoding='utf-8',
    extra={'division_id': 'ocd-division/country:ca/province:on'},
)