Spatial

Spatial correlation between rasters using 'terra'

In this blog article, I propose a way to look at the spatial repartition of correlation between two rasters. This is an update of a blog post I wrote in 2018 : Spatial correlation between rasters. The main difference is that I use the new {terra} package instead of the old {raster} package. The …

Read more

Add {tmap} point layer with multiple symbol border colors and width

It’s been a while since my last blog post. Indeed, my free time is used to improve packages like “{fusen}: Inflate your package from a simple flat Rmd” , “{attachment}: Tools to deal with dependencies in scripts, Rmd and packages” or “{gitlabr}: An R client for the GitLab API”. Hence, drawing some …

Read more

Buffer areas for nearest neighbours or national marine areas delineation

A few weeks ago, Christina Buelow asked on Twitter how she could create the polygons of coastal waters using the land polygons, and making sure there is no overlap in buffer areas. This would make it possible to know which land area is closest to any place in the sea. Let’s explore what solution …

Read more

Find most retweeted tweets of the #rspatial bot

Bots that retweet #rspatial and #BioImageAnalysis tweets are working well. It is now time to add a little functionnality with the best retweeted tweet of the month, a function added to {tweetrbot} package. […] You can retrieve the updated dataset for all tweets here and the dataset for the …

Read more

#30DayMapChallenge: 30 days building maps (3) - Earth is spherical

The #30DayMapChallenge was initiated by Topi Tjukanov on Twitter. This is open to anyone who would like to show a map, whatever the software is. In this blog post, I will show maps made with R. I add constraints to myself for fun. This week, I will create maps that remind map makers that Earth is …

Read more

#30DayMapChallenge: 30 days building maps (2) - tmap

The #30DayMapChallenge was initiated by Topi Tjukanov on Twitter. This is open to anyone who would like to show a map, whatever the software is. In this blog post, I will show maps made with R. I add constraints to myself for fun. This week, I will use {tmap} to create maps. This follows previous …

Read more

#30DayMapChallenge: 30 days building maps (1) - ggplot2

The #30DayMapChallenge was initiated by Topi Tjukanov on Twitter. This is open to anyone who would like to show a map, whatever the software is. In this blog post, I will show maps made with R. I add constraints to myself for fun. This week, I will use {ggplot2} to create maps. […] […] …

Read more

Follow moving particle trajectory over raster with {rayshader}

{rayshader} is a fantastic package for 3D mapping, but it comes with the limitations of {rgl}. I always found it a shame not being able to travel in all directions over my 3D objects. In this blog post, I will show a trick to simulate particle trajectory in 3 dimensions like in a “first person” …

Read more

Create a twitter bot on a Raspberry Pi 3 using R

With Marion Louveaux, we decided that we had to build a Twitter bot for our preferred hashtag. We explored different possibilities but truth is I couldn’t resist building it using R and {rtweet}. Here are the steps I used to set up a Twitter bot on my Raspberry Pi. […] I use package {rtweet} …

Read more

Render mesh3d objects with rayshader and rayrender

People like to show 3D images in their presentations because it usually impresses the audience. Does it really ? I do not care ! I am just looking for an opportunity to play with some 3D images… This blog post is a detailed version of some 3D images shown during my presentation “Everything but maps …

Read more

Kaggle survey 2018: Maps of programming languages used and repartition of reproducibility issues

Last year I participated to the Kaggle survey data challenge. The challenge objective: tell a data story about a subset of the data science community represented in this survey, through a combination of both narrative text and data exploration. I used this opportunity to build ternary choropleth …

Read more

Play with spatial tools on 3D cells images

Let’s play with mapping tools on non-maps data ! {rayshader} is nice on raster maps, but what about using it on segmentized plant cell? […] I wanted to find a good reason to play with Tyler Morgan-Wall packages for 3D visualisation of raster data: {rayshader} and {rayfocus}. Using cell …

Read more

Introduction to mapping with {sf} & Co.

At the “Rencontres R 2018” in Rennes, I proposed a brief introduction to mapping using the recent {sf} package and some other interesting packages. This blog post is an extended version of my presentation allowing me to share the code of the different maps that appeared on it. It’s still a brief …

Read more

Spatial correlation between rasters

In this blog article, I propose a way to look at the spatial repartition of correlation between two rasters. For your own reason, you may want to know the correlation between rasters, but a unique value issued from fonction cor is not enough. You would like to know if there are variations of …

Read more