Introduction

Ecoregions are distinct ecological zones with specific environmental conditions (climate, topography, soil composition…), habitats, and species. Each ecoregion contains characteristic species and ecological communities that are adapted to the region’s environment.
The Ecoregions2017©Resolve map is a revised version of the widely used 2001 map of terrestrial ecoregions of the world, originally developed by Olson et al. The new map breaks up the Earth’s land into 846 distinct terrestrial ecoregions nested within 14 terrestrial biomes. An interactive version of the map is available online here, and the work is discussed in the following article in BioScience: An Ecoregion-Based Approach to Protecting Half the Terrestrial Realm (Dinerstein et al. 2017).
Terrestrial biomes of the world according to Olson & Dinerstein (also used in the WWF Global 200 classification) already have computational representations in Wolfram Language here’s how one might represent them on a map:
Define a list of biomes:
In[]:=
biomes=
chaparral biome
BIOME
,
desert or dune biome
BIOME
,
forest biome
BIOME
,
mountain biome
BIOME
,
rainforest biome
BIOME
,
savanna or grassland biome
BIOME
,
taiga biome
BIOME
,
tundra biome
BIOME
,
scrub forest biome
BIOME
;
Produce a map of major world biomes:
In[]:=
GeoGraphicsThread​​MapGeoStyling[Opacity[1],#]&,
,
,
,
,
,
,
,
,
,​​Map[#["Polygon"]&,biomes],​​GeoBackground->{{"Coastlines","Land"->White},"VectorLabels"},ImageSize->Large//Rasterize
Out[]=
The Ecoregions2017©Resolve data provide a more detailed ecological classification compared to the broader biome categories. While biomes represent large ecological zones based on similar climate conditions and dominant vegetation types, ecoregions offer finer granularity by incorporating specific environmental conditions, habitats, and species unique to each region.
Applications for the Ecoregions2017©Resolve include:
◼
  • Depicting the global distributions of species and ecological communities
  • ◼
  • Modeling ecological impacts of climate change
  • ◼
  • Assisting in the development of conservation strategies
  • ◼
  • Reporting progress toward international conservation targets such as the Aichi targets established by the Convention on Biological Diversity.
  • In this short article, I’ll construct a dataset of Ecoregions2017©Resolve data, demonstrate how to create ecoregion maps, apply data science techniques to filter and summarize the data, and make use of the INaturalistSearch function to search for species observations within ecoregions.

    Setup

    The Ecoregions2017©Resolve data are available here, licensed under CC-BY 4.0. Let’s load them in.
    With the zip file downloaded from this page unzipped and copied to my chosen project directory, the data are ready to import.
    Import the ecoregion shapefile data:
    In[]:=
    freshwaterEcoregionsShapefileData=Association[Import[(*Pathtotheshapefile:*)FileNameJoin[{NotebookDirectory[],"2017 Ecoregions","Ecoregions2017","Ecoregions2017.shp"}],"Data"]];
    In addition to the data found in the shapefile, the online interactive map also includes links to informative ecoregion descriptions hosted on www.oneearth.org. Let’s incorporate these links into our dataset.
    Define an association of ecoregion OneEarth pages:
    In[]:=
    ecoregionPages=
    ;
    Wrangle the data to produce a nice tabular dataset:
    ecoregionsTab=Tabular[Join[​​(*LabeledDatacolumns:*)##&@@KeyValueMap[Dataset[Map[Association,Thread[#1->#2]]]&,Association[freshwaterEcoregionsShapefileData["LabeledData"]]],​​(*Geometrycolumn:*)Dataset[Map[<|"Geometry"->#|>&,freshwaterEcoregionsShapefileData["Geometry"]]],2]]//​​(*Cleanupthedataandcreatenewcolumns:*)​​TransformColumns[#,{​​(*Interpretcolordata:*)​​"COLOR"->(RGBColor[#"COLOR"]&),"COLOR_BIO"->(RGBColor[#"COLOR_BIO"]&),"COLOR_NNH"->(RGBColor[#"COLOR_NNH"]&),​​(*EcoregionOneEarthpagecolumn:*)​​"OneEarthPage"->Function[If[KeyMemberQ[ecoregionPages,#"ECO_NAME"],ecoregionPages[#"ECO_NAME"],Missing["Not available"]]],​​(*GeoBoundsregionscolumn:*)​​"GeoBoundsRegion"->Function[GeoBoundsRegion[GeoBounds[#Geometry]]]}]&//(*Updatecolumnnames:*)RenameColumns[#,{"ObjectID","EcoregionName","BiomeNumber","BiomeName","Realm","EcoBiome","ProtectionStatusID","EcoregionID","ShapeLength","ShapeArea","ProtectionStatus","EcoregionColor","BiomeColor","ProtectionStatusColor","License"}]&;
    To avoid having to recompute this, I’ll save it to a parquet file and reload the data:
    Define the save path :
    In[]:=
    ecoregionsTabPath=FileNameJoin[{NotebookDirectory[],"2017 Ecoregions","ecoregions2017.parquet"}];
    Save the dataset :
    In[]:=
    Export[ecoregionsTabPath,ecoregionsTab];
    Load the data from the file, casting ID columns as machine integers:
    In[]:=
    ecoregionsTab=CastColumns[Import[ecoregionsTabPath],{"ObjectID"->"MachineInteger","BiomeNumber"->"MachineInteger","ProtectionStatusID"->"MachineInteger","EcoregionID"->"MachineInteger"}]
    Out[]=
    Tabular
    Row count: 847
    Column count: 18
    
    Inspect the structure of the dataset:
    In[]:=
    TabularStructure[ecoregionsTab]
    Out[]=
    Tabular
    Row count: 18
    Column count: 5
    

    Exploration

    Visualizing Terrestrial Ecoregions

    Producing ecoregion maps

    For a start, let’s suppose we’d like to plot the footprint of a specific ecoregion. Here’s one approach:
    Extract and plot ecoregion geometry selected from a row in which the “EcoregionName” column matches a provided name:
    In[]:=
    ecoregionsTab//Select[#,Function[#"EcoregionName"=="Irrawaddy moist deciduous forests"]]&//First[Normal[Dataset[#][All,"Geometry"]]]&//GeoGraphics//Rasterize
    Out[]=
    In case you’re unfamiliar with the notation, “//” (called
    PostFix
    ) can be read as “and then”, and is one of the ways one can chain together function calls in Wolfram Language. For new WL users coming form scientific backgrounds, this is quite similar to pipes in Python and R.
    We may also like to plot several ecoregion footprints. This time, let’s assume we’re matching to a list of ecoregion IDs.
    Extract and plot ecoregion geometry from rows where the “EcoregionID” column matches one of the IDs in the provided list:
    In[]:=
    ecoregionsTab//Select[#,Function[MemberQ[{649,695,812,815},#"EcoregionID"]]]&//Normal[Dataset[#][All,​​(*Extractgeometryandecoregioncolors,andaddtooltipstothefootprints:*){#EcoregionColor,Tooltip[#Geometry,#EcoregionName]}&]]&//Legended[​​(*Plotthemap:*)GeoGraphics[{GeoStyling[Opacity[.6]],#}],​​(*Constructthelegend:*)SwatchLegend[##&@@{#1,#2[[All,2]]}&@@Transpose[#]]]&//Rasterize
    Out[]=
    To make a world map of terrestrial ecoregions, we simply include all ecoregions in the plot.
    Make a world Ecoregions map:

    Grouping and plotting ecoregions programmatically

    You’re likely to want to select many ecoregions at a time according to logical or mathematical criteria. Here are a few examples to get you started:
    Find and plot the 3 largest ecoregions:
    Find and plot all ecoregions within a particular biome:
    Find and plot all ecoregions within a particular realm:
    Find and plot all ecoregions whose names contain the word “forest”:
    Plot protection status of neotropic tropical and subtropical moist broadleaf forests:

    Fetching ecoregion images

    The ecoregion descriptions hosted on www.oneearth.org contain illustrative of ecoregion landscapes and emblematic wildlife. Let’s define a function to fetch these images programmatically:
    Define a function to collect ecoregion images:
    Fetch images for a specified ecoregion, along with their descriptions:

    Searching for iNaturalist Species Observations Within Ecoregions

    Finally, here’s an example showing one way you might use the ecoregions data explored in this text in combination with other Wolfram Language ecology functionality.
    iNaturalist is a citizen science project and online community of naturalists, biologists, and ordinary people who record and share observations of plants, animals, and other life forms. Users can upload photos and sounds, identify species, and contribute to a global biodiversity database.
    Observations shared to the iNaturalist platform can be retrieved using the INaturalistSearch function from the Wolfram Function Repository. Let’s use this function to fetch species observations from an specified ecoregion.
    Define the region in which to search for observations:
    Plot this region on a map:
    Fetch observations made within this region and within a specified date range (here, set to the last 10 days at time of computation):
    Extract the positions and species names from the resulting dataset, and plot them on a map:

    Conclusion

    The Ecoregions2017©Resolve dataset lets us explore the incredible variety of ecosystems around the globe. By breaking down Earth’s landscapes into distinct ecological zones, it gives us a fresh perspective on Earth’s diverse habitats and the species that inhabit them. Whether you’re interested in research, conservation, or simply appreciating the beauty and complexity of life on Earth, this dataset offers a clear and engaging way to use computation to explore questions about ecology, biodiversity, and environmental science.