avatar

Ecstatic Disregard

Amateur Enantiodromist

Dockerising Shiny

Over the last couple of months, I’ve been running a Shiny app at shinyapps.io to model COVID-19 reproduction number. It has has a couple of hiccups recently. A couple of weeks ago it started running out of memory; the free tier of shinyapps.io limits apps to 1GB memory. With some judicious pruning, I got the app below this limit. This was fine until this weekend, when it again ran out of memory.

Mapping Air Quality

Leaflet For R uses the JavaScript mapping library Leaflet to let turn data straight into nifty maps. We can use this to turn query results from the UK Air Quality API into maps of ozone levels from monitoring sites. All the data comes ultimately from the DEFRA Air Information Resource. I describe the process in detail with R code here but here is a brief outline. The API provides several endpoints, two of which we’ll use here:

Predicting The Peak Automatically

In a previous post, I attempted a very rough estimate of when the peak for COVID-19 in the UK would be over. I reckoned it would be around April 22nd. I calculated this by doing a linear regression on the effective reproduction number as calculated using UK case data and the R0 R package. I could then work out the intercept with the R=1 line, which is the inflexion point at which the epidemic should begin to recede.