Francis Windram
banner
franwin.co.uk
Francis Windram
@franwin.co.uk
Postdoc, Computational ecologist interested in spiderwebs, biological traits, imaging, vector-borne disease and good solid R code.

www.franwin.co.uk for more details.

he/him. Views my own.
103-105 are pretty dire. Specifically asylum is an internationally protected obligation of a state. There is little reason to claim asylum when you are already living legally in a country, that doesn't mean that you would be safe if you went back home then. Would you claim asylum if you had ILR?
May 13, 2025 at 12:26 PM
Point 102 misses a fundamental lag component of this data. Undergraduate degrees in the UK are usually 3 years long, Master's degrees are usually 1 year. Thus the 2024 data is a lagged combination of 2023 and 2021 visa entries. We will not see the effects of changes made for another few years.
May 13, 2025 at 12:26 PM
In 100. the authors unintentionally spell out the reasoning for these increased visa numbers: uncapped master's degree tuition fees (see above). They also cynically fail to acknowledge the ~85% fall in dependants between 2023 and 2024. Point 101 is a nothingburger and I won't waste your time.
May 13, 2025 at 12:26 PM
In 99. the government fails to address the underlying drive of the International Education Strategy, which was to try to prop up a reduction in real-terms spending on higher education by the government with uncapped fees paid by international students. This is highlighted further in point 100.
May 13, 2025 at 12:26 PM
In 98, the government deliberately and specifically fails to mention the distinct fall in student visas issued in 2024 (down by 100,000 from the peak in 2023). Also this graph commits the sin of having two y axes in different units at different scales. Whoever created this plot should be ashamed.
May 13, 2025 at 12:26 PM
If you add call=rlang::caller_env(n) where n is the stack frame you want to report, you can get a much more useful error message. Here we can see that it was the div() function that threw our error!
March 20, 2025 at 12:07 PM
If you're catching errors in #rstats and stopping using tryCatch and cli_abort (or rlang::abort), you may encounter something like this "Error in `value[[3L]]()`".

This isn't helpful for finding where something went wrong, you don't know what actually threw the error. But there's an easy fix!
March 20, 2025 at 12:07 PM
It'll also happily handle rolling summaries, such as a rolling weekly mean!
March 19, 2025 at 11:00 AM
Recently I've been playing with the "slider" package for sliding windows #rstats

It's exceedingly useful for generating aggregated summaries over a dataset (i.e. weekly means)
March 19, 2025 at 11:00 AM
8/ Plotting is absolutely not the only time you may wish to use the data pronoun! You will also definitely encounter it if using dplyr to create a package (R CMD CHECK I'm looking at you...). It is, however, a very useful example.
March 5, 2025 at 11:55 AM
6/ Armed with this knowledge we can create a super simple for loop around some generic plotting code to plot each variable we care about.
March 5, 2025 at 11:55 AM
5/ This is where the .data pronoun steps in. It allows you to indirectly (or directly) access the data of a piped dataframe to use in further function calls. To do this you will often write something like `.data[[var]]` So to steal from the dplyr documentation we could do something like this:
March 5, 2025 at 11:55 AM
4/ But we immediately hit a problem! How do we pass an arbitrary set of column names to the aesthetic argument of your geoms? We can define the column names as a vector of strings, but aes doesn't take strings as arguments. (so you can't do aes(x="mycolumn")).
March 5, 2025 at 11:55 AM
2/ Often when writing something like ggplot plotting code you may want to plot a set of different variables from a data frame. Sometimes it will make sense to include these on the same graph, but in others your really want them on an axis.
March 5, 2025 at 11:55 AM
🧵 Now it's time for another R thread. So let's talk about the .data pronoun from rlang/dplyr. #R #dplyr #rlang
March 5, 2025 at 11:55 AM
March 3, 2025 at 11:30 PM
13/ My PhD research mostly focused on creating new methods and metrics for analysing the physical structure of spider webs, so in coming threads I am sure I will talk more about the traits of webs and their function for the spider's foraging. More spider facts coming soon!
January 17, 2025 at 5:03 PM
12/ Spiders will often weave webs in places where they have a natural "frame", and also some seem to prefer to be near light sources as those attract prey.
January 17, 2025 at 5:03 PM
11/ The final major structure within an orb web is the frame. This is made of fairly strong silk (similar to the radial lines) and attach to the surrounding environment to anchor the web in place.
January 17, 2025 at 5:03 PM
10/ The radial lines provide rigidity to the web, help to absorb impact forces, and transfer vibration down to the centre of the web. Meanwhile the sticky silk (covered in dots of glue) sticks to the prey and tangles it up, keeping it immobilised while the spider responds.
January 17, 2025 at 5:03 PM
9/ Further out from there is the capture area. This consists of fairly strong radial lines emanating from the hub, and a spiral of sticky silk that creates the mesh of the web.
January 17, 2025 at 5:03 PM
8/ Out from the hub is the free zone. This silk-free area allows a spider to transition between the rear and front sides of the web, vital for quickly responding to prey strikes on either side of the web.
January 17, 2025 at 5:03 PM
6/ At the centre of the orb web is the hub. This is often more messy than the rest of the web, and is constructed of non-sticky silk. Its purpose is to provide a nice place for the orb-weaver to sit when it is not actively doing something on the web, and is also the harmonic centre of the web.
January 17, 2025 at 5:03 PM
4/ So to start off, all spiders produce silk, but only some of them weave webs. The most well-known web weavers are orb weaving spiders (usually but not always of the araneidae family). Spiders use different types of silk for different purposes, from egg sacs to draglines.
January 17, 2025 at 5:03 PM
3/ That project on the effect of web orientation on web traits led to my entire Master's and PhD being focused on spider web traits! (pic immediately post-submission)
January 17, 2025 at 5:03 PM