"Power Profile for cyclists Plot" gone in the Trends Download Section?

325 views
Skip to first unread message

Christian Streitwieser

unread,
Sep 19, 2017, 4:44:35 AM9/19/17
to golden-cheetah-users
Hi Guys,
After reinstalling GC, and resetting the layout, I'cant find the "Power Profile for cyclists Plot" from the Trends Download section anymore. This was similar to the attached Run Pace Profile plot attached.
Does anybody know why It's not there anymore?

Regards Christian

Capture.PNG

Mark Liversedge

unread,
Sep 19, 2017, 4:52:13 AM9/19/17
to golden-cheetah-users
To my knowledge no user contributed charts have been removed since we purged some of the tests etc from prior to 3.4 being released. If you need R for a chart and it  is not available then you will not see charts that require it,

On a side note, I have not been curating charts for a few weeks and there are a fair few new and interesting ones. Will address this over the coming days.

Mark

Christian Streitwieser

unread,
Sep 26, 2017, 7:55:04 AM9/26/17
to golden-cheetah-users
Thanks, I found it in one of my backups:

## PULL THE ACTIVITY METRICS

athlete = GC.athlete()

mmp <- GC.season.meanmax()

mmpduration<-c(5,60,300,2500)

mmpdata1 <- mmp$wpk[mmpduration]


## MANIPULATE THE DATA

ifelse (athlete$gender=='male', worldclass<-c(24,11.5,7.6,6.4), worldclass<-c(19.4,9.3,6.6,5.9))

ifelse (athlete$gender=='male', index.BOT<-c(4.2,4.9,3.1,2.9), index.BOT<-c(4.3,5.0,2.9,2.5))

mmpdata2 <-(((10*mmpdata1/worldclass-index.BOT)/(10-index.BOT))*10)

## Calculate the percentiles

mmpdata2 <- ifelse(mmpdata2<0,NA,mmpdata2) ## Remove Negative Values


## Athlete Phenotype

allroundertolerance = 1.2

best = which(mmpdata2==max(mmpdata2))


if (max(mmpdata2)-min(mmpdata2)<allroundertolerance) {

phenotype="All-Rounder"

} else if (best==3) {

phenotype<-"Puncheur"

} else if (best==4) {

phenotype<-"TT'er"

} else

phenotype<-"Sprinter"


## PLOT THE CHART

## Chart Inputs & Settings

lbls1<-c("5s","1m","5m","FTP")

axislabels<-c("Untrained","Cat 5","Cat 4","Cat 3","Cat 2","Cat 1","Domestic Pro","World Tour","")

ylbl = "W/Kg"

chartsub = "Power Duration"

chartlbl = paste0("Cyclist Power Profile - ", athlete$name)

textsize=1

col1="Red"

col2="White"

indices<-c(0,1.4,2.5,3.7,4.9,6.1,7.3,8.4)

## Chart Sizing

GC.page(width=800, height=600)

## BarPlot

barplot(mmpdata2,xlim=c(0,4.8),ylim=c(0,11),main=chartlbl,cex.main=1.5,font.main=2,sub=chartsub,font.xlab=2,col=heat.colors(7),names.arg=lbls1,yaxt='n',border=TRUE,space=0.2,col.axis=col2,col.sub=col2)

## Reference Lines

abline(h=indices,slope=0,col="white",lty=3)

text(0.42, indices+(0.2), axislabels, cex=textsize, col=col2)

## Bar Value Labels

vlab<-c(1,2.25,3.4,4.6)

ylab<-c(mmpdata2-0.2)

text(vlab, ylab, round(mmpdata1,digits=2), col="black", cex=textsize)

## Summary Box Labels

summary1 = paste0("Gender: ", athlete$gender)

summary2 = paste0("Weight: ", athlete$weight, "kg")

summary3 = paste0("Phenotype: ", phenotype)

textscale = 0.8

text(4,10,summary1,cex=textsize*textscale,col=col1)

text(4,9.5,summary2,cex=textsize*textscale,col=col1)

text(4,9,summary3,cex=textsize*textscale,col=col1)

Reply all
Reply to author
Forward
0 new messages