Coding Resources

Part of the CBCS Coding Club’s initiative is to compile a list of different coding resources that could support environmental and conservation research. This compilation is ‘alive’, and so if there are any resources that you think are missing from the list below (we know that we are missing lots!), please do contact any of the current coding club leads and we can add them.

Databases

Conservation and environmental researchers often use the same open-access data. Here are some of the databases that are often used in these research fields, some of which can be accessed directly through programming packages.

IUCN Red List

There are lots of different R packages that can be used to access the IUCN Red List’s data repository.

Australia’s Terrestrial Ecosystem Network (TERN)

Explore TERN’s data portals and services.

Marine Regions of the world

Get the the boundaries and shapefiles you need for exclusive economic zones (EEZ), areas beyond national jurisdiction, global oceans and seas, large marine ecosystems of the world (MEOW), Longhurst provinces, and many more!

A collection of different climate data products from the Coupled Model Intercomparison Project 6 (CMIP6)

Here are some R packages that could help wrangle climate outputs.

A collection of different fisheries-related products

  • Global Fishing Watch
    • gfwr is an R package for accessing the GFW data through an API (application programming interface) key
  • FishStatJ to access FAO (Food and Agriculture Organization of the United Nations)’s Fisheries and Aquaculture statistics
  • ARTIS is a database that provides the first global estimates of seafood species and nutrient trade flows

Packages

These are some of the most common packages used in a lot of analysis in conservation and environmental research.

  • rnaturalearth to access natural earth vector map data (e.g., administrative boundaries and borders of countries, coastlines). Some key functions include:
    • ne_countries()
    • ne_download()
  • countrycode for standardizing country names

In terms of analysis, here are some R packages that are useful for data wrangling, analysis and visualization.

Data wrangling and analysis

  • janitor for cleaning up messy data
  • here for setting working directories
  • purrr for functional programming in loops made easy!
  • furrr combining purrr with future’s parallel capabilities

Spatial wrangling and analysis

  • terra for wrangling and analyzing raster (and vector!) data
  • sf for wrangling and analyzing vector data

Visualization

  • ggplot2 for all-around visualizations, and great for visualizing sf objects using primarily geom_sf()
  • tmap for thematic mapping
  • leaflet for creating interactive maps
  • tidyterra for visualizing terra objects using ggplot2
  • patchwork for stitching together different plots

Online books

If you’re the type to learn more by reading textbooks, here are some great online textbooks that you can read.

Websites and online resource hubs

There are thousands of different packages in different programming languages, and sometimes, the package just doesn’t have great documentation. Fear not! There are some websites and online resource hubs that dive deep into some of these packages and their different functions.