mapping

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 interpolation on Earth as a 3D sphere

Earth map is usually presented flat. Geographical coordinates usually go from -180° to +180°. Spatial interpolations using coordinates may be tricky as -180° is equal to +180°. Here I propose a way to realize spatial interpolations on Earth as a sphere and then map the outputs in 3D using rgl. The …

Read more

SDMSelect: Cross-validation model selection and species distribution mapping

This library has originally been created for covariates selection to predict species distribution (biomass, density or presence/absence). Its final aim is thus to produce maps of predicted distributions (Look at vignette SDM_Selection). However, the core of the library is a N-times k-fold …

Read more

Polygons tint band with leaflet and simple feature (library sf)

Let’s use some French regions polygons and attribute one colour to each region. I like piratepal colours of library yarrr. […] To create the doughnuts using original and buffer polygons, I used st_difference. However as discussed with edzer in the sf github repository, I had to transform the …

Read more

How to fill a hatched area polygon with holes in leaflet with R

I built a R package, available on my statnmap github, to provide the function hatched.SpatialPolygons. This function is based on the plot method for SpatialPolygons of library sp. I modified the functions and sub-functions to remove all code for direct drawing and allow to output a …

Read more

Plot a specific image in a delimited polygon as repeated pattern on a map

##Plot an image pattern in a delimited polygon […] Let us define a SpatialPolygonsDataFrame to work on. Let’s also define the specific polygon in which to draw the forest. […] ###Draw a point grid with emoji in a specific polygon We can sample points in the polygon area using …

Read more

Add multiple layers in leaflet widget with R

Library leaflet with R is well integrated with pipe writing (%>%). Thus, it is really easy to add multiple layers and options in a leaflet widget. If you want to add a lot of layers in your widget, it is not necessary to provide a “addPolygons” for each of these layers, you can simply use a loop. …

Read more

Mapping, spatial analyses and GIS with R

If you download the following presentation, you will find a presentation of different functions in the R-software useful for spatial data manipulations. Choosing the right libraries allows to create, import, modify, manipulate and map vector (shapefiles) or matrix (raster) spatial data. Your spatial …

Read more