r-bloggers

The evolution of squad compositions at UEFA European Championships

Euro 2024 Whilst waiting for a delayed flight I managed to update my uefa-ec GitHub repository with new data on the squads at the current European Championships from Wikipedia, and the code to visualise where national team players play their club football using the chordDiagram() function in the circlize R package.

Animated population tree maps

Background The global population hit 8 billion today. To mark the passing an absolute population total I created some animated tree map plots in R to visualize relative past and future population totals for all countries.

Animated Sankey plots of global migrant populations

Background Sankey plots have been used to visualize bilateral migration many times. My favorite examples of Sankey plots for migration data tend to be when there are only few regions or countries.

Expand broom::tidy() output for categorical parameter estimates

Introduction The tidycat package includes the tidy_categorical() function to expand broom::tidy() outputs for categorical parameter estimates. Documentation For full documentation, see the package vignette: The tidycat package: expand broom::tidy() output for categorical parameter estimates

Animating the evoloution of football kits using R

Background I’m loving the magick package at the moment. Reading through the vignette I spotted the image_morph() function. In this post I experiment with the function to build the GIF below that shows the changes in the England football first kit over time, using images from the excellent Historical Football Kits website.

R code for animated chord diagrams

Background A little while ago my paper in International Migration Review on global migration flow estimates came out online. The paper includes a number of directional chord diagrams to visualize the estimates.