One statistic that cyclists are known to track is their Eddington number. The Eddington number for cycling, E, is the maximum number where a cyclist has ridden E miles in E days. So to get a number of 30, you need to have ridden 30 miles or more on 30 separate days.
This package provides functions to compute a cyclist's Eddington number, including efficiently computing cumulative E over a vector. These functions may also be used for h-indices for authors. Both are specific applications of computing the side length of a Durfee square.
# install.packages("devtools") devtools::install_github("pegeler/eddington2/R/package")
Here is a basic example showing how to get the summary Eddington number of the included simulated
rides dataset. Note that we first have to aggregate ride mileage by date.
library(eddington) library(dplyr) rides %>% group_by(ride_date) %>% summarize(n = n(), total = sum(ride_length)) %>% summarize(E = E_num(total)) %>% pull #>  29
See the package vignette for detailed usage.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.