Skip to contents

This package makes easier to work with Freshwater Ecoregions of the World (FEOW) data, as it downloads and loads the shapefile files to the working directory.

We can start loading the package and using its main function, read_feow()

library(feowR)

feow_sf <- read_feow()

Then we can see that the packages has a list of all ecoregions provided

ecoregions_list
#> # A tibble: 426 × 4
#>       id realm    major_habitat_type                       ecoregion            
#>    <int> <chr>    <chr>                                    <chr>                
#>  1   101 Nearctic Polar freshwaters                        Alaskan Coastal      
#>  2   102 Nearctic Polar freshwaters                        Upper Yukon          
#>  3   103 Nearctic Temperate coastal rivers                 Alaska & Canada Paci…
#>  4   104 Nearctic Temperate floodplain rivers and wetlands Upper Mackenzie      
#>  5   105 Nearctic Polar freshwaters                        Lower Mackenzie      
#>  6   106 Nearctic Polar freshwaters                        Central Arctic Coast…
#>  7   107 Nearctic Temperate upland rivers                  Upper Saskatchewan   
#>  8   108 Nearctic Temperate upland rivers                  Middle Saskatchewan  
#>  9   109 Nearctic Large lakes                              English - Winnipeg L…
#> 10   110 Nearctic Temperate coastal rivers                 Southern Hudson Bay  
#> # ℹ 416 more rows

Now that we have the shapefile and the list of all ecoregions, we can select one big region (called realm) to study.

Let’s take a look at the Freshwater Ecoregions of Neotropical region!

We just have to join our datasets and filter the realm == "Neotropical", then we can plot it!

library(dplyr)
library(ggplot2)

feow_sf |>
  left_join(ecoregions_list, by = join_by("FEOW_ID" == "id")) |>
  filter(realm == "Neotropic") |>
  ggplot()+
  geom_sf()