Bathymetric maps in R: Getting and plotting data

Bathymetric maps are topographic maps of water bodies (oceans, seas, lakes, rivers), equivalent to Digital Elevation Models (DEMs), except for submerged terrain.

Useful in their own right, bathymetric maps can also improve the look of maps created using DEMs, giving depth to water features.

This 2-part guide shows you how to create bathymetric maps in R using freely available data from online sources, how to import and plot this in R. Part 2 explores using different colour schemes/palettes for really effective maps. Read on for more!

Bathymetric maps in R: Colour palettes and break points

Part 2 of the guide for making bathymetric maps in R. This part focuses on creating effective colour schemes using break points to control the colour.

DEMs and where to find them

Digital Elevation Models (DEMs) are a 3D representation of the terrain, and can form the basis for creating maps, or carrying out spatial analysis.

DEMs come in many shapes and sizes, from commercial DEMs with 1 m spatial resolutions, to freely available DEMs with 30 m to 90 m resolutions.

In this guide, I'll show you some of the freely available DEMs, where to obtain the data, and how to use them in R. Read to find out how!

Creating simple location maps in R

R has some great GIS capabilities thanks to an extensive range of packages for handling GIS data. I have previously shown some of this capability for creating climate data maps, although I have not explored mapping basics, until now.

This guide will show you some basic techniques for creating simple, yet effective location maps in R, using freely available data. Stop using screenshots of Google Earth for your location maps, and start making your own! No GIS skills are needed. Read on to see how the create the map below!

How to add error bars in R

R has no error bar function? Surely not!

Well, yes and no. Error bars can be added to plots using the arrows() function and changing the arrow head. You can add vertical and horizontal error bars to any plot type. Simply provide the x and y coordinates, and whatever you are using for your error (e.g. standard deviation, standard error).

Read on to see how this is done with examples.

Quick guide to opening files from within R

R has loads of useful, but little known functions that can make life a little bit easier. As part of the "quick guide" series, this quick guide takes a look at opening files from within R - no more opening up file explorer and hunting around for that file!


Apologies for lack of blog updates recently, I am pleased to say I recently started a new job researching glaciers and environmental change in the High Atlas, Morocco, which is keeping me busy! We have just launched a new website for the project, so please check it out to find out more!

As well as my new job role, I have also been working on a brand new project which I hope to reveal in the new year! Updates to this blog are coming in the new year, and will include a new R guide series for creating maps, and also a new guide series to using LaTeX for writing thesis and dissertations.

EPPC 2018 Dublin: Atlas cedar pollen geochemistry

If you're attending this years EPPC 2018 - please come along and check out my poster presentation on pollen geochemistry of Atlas cedar, and how it can be used to tell us about the climate and environment.

If you can't make the conference, or would like to know more details about this work, read on!

First, a little background information. Atlas cedar (Cedrus atlantica) is an endemic conifer tree found growing across Morocco in the Rif Mountains, Middle Atlas, and parts of the High Atlas. It is also found in Algeria in the Tell Atlas, and Aures Mountains. Cedar has been in the region for thousands of years, but it is threated by climate change, extreme drought and human activity - particularly logging and grazing.

Because of the tree's longevity, and because it is the only species of Cedrus growing in the region, it is an ideal species to study to learn about the environment and climate of the past. We can be sure that analysis of fossil cedar pollen (from lake sediment and peat sediment cores) in the region comes from Atlas cedar. Unlike for example, pine, where the pollen may be from several different pine species (although analysis of pine geochemistry can identify pollen to the species' level).

Cedar is also an early autumn (fall) pollinating species, which means the pollen develops during the summer months, and its geochemistry is influenced by summer conditions.

In a previous blog post, I discussed pollen geochemistry in relation to how it is used to tell us about solar UV-B levels. Check out the post to learn more.

This blog post will cover stable isotope analysis of Atlas cedar pollen, ongoing work looking at fossil cedar pollen, and describe a method for isolating cedar pollen without using traditional chemical treatments.

Interpolating gridded datasets in R: UV-B data

In my most recent published paper, I analysed the effects of incoming solar UV-B radiation on the geochemistry of Atlas cedar pollen, focused on the Middle Atlas Mountains in Morocco. The study area was relatively small, with sample sites fairly close together.

The UV-B data was obtained from the glUV: Global UV-B radiation dataset, which combines data from NASA's Ozone Monitoring Instrument (OMI) onboard the Aura spacecraft, into grid cells containing average erythemally weighted estimates of daily UV-B radiation. You can read full details of the methods used in the associated research paper (Beckmann et al. 2014) (Available open access).

Gridded datasets are an excellent source of data for doing global or macro-scale studies. However, if working in a relatively small area, you may find that your study area is covered by just a few grid cells due to the often low resolution of gridded data. And this can sometimes make it more difficult to carry out analysis.

To overcome the problem, you can interpolate the data to increase the resolution. After interpolation, the gridded data will go from looking like the image on the left, to looking like the image on the right, which is much more detailed for the study area.

Read on to find out how to do this in R!

How pollen geochemistry can tell us about historic UV-B levels

Pleased to see that my latest research paper is now available online at The Holocene. Thanks to all of my co-authors: Will Fletcher, Pete Ryan, Alistair Seddon, Roy Wogelius and Rachid Ilmen, and thanks to the reviewers for their feedback. The paper and all associated research data is available for free and is open access. The data can also be accessed for free from Mendeley Data:

This research investigates the pollen geochemistry of Atlas cedar, and what it could tell us about incoming ultraviolet-B radiation (UV-B) on historic timescales in North Africa.

So, what is pollen? what is pollen geochemistry? what is UV-B? and why is any of this important?

Read on to understand this research in plain English!