I have a very complex script that scrapes URLs of municipalities across Canada from the FCM's website, and matches them to a census subdivision according to their name and province. It produces this file.
There are other sources of URLs, such as CivicInfoBC. I wouldn't base myself off the script I'd written, and instead just start by trying to do straight name matching against the list of census subdivisions for BC (just limit yourself to those whose code starts with "59" to get only BC). There are only a few subdivisions with the same name in BC, in which case you need to match on name plus type.
Langley
North Vancouver
Esquimalt
Sechelt
Okanagan 1
Alert Bay
If this works, we can add others for other provinces. You can write the script in a fork of ocd-division-ids.
I have a very complex script that scrapes URLs of municipalities across Canada from the FCM's website, and matches them to a census subdivision according to their name and province. It produces this file.
There are other sources of URLs, such as CivicInfoBC. I wouldn't base myself off the script I'd written, and instead just start by trying to do straight name matching against the list of census subdivisions for BC (just limit yourself to those whose code starts with "59" to get only BC). There are only a few subdivisions with the same name in BC, in which case you need to match on name plus type.
If this works, we can add others for other provinces. You can write the script in a fork of ocd-division-ids.