data1<- bike2017

data1$min<- as.integer(data1$Duration/60)


data1 <- data1 %>% mutate(durationcut=cut(min, breaks=c(0,30,60,120,150,180,Inf), 
                                       labels=c("0-30","31-60","61-120","121-150","151-180","181+")))

sjp.frq(data1$durationcut,geom.colors = "lightblue3",axis.title = "Duration in minutes")

89.4% cyclists use public bicycles for less than 30 minutes, and the percentage is dropping for each additional 30 minutes added.

y2<-count(data1$min)
colnames(y2)[1]<- "min"

ggplotly(ggplot(data=y2[1:180,],aes(x=min,y=freq))+geom_point(size=2,shape=1)+theme_classic()+
  scale_x_continuous(breaks=c(0,8,30,60,90,120,150))+
  theme(axis.text=element_text(size=12),
          axis.title=element_text(size=14,face="bold"))+
  theme(axis.text.x = element_text(size=14,face = "bold"))+ylab("Number of trips")+
  xlab("Duration of trips in minutes")+geom_vline(aes(xintercept=8),linetype="longdash",col="blue")+geom_line()+
  ylim(0,max(y2$freq))+
  theme(panel.border = element_rect(colour = "black", fill=NA, size=1)))
## We recommend that you use the dev version of ggplot2 with `ggplotly()`
## Install it with: `devtools::install_github('hadley/ggplot2')`

The plot above is interactive, therefore you may zoom in for a specific period of time. The most common duration is 8 minutes as shown in the figure above, and very few cyclists choose to keep the bike for more than 60 minutes.