Categories Data science [EN]

Simmer in R for discrete-event simulation

There are various simulation techniques of importance to supply chain data analysis and modelling. One of them is discrete-event simulation. Discrete-event simulation is especially useful for higly dynamic and interdependent systems, as is often the case in complex manufacturing systems but also operational processes. In this post I will provide a conceptual introduction to simmer. […]

Categories Databases [EN]

SPSS, SAS and Stata data in R with haven

In this short article I introduce the haven package in R, and how it can be used for importing data from SPSS in SAV-file format into R. I already demonstrated this as part of a longer coding example, in which I animated spatial distribution of specimen detections as documented in a SAV-file. In previous posts […]

Categories Animations

Spatial data animation: ggmap & gganimate

Following a series of introductionary posts on spatial data visualization in R, covering packages such as ggmap, leaflet, tidygeocoder, geopy, deckgl and osmdata, I here present a framework utilizing some relevant packages. The framework was developed in R. It was implemented in a real-world project and was used to visualize the spread of defined groups. […]

Categories Obtaining data

Testing tidycovid19 data interface in R

There are various packages available in R for retrieving data on covid19 cases. In a previous post I tested coronavirus, a package available in R providing access to data from J.H. University. In this post I want to quickly introduce tidycovid19, a nice R package available on github. In the code below I import the […]

Categories R programming

Map-based scatter plots with deckgl in R

In this blogpost I provide a coding example in R for how to create a map-based scatterplot using the deckgl package. This can come in handy when visualising data with some spatial aspect. For example you might want to visualise the geo-spatial distribution of certain property clusters. Before I can apply the deckgl package’s functionality […]

Categories R programming

Introduction to Leaflet heatmaps in R

In this code example I use a geocoding function found on datascienceplus to geocode Google trends search intensity data, comparing search trend by city name for “Burger” and “Pizza” in Germany. I then visualize the results with heatmaps, generated with the Leaflet package in R. Geocoding input data using Open Street Map API In below […]

Categories R programming

Using deckgl in R for spatial data visualisation

I want to provide an example for how to plot 3D map plots with the deckgl package in R. I generate a bar plot on a map layout from Mapbox. First, I define our Open Street Map geocoding function, found on It geocodes address strings into longitude and latitude coordinates using the Open Street […]

Spatial SCM data visualisation in R

In this post I want to provide a brief overview of useful packages in R for visualizing spatial data in R. The packages discussed are webglobe, deckgl, ggmap, ggplot2 and Leaflet. webglobe The webglobe package allows you to create e.g. bar charts on a 2D or 3D map. You can view your visualisation in your […]

Categories Regression analysis

Regression in R: A method comparison

In this article I provide various examples of regression in R. I compare various regression methods using R. The methods that I will introduce are simple linear regression, multiple linear regression, polynomial regression, decision tree regression, and support vector machine regression. Required packages for regression in R I start by loading the required packages (in […]