Skip to content

Commit

Permalink
fix(ca_qc_districts): em-dashes in Sherbrooke borough
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jun 26, 2024
1 parent a950b71 commit 207816b
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions boundaries/ca_qc_districts/definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,7 @@ def district_namer(f):
}.get(name, name)

if name:
# Check if required with:
# ogrinfo -al -geom=NO boundaries/ca_qc_districts | grep ' no '
if 'District no ' in name:
return f.get('NM_DIS').replace(' no ', ' ') # Baie-Saint-Paul
return boundaries.clean_attr('NM_DIS')(f)

if f.get('MODE_SUFRG') == 'Q':
return 'Quartier %s' % int(type_id)
return 'District %s' % int(type_id)
Expand Down Expand Up @@ -410,9 +405,9 @@ def district_ider(f):
)

# Check the names with (replace `CODE`):
# ogrinfo -al -geom=NO boundaries/ca_qc_districts | grep -B3 CODE | sort | uniq
# ogrinfo -al -geom=NO boundaries/ca_qc_districts | grep -B4 CODE | sort | uniq
# Check the identifiers with:
# ogrinfo -al -geom=NO boundaries/ca_qc_districts | grep -B4 CODE
# ogrinfo -al -geom=NO boundaries/ca_qc_districts | grep -B5 CODE
municipalities_with_boroughs = [
{
'name': 'Lévis',
Expand Down Expand Up @@ -482,7 +477,7 @@ def district_ider(f):
'name': 'Sherbrooke',
'geographic_code': 43027,
'boroughs': {
'ocd-division/country:ca/csd:2443027/borough:1': 'BromptonRock ForestSaint-ÉlieDeauville',
'ocd-division/country:ca/csd:2443027/borough:1': 'BromptonRock ForestSaint-ÉlieDeauville',
'ocd-division/country:ca/csd:2443027/borough:2': 'Fleurimont',
'ocd-division/country:ca/csd:2443027/borough:3': 'Lennoxville',
'ocd-division/country:ca/csd:2443027/borough:4': 'Nations',
Expand Down

0 comments on commit 207816b

Please sign in to comment.