# An Intelligent Time-Series Model for Forecasting Bus Passengers Based on Smartcard Data
## 3 Proposed Model
Regarding data location, the longitude range is 22.58706 to 22.792377, and the latitude range is 120.32016 to 120.29944. 2. The other data type was meteorological data because the number of passengers boarding is often affected by many external factors, especially weather, which has always affected the travel behavior of passengers. Many researchers have presented the impact of weather conditions on passenger flow [13, 14, 15]. We collected weather data from the Kaohsiung Meteorological Bureau. Step 2: Data preprocessing  
We calculated the total number of bus passengers (22 months) for each route based on smartcard data. Figure 2 shows the total number of passengers for each route. Among the 17 routes, Route 1, Route 7, and Route 52 had the top three numbers of passengers: 508,997, 545,915, and 272,968, respectively. \begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline Bus schedule number & Trading time for boarding & Card payment amount for exiting \\ Station number & Types of trading & Benefit points discount for exiting \\ Station name & Voice code for boarding & Free \\ Driver number & Boarding station code & Cash \\ Driver name & Boarding station name & Penalty fine \\ Bus number & Transferring discount amount & Making up the fare difference \\ Route number & Onboard card payment amount & Company subsidy amount \\ Route name & Boarding by benefit points discount & Transaction file name for boarding \\ Card number & Trading date for exiting & Transaction file name for exiting \\ Service type & Trading time for exiting & Outbound/return \\ Trade tickets & Types of trading for exiting & Counting status \\ Fare & Voice code for exiting & Counting date \\ Smartcard payment amount & Station code for exiting & Transferring group code \\ Trading date for boarding & Station name for exiting & Smartcard company \\ \hline \end{tabular}
\end{table} 
Table 1: Original 42 data attributes. Figure 1: Proposed procedure. Step 2.1: Extraction of attributes from smartcard data  
This step involved the extraction of different time attributes from smartcard data as follows:  
From the selected top three routes, the data from the three popular routes were divided into seven days (weeks), weekdays, and holidays. Weekdays were Monday to Friday (455 days), and holidays were Saturdays and Sundays (214 days). The total number of days was 669 (455 weekdays + 214 holidays), and a different day was used as an additional attribute. We extracted seven attributes from the smartcard data, including months, days, weeks, bus lines, bus stations, station passengers, and the number of passengers. Table 2 lists all the attributes used in this study in detail. To check whether the number of rides was periodic, we plotted three figures to show the changes in the number of passengers for the top three routes based on the number of passengers per day on different days, as shown in Figures 3-5. Figure 3 shows the number of passengers on three routes per day by week, which shows that the number of rides was periodic. Only Route 1 showed peak ride times, January 1 (New Year Day) and December 31 (New Year Eve), which are both national holidays. These long holidays are suitable times for going home or traveling, and as such, there is large-scale passenger flow. Route 7 has many bus stations, and the first half of the route is the same as Route 1; therefore, the number of passengers was found to have a similar periodicity to Route 1. For Route 52, because the bus station is different from the other two routes, the number of rides was found to be less similar to the other two routes, but it still showed periodicity. Figure 4 shows the changes in the number of passengers per day for the three routes on weekdays. For a few days in the weekday period, peak passenger numbers occur, such as after 1 January (New Year's Day) and before the national holiday on 28 February, as people go home early before the holidays. In addition, 25 December (Christmas) is a religious holiday and a time when various industries launch marketing activities.