Development of Railway Information System to Improve Railway Data Aggregation and Analysis in Tanzania

,


Introduction
In 2017, the Tanzanian parliament enacted laws, established the Tanzania Railway Corporation (TRC), and gave it full operational control of the railway sector. With a higher contribution towards Tanzania's Gross National Product (GDP) [1] in mind, the corporation was tasked to surpass the statistical records generated by RITES Company of India during the privatization phase [2] in revenue generation and passenger engagement.
With the increasing population [3], transportation schemes such as Bus Rapid Transit [4] were created to battle trafc congestion in highly populated cities such as Dar es Salaam [5]. Further eforts led to the plans of constructing the Standard Gauge Railway (SGR) network [6] to boost railway transportation by supporting the existing railway network as well as expanding the Tanzania railway network to advanced infrastructure. Following the eforts of Kenya [7] and Ethiopia [8], the Tanzanian government aimed at increasing its transportation network and providing advanced means of transportation to its citizens. With more than 1000 km of SGR network under construction, faster and more reliable tracks capable of transporting more and heavier cargo [9], together with reduced travel times are to be projected in the future.
With the construction of the SGR network linked with the use of advanced technological tools [9], data collection will become an important criterion with fast and accurate analysis being required at every step. Even with the establishment of an e-ticketing system, the amount of information dispersed to the public remains the same, with major statistics directed towards the number of passengers and the amount of cargo transported annually as recorded by the National Bureau of Statistics (NBS) and Ministry of Works and Transport. With this, the existence of few categorizations of railway data hinders the eforts to forecast the progression of the railway sector in Tanzania.
Tis paper provides a solution to railway data collection and analysis through the use of mobile and web applications which have been created to facilitate higher data accuracy during railway service provision. Tis will, in turn, promote higher accuracy of railway data analysis and provide a visual understanding of the progression of the railway sector, such as which train wagons have the highest number of passengers monthly and annually.

Literature Review
Many studies have been conducted in the feld of transportation from, manually managed networks to smart and intelligent networks that rely on computer input for better data analysis and decision-making. Te numbers of these studies have touched countries with means and resources that provide researchers with the baseline to conduct their studies, such as Japan, China, and the United States of America [10] due to the existence of high-speed trains that utilize highly advanced technologies compared to Africa. African countries have since been planning and constructing advanced schemes of transportation that will showcase better transportation services across the continent in the future.
Following the footsteps of Kenya and Ethiopia, Tanzania embraces the race for development in railway transportation through the construction of the Standard Gauge Railway network. In West Africa, there exist railway networks, but the need for improvement is imminent for better service provision and facilitation of economic activities among West African countries [11]. Tis stretches to South African countries with evidence of poor maintenance and operation of railway networks leading to a decline in transportation service provision statistics [12].
Digitization processes in transportation services have helped to boost passenger engagement and support service provision in an easy and more advanced way globally, with most digital systems being implemented in developed countries due to the existence of advanced railway networks such as high-speed trains. Even with the growing number of users in the feld of Information Technology through the use of the Internet and mobile phones [13], railway statistics in Tanzania rely on passengers accessing the information through websites of statistical government organs, which provide old data compilations with few timely updates.
As for some non-African countries such as India [14] and Turkey [15], technologies such as database systems, Global Navigation Satellite Systems (GNSS), Mobile Geographic Information Systems (MGIS), Quick Response Codes, and Global Positioning System (GPS) showed possibilities for these countries to simplify their transportation schemes. Embedded within Android applications, studies conducted showed how these technologies made online ticketing and bus location tracking easier and well-managed for passengers to understand the basic information on routes they needed before taking their journeys. Te little engagement of these technologies in African countries shows a clear sign of the major reforms needed for these technologies to be involved within African transportation schemes.
As for Tanzania, the railway sector has managed to dive into these technologies through the use of a web application, but with the amount of data needed to showcase the projection of the railway sector, further technological inputs need to be unearthed and put to use. A lot of statistics are being left behind as compared to data generated by countries with many advanced technologies, which prompts advanced technological adaptation as a motivational drive towards a better transportation plan encouraging the use of these technologies.
With the construction of SGR networks across the continent, Africa is provided with a unique chance to explore various aspects of Information and Communication Technology (ICT) in transportation to go with the level of technology used by the newly adopted railway networks. Tis criterion has paved the way for this paper to present a web-mobile-based system aimed at improving railway data aggregation and analysis and providing visually presentable information to the public through the use of ICT techniques to the support data aggregation of new as well as pre-existing railway networks. Te paper utilizes the integration of web mapping techniques aimed to provide as much information as possible concerning Tanzania's railway status, with the main goal of improving ways for railway data acquisition and analysis at a higher rate to increase service provision and revenue generation in the future.

