From previous analysis, we know the most visited station are “Taipei.Main.Station”, “Ximen.”, “Taipei.City.Hall”, “Zhongxiao.Fuxing”, “Zhongxiao.Dunhua”, “Zhongxiao.Dunhua”, “Tamsui”, “Xinpu” and “Banqiao”. I found there are 3 typical types of patterns for MRT station visits. I would take the dataset in Jun 2015 for the patterns explanation below.

library(ggplot2)

Type 1: Main transit stations. Pattern is the rising peaks happen from Friday to Sunday, and these peaks are relatively symmetric. The data of exit stations from Taipei.Main.Station and Ximen stations in Jun are plotted.

ggplot(data=departure, aes(x=Date, y=departure[, "Taipei.Main.Station"])) + geom_bar(stat="identity", position=position_dodge())+xlab("Departure Date") + ylab("Visit Count (times)") + ggtitle("MRT station exit traffic flow - Taipei.Main.Station")+theme(plot.title = element_text(size = 16, face="bold"), axis.title=element_text(size=16), axis.text.x = element_text(colour = 'black', angle = 90, size = 14, hjust = 0.85, vjust = 0.85)) 

plot of chunk unnamed-chunk-3

ggplot(data=departure, aes(x=Date, y=departure[, "Ximen."])) + geom_bar(stat="identity", position=position_dodge())+xlab("Departure Date") + ylab("Visit Count (times)") + ggtitle("MRT station exit traffic flow - Ximen")+theme(plot.title = element_text(size = 16, face="bold"), axis.title=element_text(size=16), axis.text.x = element_text(colour = 'black', angle = 90, size = 14, hjust = 0.85, vjust = 0.85))

plot of chunk unnamed-chunk-3

Type 2: Shopping and recreation stations. Pattern is the rising peaks happen from Friday to Saturday, and abruptly drops on Sunday. The data of exit station from Zhongxiao.Fuxing in Jun are plotted.

ggplot(data=departure, aes(x=Date, y=departure[, "Zhongxiao.Fuxing"])) + geom_bar(stat="identity", position=position_dodge())+xlab("Departure Date") + ylab("Visit Count (times)") + ggtitle("MRT station exit traffic flow - Zhongxiao.Fuxing")+theme(plot.title = element_text(size = 16, face="bold"), axis.title=element_text(size=16), axis.text.x = element_text(colour = 'black', angle = 90, size = 14, hjust = 0.85, vjust = 0.85)) 

plot of chunk unnamed-chunk-4

Type 3: Commutation stations. Pattern is the visits stay flat from Monday to thursday, rise rapidly on Friday, and sharply drops from Saturday to Sunday. These data are those of exit station from Zhongxiao.Dunhua and entry station from Xinpu stations in Jun.

ggplot(data=departure, aes(x=Date, y=departure[, "Zhongxiao.Dunhua"])) + geom_bar(stat="identity", position=position_dodge())+xlab("Departure Date") + ylab("Visit Count (times)") + ggtitle("MRT station exit traffic flow - Zhongxiao.Dunhua")+theme(plot.title = element_text(size = 16, face="bold"), axis.title=element_text(size=16), axis.text.x = element_text(colour = 'black', angle = 90, size = 14, hjust = 0.85, vjust = 0.85)) 

plot of chunk unnamed-chunk-5

ggplot(data=arrival, aes(x=Date, y=arrival[, "Xinpu"])) + geom_bar(stat="identity", position=position_dodge())+xlab("Arrival Date") + ylab("Visit Count (times)") + ggtitle("MRT station entry traffic flow - Xinpu")+theme(plot.title = element_text(size = 16, face="bold"), axis.title=element_text(size=16), axis.text.x = element_text(colour = 'black', angle = 90, size = 14, hjust = 0.85, vjust = 0.85)) 

plot of chunk unnamed-chunk-5

Type of mixture: Commutation, shopping and recreation stations. Take Banqiao station for instance, pattern is the mixture of type 2 and type 3. The data are those of exit station from Banqiao station in Jun.

ggplot(data=departure, aes(x=Date, y=departure[, "Banqiao"])) + geom_bar(stat="identity", position=position_dodge())+xlab("Departure Date") + ylab("Visit Count (times)") + ggtitle("MRT station exit traffic flow - Banqiao")+theme(plot.title = element_text(size = 16, face="bold"), axis.title=element_text(size=16), axis.text.x = element_text(colour = 'black', angle = 90, size = 14, hjust = 0.85, vjust = 0.85)) 

plot of chunk unnamed-chunk-6