Skip to content

Commit

Permalink
Add Canadian provincial and territorial flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Lennox committed Feb 21, 2017
1 parent 9a05f9d commit 3b86828
Show file tree
Hide file tree
Showing 43 changed files with 12,887 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -2,7 +2,8 @@

This package is a collection of flags for geographic region and sub-region codes.
The regions are based on the data from [BCP 47][0] and selected sub-regions (US
states and some sub-regions of Great Britain) are based on [ISO 3166-2:US][1] and [ISO-3166-2:GB][2].
states, Canadian provinces and territories, and some sub-regions of Great Britain)
are based on [ISO 3166-2:US][1], [ISO 3166-2:CA][2], and [ISO-3166-2:GB][2].

Most people think of these regions from BCP 47 as country flags, but there are a
few codes / flags that do not correspond to countries. The flags are in SVG and
Expand All @@ -29,6 +30,7 @@ regional or political parent. These are listed in file `ALIASES`.
The sub-regions currently covered are:

- US states and the District of Columbia
- Canadian provinces and territories
- Countries of England, Scotland, and Wales in Great Britain
- The province Northern Ireland in Great Britain

Expand Down Expand Up @@ -88,3 +90,4 @@ See file `COPYING` for details.
[0]: http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
[1]: https://www.iso.org/obp/ui/#iso:code:3166:US
[2]: https://www.iso.org/obp/ui/#iso:code:3166:GB
[3]: https://www.iso.org/obp/ui/#iso:code:3166:CA
1 change: 1 addition & 0 deletions data/ALIASES-WP
Expand Up @@ -2,6 +2,7 @@
Ascension Island Ascension Island PD
British Indian Ocean Territory the British Indian Ocean Territory
Brunei Darussalam Brunei
CA-NT the Northwest Territories
Canary Islands the Canary Islands (simple)
Central African Republic the Central African Republic
Cocos (Keeling) Islands the Cocos (Keeling) Islands
Expand Down
31 changes: 31 additions & 0 deletions data/iso-3166-2-ca.tsv
@@ -0,0 +1,31 @@
; ISO 3166-2:CA
; Source: https://www.iso.org/obp/ui/#iso:code:3166:CA
; Extracted on: 20170221
;
; Subdivision category 3166-2 code Subdivision name Language code Romanization system Parent subdivision
province CA-AB Alberta fr
province CA-AB Alberta en
province CA-BC British Columbia en
province CA-BC Colombie-Britannique fr
province CA-PE Île-du-Prince-Édouard fr
province CA-MB Manitoba en
province CA-MB Manitoba fr
province CA-NB New Brunswick en
province CA-NL Newfoundland and Labrador en
territory CA-NT Northwest Territories en
province CA-NB Nouveau-Brunswick fr
province CA-NS Nouvelle-Écosse fr
province CA-NS Nova Scotia en
territory CA-NU Nunavut fr
territory CA-NU Nunavut en
province CA-ON Ontario fr
province CA-ON Ontario en
province CA-PE Prince Edward Island en
province CA-QC Quebec en
province CA-QC Québec fr
province CA-SK Saskatchewan fr
province CA-SK Saskatchewan en
province CA-NL Terre-Neuve-et-Labrador fr
territory CA-NT Territoires du Nord-Ouest fr
territory CA-YT Yukon fr
territory CA-YT Yukon en
367 changes: 367 additions & 0 deletions html/CA-AB.html

Large diffs are not rendered by default.

415 changes: 415 additions & 0 deletions html/CA-BC.html

Large diffs are not rendered by default.

377 changes: 377 additions & 0 deletions html/CA-MB.html

Large diffs are not rendered by default.

365 changes: 365 additions & 0 deletions html/CA-NB.html

Large diffs are not rendered by default.

387 changes: 387 additions & 0 deletions html/CA-NL.html

Large diffs are not rendered by default.

432 changes: 432 additions & 0 deletions html/CA-NS.html

Large diffs are not rendered by default.

352 changes: 352 additions & 0 deletions html/CA-NT.html

Large diffs are not rendered by default.

417 changes: 417 additions & 0 deletions html/CA-NU.html

Large diffs are not rendered by default.

440 changes: 440 additions & 0 deletions html/CA-ON.html

Large diffs are not rendered by default.

357 changes: 357 additions & 0 deletions html/CA-PE.html

Large diffs are not rendered by default.

512 changes: 512 additions & 0 deletions html/CA-QC.html

Large diffs are not rendered by default.

375 changes: 375 additions & 0 deletions html/CA-SK.html

Large diffs are not rendered by default.

339 changes: 339 additions & 0 deletions html/CA-YT.html

Large diffs are not rendered by default.

Binary file added png/CA-AB.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added png/CA-BC.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added png/CA-MB.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added png/CA-NB.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added png/CA-NL.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added png/CA-NS.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added png/CA-NT.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added png/CA-NU.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added png/CA-ON.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added png/CA-PE.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added png/CA-QC.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added png/CA-SK.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added png/CA-YT.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion regions.py
Expand Up @@ -67,10 +67,12 @@ def load_subregions():

entries.extend(load_subregion_entries('data/iso-3166-2-us.tsv'))
entries.extend(load_subregion_entries('data/iso-3166-2-gb.tsv'))
entries.extend(load_subregion_entries('data/iso-3166-2-ca.tsv'))

subregions = [e for e in entries if
e['Subdivision category']
in ['province', 'country', 'state', 'district']] # US states and DC, plus countries of GB
in ['province', 'territory', 'country', 'state', 'district'] and
e['Language code'] == 'en'] # US states and DC, Canadian provinces and territories, countries of GB

subregions = {e['3166-2 code']: e for e in subregions}

Expand Down
92 changes: 92 additions & 0 deletions svg/CA-AB.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
215 changes: 215 additions & 0 deletions svg/CA-BC.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
628 changes: 628 additions & 0 deletions svg/CA-MB.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
242 changes: 242 additions & 0 deletions svg/CA-NB.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
108 changes: 108 additions & 0 deletions svg/CA-NL.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3b86828

Please sign in to comment.