cancensus icon indicating copy to clipboard operation
cancensus copied to clipboard

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

Open QU4N7UM opened this issue 2 years ago • 2 comments

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).

QU4N7UM avatar Apr 03 '23 19:04 QU4N7UM

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

mountainMath avatar Apr 03 '23 19:04 mountainMath

Thanks a bunch!

QU4N7UM avatar Apr 03 '23 19:04 QU4N7UM