diff --git a/boundaries/ocd-division/country:ca/province:qc/2017/definition.py b/boundaries/ocd-division/country:ca/province:qc/2017/definition.py index 1890821..5eb289e 100644 --- a/boundaries/ocd-division/country:ca/province:qc/2017/definition.py +++ b/boundaries/ocd-division/country:ca/province:qc/2017/definition.py @@ -2,11 +2,21 @@ import boundaries + +def namer(f): + import boundaries + n = boundaries.clean_attr('NM_CEP') + # https://fr.wikipedia.org/wiki/Camille-Laurin_(circonscription_provinciale) + if n == 'Bourget': + return 'Camille-Laurin' + return n + + boundaries.register('Quebec electoral districts (2017)', singular='Quebec electoral district', domain='Quebec', last_updated=date(2017, 10, 4), - name_func=boundaries.clean_attr('NM_CEP'), + name_func=namer, id_func=boundaries.attr('CO_CEP'), authority='Directeur général des élections du Québec', source_url='https://www.electionsquebec.qc.ca/francais/provincial/carte-electorale/geometrie-des-circonscriptions-provinciales-du-quebec.php', diff --git a/boundaries/ocd-division/country:ca/territory:nt/2013/definition.py b/boundaries/ocd-division/country:ca/territory:nt/2013/definition.py index cf1bce0..9a96741 100644 --- a/boundaries/ocd-division/country:ca/territory:nt/2013/definition.py +++ b/boundaries/ocd-division/country:ca/territory:nt/2013/definition.py @@ -4,8 +4,7 @@ def namer(f): - import boundaries - n = boundaries.attr('ED')(f) + n = f.get('ED') # @see bhttps://www.ntlegislativeassembly.ca/members/members-legislative-assembly/members if n == 'Deh Cho': return 'Dehcho'