Skip to contents

Get provinces and territories

Usage

get_provinces(geo_only = TRUE)

Arguments

geo_only

Logical, indicating if only provinces/territories should be returned. If FALSE, also returned non-geographic entities like Repatriated Canadians and the Federal Allocation for vaccinations.

Value

A data frame with a row per province/territory.

Examples


get_provinces()
#> # A tibble: 13 × 10
#>       id code  name    popul…¹   area    gdp geogr…² data_…³ updated_at         
#>    <int> <chr> <chr>     <int>  <int>  <int> <lgl>   <chr>   <dttm>             
#>  1     1 ON    Ontario  1.48e7 9.18e5 857384 TRUE    Report… 2022-08-21 20:10:20
#>  2     2 QC    Quebec   8.60e6 1.36e6 439375 TRUE    Report… 2022-08-22 04:22:17
#>  3     3 NS    Nova S…  9.92e5 5.33e4  44354 TRUE    No rep… 2022-08-15 16:52:42
#>  4     4 NB    New Br…  7.89e5 7.14e4  36966 TRUE    Report… 2022-08-15 16:50:10
#>  5     5 MB    Manito…  1.38e6 5.54e5  72688 TRUE    No rep… 2022-08-15 17:01:29
#>  6     6 BC    Britis…  5.21e6 9.25e5 295401 TRUE    Report… 2022-08-21 20:26:05
#>  7     7 PE    Prince…  1.64e5 5.66e3   6994 TRUE    Report… 2022-08-15 16:50:27
#>  8     8 SK    Saskat…  1.18e6 5.92e5  80679 TRUE    No rep… 2022-08-21 20:30:30
#>  9     9 AB    Alberta  4.44e6 6.42e5 344812 TRUE    Report… 2022-08-21 20:15:30
#> 10    10 NL    Newfou…  5.21e5 3.74e5  33241 TRUE    No rep… 2022-08-15 16:50:18
#> 11    11 NT    Northw…  4.55e4 1.18e6   4730 TRUE    No rep… 2022-08-15 16:50:34
#> 12    12 YT    Yukon    4.30e4 4.74e5   3046 TRUE    Report… 2022-08-15 16:51:21
#> 13    13 NU    Nunavut  3.94e4 1.94e6   3421 TRUE    No rep… 2022-08-15 16:51:02
#> # … with 1 more variable: density <dbl>, and abbreviated variable names
#> #   ¹​population, ²​geographic, ³​data_status
get_provinces(geo_only = FALSE)
#> # A tibble: 16 × 10
#>       id code  name   popul…¹    area    gdp geogr…² data_…³ updated_at         
#>    <int> <chr> <chr>    <int>   <int>  <int> <lgl>   <chr>   <dttm>             
#>  1     1 ON    Ontar…  1.48e7  917741 857384 TRUE    "Repor… 2022-08-21 20:10:20
#>  2     2 QC    Quebec  8.60e6 1356128 439375 TRUE    "Repor… 2022-08-22 04:22:17
#>  3     3 NS    Nova …  9.92e5   53338  44354 TRUE    "No re… 2022-08-15 16:52:42
#>  4     4 NB    New B…  7.89e5   71450  36966 TRUE    "Repor… 2022-08-15 16:50:10
#>  5     5 MB    Manit…  1.38e6  553556  72688 TRUE    "No re… 2022-08-15 17:01:29
#>  6     6 BC    Briti…  5.21e6  925186 295401 TRUE    "Repor… 2022-08-21 20:26:05
#>  7     7 PE    Princ…  1.64e5    5660   6994 TRUE    "Repor… 2022-08-15 16:50:27
#>  8     8 SK    Saska…  1.18e6  591670  80679 TRUE    "No re… 2022-08-21 20:30:30
#>  9     9 AB    Alber…  4.44e6  642317 344812 TRUE    "Repor… 2022-08-21 20:15:30
#> 10    10 NL    Newfo…  5.21e5  373872  33241 TRUE    "No re… 2022-08-15 16:50:18
#> 11    11 NT    North…  4.55e4 1183085   4730 TRUE    "No re… 2022-08-15 16:50:34
#> 12    12 YT    Yukon   4.30e4  474391   3046 TRUE    "Repor… 2022-08-15 16:51:21
#> 13    13 NU    Nunav…  3.94e4 1936113   3421 TRUE    "No re… 2022-08-15 16:51:02
#> 14    14 _RC   Repat… NA           NA     NA FALSE   ""      NA                 
#> 15    15 FA    Feder… NA           NA     NA FALSE   ""      2022-03-10 14:41:40
#> 16    16 NFR   Natio… NA           NA     NA FALSE   ""      2022-08-15 16:51:36
#> # … with 1 more variable: density <dbl>, and abbreviated variable names
#> #   ¹​population, ²​geographic, ³​data_status