Importing SAV-file 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. In previous posts I demonstrated how to read in data in R from…

Spatial proximity based clustering of customers

Providing a coding example for how to conduct spatial proximity customer clustering, applicable e.g. when searching for multiple centers of gravity (i.e. when wanting to locate multiple warehouses). The logic and approach is the same as in any kind of distance based…

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…

Geocoding spatial data with tidygeocoder in R

In previous posts I have demonstrated how to geocode location strings using the Open Street Map API in two different ways. The first approach was to implement a function that sents a string to the OSM API directly, using http.…

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…