Skip to content

Instantly share code, notes, and snippets.

PatrickStotz / TomTom Congestion-Index
Created Mar 25, 2020
Scraping TomTom Congestion data
View TomTom Congestion-Index
needs(tidyverse, jsonlite, lubridate)
cities = c("frankfurt-am-main", "cologne", "berlin", "hamburg", "munich")
for (city in cities){
url = paste0("", city)
data = fromJSON(url)
table = data$data %>%
select(TrafficIndexLive, TrafficIndexHistoric, UpdateTime) %>%
mutate(time = as_datetime(UpdateTime / 1000)) %>%
PatrickStotz /
Last active Oct 28, 2019
Spinning globe with glowing city markers in D3

A Spinning globe with glowing city markers in D3.

Note: This visualization constantly recalculates and reprojects the position of over 4000 markers and thus needs a lot of computation power. Older computer and mobile devices might struggle with the rendering process. Furthermore the visualization is only optimized for Chrome browsers and might look different than expected when opened in other browsers.

Inspired by Curran Kelleher's idea to plot a world map in D3 by using the GeoNames database as seen in his great Introdction to D3 video.