In the main data download functions for naturecounts, nc_data_dl() and nc_count(), you have the option of filtering data by region. In this article we will explore the various ways of specifying regional filters.

For more details regarding spatial limits to regions, see the articles:

In short

region must be a named list with one of the following:

  • country - Country code (e.g., CA for Canada)
  • statprov - State/province code (e.g., MB for Manitoba)
  • subnational2 - Subnational (type 2) code (e.g., CA.MB.07 for the Brandon Area)
  • iba - Important Bird Areas (IBA) code (e.g., AB001 for Beaverhill Lake in Alberta)
  • bcr - Bird Conservation Regions (e.g., 2 for Western Alaska)
  • utm_squares - UTM square code (e.g., 10UFE96 for a grid in Alberta)
  • bbox - Bounding box coordinates (e.g., c(left = -101.097223, bottom = 50.494717, right = -99.511239, top = 51.027557) for a box containing Riding Mountain National Park in Manitoba)

To use the region argument:

nc_count(region = list(statprov = "NB"))
## Without a username, using 'show = "all"'
## Using filters: statprov (NB)
## # A tibble: 83 × 4
##    collection    akn_level access     nrecords
##    <chr>             <int> <chr>         <int>
##  1 ATOWLS                4 by request    13172
##  2 BBS                   5 full          54578
##  3 BBS50-CAN             5 full         207572
##  4 CBC                   2 no access     21559
##  5 EBIRD-CA-AT           4 by request  1922905
##  6 EBIRD-CA-SENS         3 by request       89
##  7 EBUTTERFLY            5 full           2393
##  8 GBBC                  4 by request    12215
##  9 GBIF_02DD359E         5 full            470
## 10 GBIF_040C5662         5 full             43
## # ℹ 73 more rows

In Detail - Codes

Country

Search by name (English or French)

search_region("États-Unis", type = "country")
## # A tibble: 3 × 3
##   country_code country_name                         country_name_fr                       
##   <chr>        <chr>                                <chr>                                 
## 1 UM           United States Minor Outlying Islands Îles mineures éloignées des États-Unis
## 2 US           United States                        États-Unis                            
## 3 VI           Virgin Uslands, U.S.                 Îles Vierges des États-Unis

Browse the code list

Use the resulting code(s)

nc_count(region = list(country = c("US", "CA")))

State/Province

Search by name (English, French, or Spanish)

search_region("Distrito de Colombia", type = "statprov")
## # A tibble: 1 × 5
##   country_code statprov_code statprov_name_es     statprov_name        statprov_name_fr    
##   <chr>        <chr>         <chr>                <chr>                <chr>               
## 1 US           DC            Distrito de Colombia District of Columbia District de Columbia

Browse the code list

Use the resulting code(s)

nc_count(region = list(statprov = c("DC", "MB")))
## Without a username, using 'show = "all"'
## Using filters: statprov (DC, MB)
## # A tibble: 104 × 4
##    collection    akn_level access     nrecords
##    <chr>             <int> <chr>         <int>
##  1 ABBIRDRECS            5 full            357
##  2 BBS                   5 full          86997
##  3 BBS50-CAN             5 full         493120
##  4 CBC                   2 no access     29107
##  5 CMMN-DET-DMBO         2 no access     93013
##  6 EBIRD-CA-PR           4 by request  3367908
##  7 EBIRD-CA-SENS         3 by request     4898
##  8 EBUTTERFLY            5 full            247
##  9 GBBC                  4 by request    20996
## 10 GBIF_040C5662         5 full            217
## # ℹ 94 more rows

Subnational regions (type 2)

Search by name
Language depends on location: - Mexico = Spanish - USA = English - Quebec = French - Rest of Canada = English

search_region("Montreal", type = "subnational2")
## # A tibble: 1 × 5
##   country_code statprov_code subnational2_code subnational2_name              ebird_code
##   <chr>        <chr>         <chr>             <chr>                          <chr>     
## 1 CA           QC            CA.QC.MR          Communauté-Urbaine-de-Montréal CA-QC-MR

Browse the code list

Use the resulting code(s)

nc_count(region = list(subnational2 = c("CA-QC-MR", "CA-ON-TO")))
## Without a username, using 'show = "all"'
## Using filters: subnational2 (CA-QC-MR, CA-ON-TO)
## # A tibble: 430 × 4
##    collection    akn_level access     nrecords
##    <chr>             <int> <chr>         <int>
##  1 ABATLAS1              5 full         123364
##  2 ABATLAS2              5 full         201357
##  3 ABBIRDRECS            5 full         357264
##  4 ATBANS                3 by request      102
##  5 ATOWLS                4 by request    25268
##  6 BBS                   5 full        5735895
##  7 BBS50-CAN             5 full        4543180
##  8 BBS50-US-EAST         5 full       10761296
##  9 BBS50-US-WEST         5 full       11665251
## 10 BCATLAS1BE_DO         5 full          41412
## # ℹ 420 more rows

Important Bird Areas (IBA)

  • These are Canadian designations

Search by name (English or French)