Materials and Methods
Tis study was conducted in Dar es Salaam city as a result of being the highest populated city in Tanzania. With high trafc congestion, active commuter train services, and being home to Tanzania Railway Corporation headquarters made it easier for the process of acquiring railway data on railway services rendered and how the corporation adapts to the digital transformation of its processes.
With the use of a mixed method approach in data collection; interviews, questionnaires, and document reviews were conducted. Interviews and questionnaires provided narrative data, while document reviews provided narrative and numerical data. Te study focused on data regarding passengers, rail safety, revenue, and infrastructure which led to the implementation of purposive sampling in two categories; the railway corporation staf and commuter train passengers. Face-to-face interviews with 4 heads of departments, 2 employees of the business department, and one from the statistics department were conducted. Te selected interviewees were chosen due to departmental roles in the statistical data the study was focused on. 65 commuter train passengers were selected randomly due to higher engagement with train services and provided with online questionnaires with 33 short-answer questions utilizing a simple random sampling technique. Document reviews were accomplished through data provided by the Tanzania Railway Corporation, published journals, and web surfng as a way to gain more knowledge on railway transportation. Data collected from interviews, questionnaires, and document reviews were analyzed to identify various attributes of railway transportation with the help of RStudio, which uses R programming language. Further data analysis comparisons between Tanzania and Great Britain railway data obtained from UK datasets openly available for the public were done to show the extent of railway data aggregation and analysis between the two countries. Requirements gathering in terms of use cases, functional and nonfunctional requirements were generated from the analysis and enabled the development of an integrated system; Android and web applications, where the Android application was developed for passengers due to an increased number of users while the web application was developed for the corporation staf due to the availability of desktop computers within the corporate ofces.
Android Studio and Visual Studio Code platforms were used to develop mobile and web applications, respectively, with the development of a centralized database management system acquiring the use of MySQL databases with the use of PHP scripting languages. Java was the programming language used to develop the Android application, while Hypertext Markup Language (HTML), JavaScript, and Cascading Style Sheets (CSS) [16] were used during the development process of the web application. Web mapping techniques were achieved through the use of the QGIS platform, which is an open-source platform for creating web maps.
Te testing process of the web-mobile-based system involved the use of dummy data to provide a better understanding of how the developed system will operate in a real-world environment. Te graphs and charts involved in the data analysis were plotted using dummy data to provide a near-realistic experience of railway data through the developed system.

System
Requirements. Te requirements for system are given in Table 1:

System Design.
Te study focused on railway transportation in Tanzania with the intent of understanding the current situation of railway services and the data attributes collected by the railway corporation on the existing railway network. In the data analysis, various attributes of railway data, such as passenger journeys and revenue statistics were analyzed, paving the way for the integrated system to be developed considering the available data. It was proven that the railway corporation has had some achievements in the digital era with the development of an online train ticketing system creating a challenge for the integrated system to include these external systems for better aggregation of railway services. A data fow diagram was created that showed the relationship between internal and external entities of the integrated system in achieving system requirements (see Table 1) without interfering with each other, in which the system administrator disseminates information to the public by uploading the necessary documents and statistics as collected by the railway corporation to enable passengers to view the information through their mobile phones by accessing the Android application developed (see Figure 1).
Passengers will acquire information generated by external systems such as online booking as well as revenue statistics provided by the web application administrator through the centralized database management system. Te external website and the online train ticketing system have already been developed by the railway corporation; hence, their integration into the web-mobile-based system has been successful to provide further information to passengers, such as available trains during the coming week and the possibility of booking an online ticket accompanied with the available trip of choice.

System Development.
With emerging technologies, the use of Android phones has paved the way for mobile applications to be in high use and demand compared to other mobile operating systems due to their ease of use and opensource development features [17]. Using Android Studio as a development platform, the Android application allows passengers to read up-to-date news on railway matters, provides a link to an online train ticketing system developed by the railway corporation, as well as provides reports on railway activities uploaded to the centralized database by the railway corporation. Figure 2 shows the homepage of the Android application, which hosts 8 diferent options that provide railway information updates, standards governing the railway corporation in service provision, train schedules for operational routes, annually analyzed data in graphical form, railwayrelated reports on progressing activities, a platform for complaints and opinions from passengers, management roles of the corporation, as well as contacts for further inquiries about the railway corporation. Te homepage utilizes Table 1: Functional requirements of the developed system.

