Publications by Sascha W.

Plotting GPX tracks with Shiny and Leaflet

05.08.2016

Lately, I got the chance to play around with Shiny and Leaflet a lot – and it is really fun! So I decided to catch up on an old post of mine and build a Shiny application where you can upload your own GPX files and plot them directly in the browser.Of course, you will need some GPX file to try it out. You can get an example file her...

2172 sym 2 img

What’s in the words? Comparing artists and lyrics with R.

20.03.2017

It’s been a while since I had the opportunity to post something on music. Let’s get back to that.I got my hands on some song lyrics by a range of artists. (I have an R script to download all lyrics for a given artist from a lyrics website. Since these lyrics are protected by copyright law, I cannot share the download script here, ...

5981 sym 12 img 6 tbl

Substitute levels in a factor or character vector

27.10.2017

I’ve been using the ggplot2 package a lot recently. When creating a legend or tick marks on the axes, ggplot2 uses the levels of a character or factor vector. Most of the time, I am working with coded variables that use some abbreviation of the “true” meaning (e.g. “f” for female and “m” for male or single characters for ...

1893 sym

Where do you run to? Map your Strava activities on static and Leaflet maps.

31.01.2018

So, Strava’s heatmap made quite a stir the last few weeks. I decided to give it a try myself. I wanted to create some kind of “personal heatmap” of my runs, using Strava’s API. Also, combining the data with Leaflet maps allows us to make use of the beautiful map tiles supported by Leaflet and to zoom and move the maps around �...

6088 sym 6 img

Get your tracks from the Strava API and plot them on Leaflet maps

01.05.2018

Here is some updated R code from my previous post. It doesn’t throw any warnings when importing tracks with and without heart rate information. Also, it is easier to distinguish types of tracks now (e.g., when you want to plot runs and rides separately). Another thing I changed: You get very basic information on the track when you c...

3363 sym 2 img

Send tweets from R: A very short walkthrough

06.05.2018

There are a few reasons why you might want to send tweets from R. You might want to write a Twitter bot or – as in my case – you want to send yourself a tweet when a very long computation finishes.So, here I will run you through all the steps you have to take using– Twitter’s API and– the twitteR package written by Jeff Gent...

2665 sym 8 img

Network visualization of football transfers using the ‘visNetwork’ package

12.09.2018

Click here for the interactive visualizationIf you’re interested in the visualisation of networks or graphs, you might’ve heard of the great package “visNetwork“. I think it’s a really great package and I love playing around with it. The scenarios of graph-based analyses are many and diverse: whenever you can describe your data in terms...

6573 sym 4 img

This dance, it’s like a weapon: Radiohead’s and Beck’s danceability, valence, popularity, and more from the LastFM and Spotify APIs

30.12.2018

Giddy up, giddy it upWanna move into a fool’s gold roomWith my pulse on the animal jewelsOf the rules that you choose to use to get looseWith the luminous movesBored of these limits, let me get, let me get it likeWow!When it comes to surreal lyrics and videos, I’m always thinking of Beck. Above, I cited the beginning of the song “Wow” fro...

15661 sym 12 img

10 years of playback history on Last.FM: "Just sit back and listen"

12.01.2019

Alright, seems like this is developing into a blog where I am increasingly investigating my own music listening habits.Recently, I’ve come across the analyzelastfm package by Sebastian Wolf. I used it to download my complete listening history from Last.FM for the last ten years. That’s a complete dataset from 2009 to 2018 with exa...

17584 sym 26 img

Rcrastinate is moving.

18.01.2019

Hi all, this is just an announcement.I am moving Rcrastinate to a blogdown-based solution and am therefore leaving blogger.com. If you’re interested in the new setup and how you could do the same yourself, please check out the all shiny and new Rcrastinate over athttp://rcrastinate.rbind.io/In my first post over there, I am giving a...

905 sym 2 img