search_region("oak hammock", type = "iba")
## # A tibble: 1 × 13
##   iba_site iba_name_fr      latitude statprov area_ha alt_min iba_name nearest_town bcr   ncc_region
##   <chr>    <chr>               <dbl> <chr>      <dbl>   <dbl> <chr>    <chr>        <chr> <chr>     
## 1 MB010    Oak Hammock Mar…     50.2 MB          67.6     233 Oak Ham… Winnipeg     11    35        
## # ℹ 3 more variables: alt_max <dbl>, longitude <dbl>, status <chr>

Browse the code list

Use the resulting code(s)

nc_count(region = list(iba = c("MB010", "AB011")))
## Without a username, using 'show = "all"'
## Using filters: iba (IBA.MB010, IBA.AB011)
## # A tibble: 18 × 4
##    collection      akn_level access     nrecords
##    <chr>               <int> <chr>         <int>
##  1 ABATLAS1                5 full            130
##  2 ABATLAS2                5 full             99
##  3 ABBIRDRECS              5 full              9
##  4 EBIRD-CA-PR             4 by request   204590
##  5 EBIRD-CA-SENS           3 by request       76
##  6 EBUTTERFLY              5 full              3
##  7 GBIF_040C5662           5 full              1
##  8 GBIF_50C9509D           5 full           1539
##  9 GBIF_6AC3F774           5 full             43
## 10 GBIF_848586A4           5 full              2
## 11 GBIF_8BE43F9B           5 full             16
## 12 GBIF_B1047888           5 full              5
## 13 MBATLAS1BE_DO           5 full            309
## 14 MBATLAS1BE_RAW          5 full           1004
## 15 MBATLAS1BE_SUMM         5 full            208
## 16 MBATLAS1PC              5 full            381
## 17 MBATLAS1RC              3 by request       23
## 18 NESTWATCH               3 by request        2

Bird Conservation Regions (BCR)

Search by name (English, French, or Spanish)

search_region("rainforest", type = "bcr")
## # A tibble: 1 × 4
##     bcr bcr_name                    bcr_name_es                        bcr_name_fr                  
##   <int> <chr>                       <chr>                              <chr>                        
## 1     5 Northern Pacific Rainforest Bosque Lluvioso del Pacífico Norte Forêts pluviales du nord de …

Browse the code list

Use the resulting code(s)

nc_count(region = list(bcr = c(5, 2)))
## Without a username, using 'show = "all"'
## Using filters: bcr (BCR.05, BCR.02)
## # A tibble: 141 × 4
##    collection      akn_level access     nrecords
##    <chr>               <int> <chr>         <int>
##  1 BBS50-CAN               5 full         139810
##  2 BBS50-US-WEST           5 full         844519
##  3 BCATLAS1BE_DO           5 full           8171
##  4 BCATLAS1BE_RAW          5 full          84685
##  5 BCATLAS1BE_SUMM         5 full          35528
##  6 BCATLAS1PC              5 full          52256
##  7 BCATLAS1RC              3 by request     6309
##  8 BCCWS                   4 by request   417073
##  9 BCMMP_BIRDS             3 by request     4647
## 10 BCMMP_FROGS             3 by request      423
## # ℹ 131 more rows

UTM Squares

Browse the code list

Use the resulting code(s)

nc_count(region = list(utm_squares = "18TUR35"))
## Without a username, using 'show = "all"'
## Using filters: utm_squares (18TUR35)
## # A tibble: 21 × 4
##    collection    akn_level access     nrecords
##    <chr>             <int> <chr>         <int>
##  1 EBIRD-CA-ON           4 by request    27149
##  2 GBIF_136560FA         5 full              6
##  3 GBIF_50C9509D         5 full            140
##  4 GBIF_848586A4         5 full              6
##  5 GBIF_E3B959D6         5 full              1
##  6 GBIF_E5C5CAD9         5 full              2
##  7 GBIF_F6E21753         5 full             35
##  8 MMPFROGS              4 by request       37
##  9 NESTWATCH             3 by request       65
## 10 OBBA1BE_RAW           5 full            178
## # ℹ 11 more rows

Bounding Box

Bounding box reflects latitude and longitude limits.

Use the resulting code(s)

nc_count(region = list(bbox = c(left = -125, bottom = 45, 
                                right = -100, top = 50)))
## Without a username, using 'show = "all"'
## Using filters: bbox_left (-125); bbox_bottom (45); bbox_right (-100); bbox_top (50)
## # A tibble: 165 × 4
##    collection      akn_level access nrecords
##    <chr>               <int> <chr>     <int>
##  1 ABATLAS1                5 full       9827
##  2 ABATLAS2                5 full      25648
##  3 ABBIRDRECS              5 full      39546
##  4 BBS                     5 full     373698
##  5 BBS50-CAN               5 full     414770
##  6 BBS50-US-WEST           5 full    1435081
##  7 BCATLAS1BE_DO           5 full       8786
##  8 BCATLAS1BE_RAW          5 full     106886
##  9 BCATLAS1BE_SUMM         5 full      41747
## 10 BCATLAS1PC              5 full      56786
## # ℹ 155 more rows