Functional requirements for web application
(1) Te system will allow the system administrator to log in (2) Te system will allow the system administrator to add and update information (3) Te system will perform data analysis and visualization through PHP and HTML manipulation (4) Te system will allow the system administrator to generate and upload reports (5) Te system will retrieve passengers' comments for review Functional requirements for Android application (1) Te system will allow passengers to make comments (2) Te system will provide information on railway service provision (3) Te system will allow passengers to read documents (4) Te system will allow passengers to access railway information updates (5) Te system will provide GIS information on the Tanzania railway network (6) Te system will provide visual presentations of analyzed railway data   a visually friendly layout that prompts available information at ease.
News updates can be retrieved on the application with the integration of the railway corporation's ofcial website, without the need for passengers to access a website through a web browser. Figure 3 shows the outlook of the page when a passenger clicks the "Updates" option on the homepage, giving passengers up-to-date information on activities conducted by the railway corporation in terms of service provision and improvements.
As a way to stay connected and interact with the railway corporation, the Android application provides a feature for passengers to air their views and opinions when necessary. Te option of submitting comments is to generate a relationship between the railway corporation and its passengers through views and opinions as passengers can air their concerns on how the railway services are provided and what can be done to improve the existing services. Figures 4  and 5 show the outlook of the comment entry form when a passenger clicks the "Comment" option on the Android application homepage and comments are reviewed within the web application, respectively.
Te web application was developed to improve data aggregation and analysis techniques during working hours for the corporation staf. Using Visual Code as a development platform, the web application was developed to connect the system administrator with the centralized database system and perform various actions, as shown in Figure 6, which shows the available train schedule information fetched from the centralized database with CRUD operations attached to reduce human errors.
Te developed web and Android applications explore data integration through the use of a centralized database system for easy data storage and retrieval processes. MySQL database was considered a suitable solution in terms of creating a link between developed applications and the database system due to its popularity, which has proven over the years to be a powerful database management system with high integration of diferent data types as well as global support of developers [18].
To improve methods of information dissemination through the web-mobile-based system, the developed applications were embedded with GIS services to improve the capability of information dissemination through web mapping. Use of GIS services aimed at simplifying the acquisition of information concerning the railway network by showing the spread of railway tracks across the country with existing stations situated along the track through web mapping. Towards the achievement of this technological aspect, the mapping technology [19] was made possible using the QGIS technology, which proved to be of great success and was chosen due to open-source category and having a large community of supporters across the globe. Pre-existing OpenMapStreet Export and ArcGIS shapefles with information on the Tanzania railway network were uploaded into QGIS software with major modifcations to increase accuracy in station names and placements. Tese shapefles were in CSV fle format. Knowledge of train stations through maps gives passengers and railway corporation staf a better understanding of the railway network as to where trains pass and available train stations in residential areas, as shown in Figures 7 and 8   With the integration of the MySQL database, the developed applications transform stored railway data from the centralized database into visually representable information for easy interpretation for passengers and railway corporation staf. Tis provides valuable information to passengers as to how the railway corporation has progressed over a certain period and what to expect in the future through the analysis displayed in graphs (see Figure 9). Te web application displays graphs for a specifc set of data (see Figure 10) and gives the option of generating fles in pdf and excels forms for further review of the collected data as well as data manipulation tactics.

Discussion
From the data analyzed, it was found that Tanzania is lagging in terms of digital analysis of railway data as compared to data collected from developed countries such as the  Mobile Information Systems 7 United Kingdom. With vast attributes collected, analyzed, and visually presented to the public, the United Kingdom provided light as to how data needs to be aggregated and analyzed in the world of ever-growing data requirements. Attributes such as passenger performance and average rolling stock proved to be unconsidered in Tanzania railway statistics to be analyzed and provided to the public, thereby showing a gap in railway data collection. Apart from the analysis, the developed web-mobile-based system provided much more vivid data representations than what is available in statistics governing bodies, showing a need for further digital systems that can collect and analyze data to improve railway data attributes as compared to what is available in Tanzania.
Te study experienced some limitations in terms of developing the system in which graphical representations for revenue data provide the actual amount in large sums due to difculties in manipulating mathematical manipulations of revenue data from the centralized database. For future improvements, the presentation of revenue data in percentages is highly preferred for ease of understanding as compared to actual revenue in Tanzanian shillings. Web mapping provided challenges in that the web map fles could not be implemented within the Android application and instead were converted to PDF and fetched as PDF fles. For better integration, it provides a challenge in the future to enable the success of this integration for smooth operation. Te provision of payment forms dedicated to the   Mobile Information Systems system can be of great help rather than depending on external systems that can bring about accessibility issues in the future.

Conclusion
With this technological approach, the paper signifes the beneft of ICT integration in the railway sector, with passengers being given access to train services through their mobile phones to foster the acquisition of railway information at any time with ease. It also gives a basis on how data aggregation and analysis can be achieved with what is available at present, hence stipulating the need for Tanzania to improve its railway network and improve service provision tactics by utilizing the available resources in science and technology. Te web-mobile-based system provided a boost in data aggregation, with more railway data being collected and analyzed. Railway data attributes such as passenger kilometers have been included to provide further information on how this transportation service undergoes its operations as well as populating railway data through the pdf and excel fles generated through the system for further analysis such as mathematical calculations through spreadsheets generated. Visual graphic presentations of the railway data proved to provide a better understanding of the projection of the railway sector in a yearly manner, as shown through the graphs displaying revenue and passenger statistics.
Further adoption of digital systems to railway transportation services can boost passenger engagement and increase operations within the railway corporation. Te use of web mapping techniques has helped to display information on how the railway network is distributed within the country, making it easier for passengers to recognize near stations for making train bookings. Further studies can help to integrate railway transportation in ways that road transportation is portrayed within the country through data generation and help to smoothen the new and improved railway network under construction to reduce limitations in the process of data aggregation and analysis when it starts to operate.

Data Availability
Te data used to support the fndings of this study are available from the corresponding author upon request.

Conflicts of Interest
Te authors declare that they have no conficts of interest.