Blog Archives

Using ecmwfr to measure global warming

April 18, 2019
By
Using ecmwfr to measure global warming

For my research I needed to download gridded weather data from ERA-Interim, which is a big dataset generated by the ECMWF. Getting long term data through their website is very time consuming and requires a lot of clicks. Thankfuly, I came accross the nifty ecmwfr R package that allowed me to do it with ease. One of the great...

Read more »

Statistical metamerism

January 2, 2019
By
Statistical metamerism

Summary The metamer package implements Matejka and Fitzmaurice (2017) algorithm for generating datasets with distinct appearance but identical statistical properties. I propose to call them “metamers” as an analogy with the colorimetry concept. Metamers in vision This is not a prism separating white light into its component wavelengths. It is an image of a prism separating white light into its component wavelengths. Fig....

Read more »

Multiple color (and fill) scales with ggplot2

September 17, 2018
By
Multiple color (and fill) scales with ggplot2

tl;dr: The functionality shown in this post is now on the ggnewscale package! 📦. You can find the original code in this gist. A somewhat common annoyance for some ggplot2 users is the lack of support for multiple colour and fill scales. Perusing StackOverflow you can find many questions relating to this issue: Unfortunately, this deluge of questions is met with...

Read more »

Wrapping around ggplot2 with ggperiodic

August 20, 2018
By
Wrapping around ggplot2 with ggperiodic

As an atmospheric scientists, a lot of my research consists on plotting and looking at global fields of atmospheric variables like pressure, temperature and the like. Since our planet is a sphere (well, almost), it is unbound and so longitude is a periodic dimension. That is, to the right of 180°E you go back to 180°W. But ggplot2 and...

Read more »

How to make a generic stat in ggplot2

May 15, 2018
By
How to make a generic stat in ggplot2

For a while now I’ve been thinking that, yes, ggplot2 is awesome and offers a lot of geoms and stats, but it would be great if it could be extended with new user-generated geoms and stats. Then I learnt that ggplot2 actually has a pretty great extension system so I could create my own geoms I needed for my...

Read more »

How to make a shaded relief in R

February 3, 2018
By
How to make a shaded relief in R

While trying to build a circular colour scale to plot angles and wind direction, I stumbled upon an easy way to make shaded reliefs in R. You known, when you look at cool maps of mountain areas where peaks and valleys are easily distinguishable from their shadows like this: What I accidentally discovered is that one way of approximating this...

Read more »

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)