Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some CMAs and their provincial sub-parts have the same population values #199

Open
QU4N7UM opened this issue Apr 3, 2023 · 2 comments
Open

Comments

@QU4N7UM
Copy link

QU4N7UM commented Apr 3, 2023

In the 2021 dataset, the 4 CMAs that share a provincial border between 2 provinces (for example GeoUID 505 and its sub-parts 35505 (Ontario part) and 24505 (Quebec part)) all have the same Population values while, I think, we can actually get their respectives (sub) values in StatCan, am I mistaking?

For info, the 4 CMAs in question are Campbellton(GeoUID 330), Hawkesbury (GeoUID 502), Lloydminster (GeoUID 840), and Ottawa - Gatineau (GeoUID 505).

@mountainMath
Copy link
Owner

mountainMath commented Apr 3, 2023

Thanks for flagging, that's a bug. Will investigate and fix. In the meantime, you can get the accurate population by querying the census vector

cancensus::get_census("2021",regions=list(CMA=c("35505","505","24505")),vectors=c("v_CA21_1")) |> 
  select(GeoUID,`Region Name`,`v_CA21_1: Population, 2021`)
# A tibble: 3 × 3
  GeoUID `Region Name`                                              `v_CA21_1: Population, 2021`
  <chr>  <fct>                                                                             <dbl>
1 24505  Ottawa - Gatineau (partie du Québec / Quebec part) (B)                           353293
2 35505  Ottawa - Gatineau (Ontario part / partie de l'Ontario) (B)                      1135014
3 505    Ottawa - Gatineau (B)                                                           1488307

@QU4N7UM
Copy link
Author

QU4N7UM commented Apr 3, 2023

Thanks a bunch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants