Public transport companies have embraced social media in the recent decade to perform multiple communicative functions. This rise of communication concerning spatial phenomena has been followed by releases of public transport schedules in standardized GTFS formats across the world. As social media communication is very short-term oriented, often it is up to citizen data science to retrieve information across longer periods of time, aggregate and analyze them to and make wider communities, affected by transport phenomena, aware of long-term changes in how public transport operates. These citizen science challenges affect multiple areas of spatial language understanding, geographic information mining, and aligning language to transport network structures and more sophisticated data sets.
One such case can be made for a Wrocław, where following two decades of under-investment, the local public transport service quality is in critical condition as the city public transport operator - MPK Wrocław - struggles to maintain a 10-day streak without tram derailment. As service disruptions occur with high frequency, MPK Wrocław provides information about anomalies in the trips, using information boards, dedicated applications, and social media (Facebook and Twitter). MPK Wrocław carries about 200 million passengers a year, about 550 thousand a day. It’s capacity to inform about service outages is not only critical to maintaining a standard of life quality in daily activities in the city but also indirectly concerns political decisions, mobility behavior, carbon emissions, and many other areas of citizen science activity.
While day-to-day communication is maintained regularly with low latency, it is never released in aggregated form. More and more often agencies remove old social media posts, to avoid citizens reacting to comments made under outdated content. The grass-root ability to improve local quality of life depends on inhabitants being able to make data-driven arguments. Citizen science therefore, heavily relies on the automatic spatial understanding of social media information related to public transport phenomena. Without an aggregated data set released in an open data fashion, it is crucial to pinpoint where traffic disruption happens in both GIS and mobility network perspectives. Citizens need to be able to map social posts concerning service disruptions to a GPS coordinate and a relevant stop or lines in the transportation network.
We present a method and a study of a public transport operator’s service disruption communication in the situation of a persistent crisis. We analyze posts and comments from the official social media channels of MPK Wrocław concerning traffic obstructions and contribute the following results:
a systematic typology of communique and discuss the magnitude of social response,
an approach for classification and spatial understanding of service disruption alerts,
use cases to analyze the aggregated impact on the transportation network and mobility and automatic examination of the sentiment of citizens’ feedback.
We built a robust method for automatic spatial language processing to allow processing social media communication into a spatial database and show its use cases. Our work concerns the Polish language, which is an under-resourced language in this regard. Our method can work with any source of social media posts, provided a list of stop names mapped to GPS coordinates, or open street map data for the evaluated location.
2.1. How do public traffic operators handle social media?
Bregman (2012) discusses five ways traffic operators engage in social media communication activities:
sharing information about real-time service changes and advisories (timely updates),
providing information about services, fares, and long-range planning projects (public information),
taking advantage of the interactive aspects of social media to connect with their customers in an informal way (citizen engagement),
recognizing current workers and recruiting new employees (employee recognition),
displaying a personal touch and entertaining their riders pleasurable brand-related content (entertainment).
Bregman finds that 77% of surveyed transit agencies used Twitter and 49% used Facebook (multiple answers allowed) to inform about real-time service alerts and 66% of agencies updated their relevant channels more than once a day with a service update. Liu et al. (2016)
designed an online survey of the top 50 transport agencies around the USA to collect general information about their purpose and social media usage. They show that public transport agencies are extremely interested in measuring their social media success: more than half of public transport agencies currently measure social media outcomes through a number of “friends and followers”, “likes” and “retweets”. Only a few of them measure their social media program effectiveness with positive perception similar to sentiment analysis.Wojtowicz and Wallace (2016) describes how the Washington State DOT (WSDOT) was chosen as an example of well-executed social media communication capable of limiting uncertainty in high disaster situations and proving to be a recognizable source of reliable information.
Pender et al. (2014a) propose 6 stages of the disruption and recovery process on the role of information delivery. Authors state that social media can be a very efficient tool to inform passengers about disruptions but it can exclude a certain group of society that doesn’t use smartphones. In another review on (Pender et al., 2014b) present how transit agencies use social media during unplanned transit network disruptions. Gal-Tzur et al. (2014) focuses on categorizing live feed of tweets on an example of 3 mln tweets tweeded during and before Liverpool soccer matches. Using bag-of-words models, authors propose 2 models: one to recognize if the tweet was tweeted by an authority (city, transport company) and second to recognize if the tweet was about transport. Authors propose a hierarchical approach to categorize tweets further in 3 main branches: information about transport needs, detection of irregular events that impact on mobility and traveler opinions about transport services.
Further studies include evaluating how transit agencies communicated during large events (Cottrill et al., 2017) or how crowd sourced data can complement agency communication of disruptions (Congosto et al., 2015). An important area of contemporary social media and public transport research includes using social media check-ins for mobility research (Lv et al., 2017; Tu et al., 2017; Rashidi et al., 2017; Serna-Nocedal et al., 2017), planning decisions (Ni et al., 2016; Nikolaidou and Papaioannou, 2018), transport performance (Haghighi et al., 2018), user activities (Chaniotakis et al., 2017) and satisfaction (Alshehri and O’Keefe, 2019). Recently new technologies emerged to push service disruption information such as bots and chat bots (Gault et al., 2019).
2.2. Social media meets citizen science
Social media profiles of public transport agencies are also important for citizen science. Perriam (2019) describes how non-academic organisations can use data from social media on the example of the public sector organization ”Transport for London”. He focuses on the ethnographic research into the workflow of the organisation and shows that TfL uses social media (here tweets in particular) not only for customer service but also for staff management, productivity observation and decision making.
Li et al. (2019) discuss how one can collect public opinions from social media to extract from them potential improvements proposals or use them as a support in decision making. The researchers describe the case of the subway in the city of Nanjing in China using the data collected from the Sina microblog. Three types of analysis have been made (sentiment analysis, spatiotemporal analysis and topic/subject analysis) to localize the most important topics raised in public space. They note that passengers comment mainly on the Metro congestion, air-conditioning temperature, environment in the carriage, equipment failure, and so on. Other comments have been summed up to formulate some example prescriptions: what should be improved/done according to citizens.
Raghothama et al. (2016) describe the analysis of delays using the data (mainly GTFS data, besides that for example timetables) from the cities of Rome and Stockholm. For Stockholm, the focus was placed primarily on recognizing sources and factors of delays, for Rome the ability to predict future delays was more important. Generally, Ragothama et al. presented the process of working with geospatial and real-time data and they pointed out potential issues in such analysis.
3. Data collection
MPK Wrocław publishes information about impediments and changes in a public transport schedule using a variety of available communication channels: a dedicated mobile app - iMPK; timetable’s display boards located near bus and tram stops; social media - official Facebook and Twitter profiles.
Between 2017 and 2019 we collected 4161 tweets, 1680 Facebook posts with MPK communique concerning various topics of public transport operations. Additional metadata from social media was acquired from the content’s publication date and reactions, including 24809 comments collected. Because MPK Wrocław posts diverse messages on Facebook, hashtag #AlertMPK was used to filter posts that reported incidents and other information concerning schedule changes. Figure 1 shows an example of a post and data acquired from it. After filtering there were 622 posts left for an analysis111We were unable to assure the deanonymization of our GitHub repository, however in the final version of the paper we will provide a link to the repository with relevant code, data sets, trained models and a streamlit dashboard for exploring current twitter data stream..
These textual data points contain spatial information we were interested in extracting, the two main aspects We were interested in obtaining the spatial understanding of incident locations and being able to relate them to passenger mobility characteristics. We obtained bus and tram stops positions as well as schedules from open data GTFS repositories and mobility information from the recent survey of the metropolitan area mobility (Wrocław, 2020), which divides the Wrocław area into regions and includes SIM-card based approximation of passenger exchange between regions.
4. Spatial Understanding
One can identify in the posts of MPK the specific language they use. The posts with a similar content type tend to use the same template or to have a similar structure (Figure 2). There was additional information derived from acquired raw data: type of incident, the position of the incident, and lines affected by the change in a schedule.
Maintaining a template-based information system allows the public transport operator to decrease the cognitive load needed to understand the post, which is usually received by the user in a stressful context related to service disruption. The structured form also builds the foundation for trust as the users get used to the communication style and identify it with the operator’s brand. Such posts are also easier to parse for citizen sciences tasks. Finally, when an irregular situation is reported, its non-template form increases the alertness of the reader.
Following manual exploration we distinguished multiple types of the content in the MPK’s posts. As good categorization of posts is essential in the context of future applications we decided to propose the following typology of transport information:
accident - traffic accidents (including accidents without MPK’s vehicles)
event - events affecting urban traffic, e.g. matches, marathons, special (e.g. holiday) timetable
fix - information about restoring the state from before the failure
incident - unwanted, random events, e.g. police intervention, fire brigade action, aggressive passenger, medical intervention, etc.
malfunction - failures of infrastructure (e.g. power outages, derailments) and vehicles (e.g. broken pantograph, another vehicle malfunction)
renovation - planned infrastructure repairs
unknown - traffic difficulties with no specified cause
We manually tagged 3532 posts with the above classes and build a classifier using the FastText model (Joulin et al., 2017). 3000 of those were used in a training process and the rest was used for testing. Given the structured language of the posts, even a simple embedding based model was able to achieve the 87% accuracy for the test set. We use the model to classify the Facebook posts, which are often lengthier but include the structured information as one of the paragraphs.
We excluded three of the proposed classes from further analysis: event and renovation, because they were dedicated to planned changes in schedules, not crisis management; and the fix class because it informed about the restoration to normal and not about disruptions. Other classes were further analyzed as unplanned events that caused disruptions in traffic. After filtering there were 482 posts left. Distribution of those posts types can be seen in a figure 3.
It is important to mention, that although some of the posts (especially Facebook ones) seem to be little equivocal, ambiguous, typically one can identify the correct class quite easily and, as it was measured with Cohen’s kappa at 0.75 for each pair of annotators (3 annotators altogether), the multi-class approach turned out to be inferior compared to the single class division approach.
The spatial understanding was performed by rule-based regexp matching, due to the lack of character-level embeddings for the polish language and important impact of inflection on stop and street names in posts. We analyzed word sequences appearing before the introduction or enumeration of spatial terms such as street names or stop names. Next, we matched word sequences that followed these prefixes to the street and stop name lists available in GTFS and OpenStreetMap data, using Levenshtein distance and thresholding.
Positions of disruptions were obtained using street names mentioned in posts. Official stops positions were used whenever possible. Intersections were found using Google Maps and the rest of the streets were approximated using Open Street Maps. Figure 4 shows map of disruptions with color-coded types.
To detect most affected bus and tram lines, every occurrence of a line’s name or a number among different tweets with #AlertMPK hashtag were found and the number of different tweets in which the line was mentioned was counted. The results are shown in the figure 5.
5. Applications and use cases
5.1. Citizen science: understanding the impact on the quality of life
On average there one disruption happened every 2.28 days and almost half of all disruptions were caused by malfunctioning infrastructure or vehicles. As shown in Figure 4 the spatial distribution of incidents spanned the entire tram network in the city and had an important impact on the quality of life. Having extracted the spatial characteristics of each of the incidents we can evaluate how both lines and passengers were affected in more detail.
The most frequently mentioned lines are the tramlines. Even the least mentioned tram lines appeared in tweets much more often than the bus lines. A probable reason for that is that any malfunction or incident related to a tram is far more critical for the traffic infrastructure than the bus’s one. A damaged tram blocks the tracks along which other vehicles move, so even an accident of a single tram may cause exclusion of many other trams from traffic or at least change their routes. And the changes are noted in the #AlertMPK tweets. Buses are more resistant to traffic changes, thus they are mentioned far less frequently.
The perspective on the passenger mobility impact can be drawn from relating the data to the 2018 mobility survey. The survey provides raw data which includes SIM-card based trips counts between regions. As public transport and car mobility are intertwined by the Downs–Thomson paradox (Mogridge et al., 1987)
we can treat the passenger mobility data jointly, following the assumption that tram derailment, bus accidents and other public transport incidents negatively impact all means of travel on the affected mobility route and its alternatives in the surround region. We mapped the points of incidents to mobility regions in the study and aggregating the passenger counts for the hour at which the incident occurred. This allows us to estimate that at least 732 618 passengers may have been impacted by service disruptions in the 244 weekdays in which incidents were noted, which is an average of 3000 per day. This is a lower bound estimation as it is calculated under the assumption that disruptions are fixed in at most an hour, which is usually not the case.
5.1.1. Sentiment of reactions
Another use case of our approach is to understand how citizens and passengers react to the incidents. The sentiment of the text data differs when comparing MPK posts and users’ comments referring to the posts. The Facebook comments section, although moderated in the case of MPK profile, consists of texts of multiple styles, tones, lengths, which are expressing different attitudes towards the incidents and events described in the posts as well as towards the public transport company (MPK). Thus we found it interesting to evaluate the sentiment of the comments.
Detecting sentiment of passengers proved to be an arduous task due to the presence of misspelling, grammatically incorrect sentences, and contextualized writing style, that assume possessing the appropriate knowledge to interpret the content. Regular incidents caused completely different reactions among passengers, starting from specifying the details of the event and ending with sarcasm and humor. There is a convention that passengers use positive words to carry a negative message. It varies from person to person and depends on many aspects such as age, gender and others.
The difficulty of the task may be evidenced by the fact, that during the process of manual labeling, the annotators were relatively often conflicted about the right class label for a comment, which was measured by the kappa score between the pairs of annotators (the value ranged from 0.3 to 0.45 and was much lower than the same measure for the post type classification - on average 0.77). What made it even more difficult, besides sarcasm and ambiguity, was the length of the comments. Most of them are relatively short. Hence, in the preprocessing, comments containing no more than three words were removed. Comments which consisted only of emojis or pictures were also filtered.
As it is very hard to identify sarcasm and humor in the content. These kinds of human communication are strongly dependent on context and comment context plays an important role in sarcasm and humor polarity detection. For example, comments: “MPK did not disappoint my expectations” and “The new week is starting nicely” could be perceived in two ways depending on the context: sarcastic and humorous or ordinary. If the topic relates to an accident - negatively, and if it relates to innovation or infrastructure improvement - positively. Finally, the root of sarcasm lies in frustration (Filik et al., 2016). Thus there is a very high probability that a sarcastic comment has negative polarity, which is the opposite of humorous content.
The basic sentiment analysis classifying comments whether they are positive, neutral or negative resulted in a very imbalanced data set. As figure 7 shows, most of the comments were labeled as neutral. Neutral comments are the comments that are emotionally neutral and the ones that are too short or too ambiguous to assign them as positive or negative. Because of that and the fact that most of the comments are relatively short and thus hard to classify, the neutral class is the most numerous. The least numerous category was a positive class. Since the main topic of the analysis was the comments under the posts about problems in motion, positive comments should not appear often.
When another approach was tested, which measured the sentiment towards MPK rather than the general emotional attitude expressed in the commentary, positive reactions occurred much more often 8. Unfortunately, the percent of negative comments was also higher.
5.1.2. Reactions and spread
User’s reactions can help approximate social sentiment towards certain types of disruptions. First of all, ”Like” reaction is most apparent in the list probably because it’s the easiest and most popular reaction for Facebook users. Additionally, there is a significant difference between ”Haha” reaction and the rest of the reactions. Figure 10 shows full comparison of number of reactions to #AlertMPK posts.
Maps in figure 9
show disruption positions marked as circles where the radius of a circle is bound to a total amount of passengers’ interactions (reactions + number of comments) with a post. The visualization shows that people react most to malfunctions and least to traffic accidents. Few outliers with significantly more reactions were found, especially amongmalfunction type of posts. We describe in more detail three posts with the highest number of interactions.
First disruption (Figure 11) blocked south part of a city on tram rails where 7 tram lines run every day. Diverted trams increased delay times of other tram lines and replacement buses hugely impacted traffic jams because Powstańców Śląskich street is one of the busiest streets in the city. Cause of disruption was a broken tram pantograph and people were mad, that’s why there are more comments than reactions under this post.
Second disruption (Figure 12) disabled the only tram track leading to one of the furthest districts in the city - Leśnica. Replacement buses had to keep waiting in a long traffic jam and many people who depended on a public transport system were even hours later at home after work. Same as first disruption, the cause of it was a malfunction and again passengers’ frustration was reflected in a high number of comments demanding to improve the condition of public transport.
The third disruption (Figure 13) was independent of MPK and was depended on poorly performed road works. That’s why there is a big difference between the number of reactions (105) and comments (35). Additionally, most of these reactions were ”Haha” reactions (77). The disruption amused passengers more than upset them.
To address the problem of spatial understanding of social media posts that convey transport information, we collected a three-year data set of public posts from official channels of a polish public transport company. After exploration, we proposed a systematic typology of communique and discussed the magnitude of social response, which may be useful for building similar tools for other agencies. For this typology, we build a successful classifier using language models at the time available for the Polish language. We used lists of street names and stop names from open data sources such as GTFS and OpenStreetMap. We used distance-based matching of word sequences in a manually selected context to provide spatial understanding. We then managed to successfully use the obtained spatial understanding to relate information from social posts to external data sets such as the mobility survey. We applied our approach to discussing the aggregated impact on the transportation network and mobility and automatic examination of the sentiment of citizens’ feedback. We release both the data sets and experimental codebase under a permissive opensource license to encourage further research in the topic, especially in under-resourced languages and to empower data scientists worldwide with a tool for performing citizen science.
- Alshehri and O’Keefe (2019) Alanawd Alshehri and Robert O’Keefe. 2019. Analyzing Social Media to Assess User Satisfaction with Transport for London’s Oyster. International Journal of Human–Computer Interaction 35, 15 (2019), 1378–1387.
- Bregman (2012) Susan Bregman. 2012. Uses of social media in public transportation. Number 99. Transportation Research Board.
- Chaniotakis et al. (2017) Emmanouil Chaniotakis, Constantinos Antoniou, Georgia Aifadopoulou, and Loukas Dimitriou. 2017. Inferring activities from social media data. Transportation research record 2666, 1 (2017), 29–37.
- Congosto et al. (2015) Mariluz Congosto, Damaris Fuentes-Lorenzo, and Luis Sánchez. 2015. Microbloggers as sensors for public transport breakdowns. IEEE Internet Computing 19, 6 (2015), 18–25.
- Cottrill et al. (2017) Caitlin Cottrill, Paul Gault, Godwin Yeboah, John D Nelson, Jillian Anable, and Thomas Budd. 2017. Tweeting Transit: An examination of social media strategies for transport information management during a large event. Transportation Research Part C: Emerging Technologies 77 (2017), 421–432.
- Filik et al. (2016) Ruth Filik, Alexandra Turcan, Dominic Thompson, Nicole Harvey, Harriet Davies, and Amelia Turner. 2016. Sarcasm and emoticons: Comprehension and emotional impact. Quarterly Journal of Experimental Psychology 69 (2016), 2130 – 2146. https://doi.org/10.1080/17470218.2015.1106566
- Gal-Tzur et al. (2014) Ayelet Gal-Tzur, Susan M. Grant-Muller, Tsvi Kuflik, Einat Minkov, Silvio Nocera, and Itay Shoor. 2014. The potential of social media in delivering transport policy goals. Transport Policy 32 (2014), 115 – 123. https://doi.org/10.1016/j.tranpol.2014.01.007
- Gault et al. (2019) Paul Gault, Caitlin D Cottrill, David Corsar, Peter Edwards, John D Nelson, Milan Markovic, Mujtaba Mehdi, and Somayajulu Sripada. 2019. TravelBot: Utilising social media dialogue to provide journey disruption alerts. Transportation Research Interdisciplinary Perspectives 3 (2019), 100062.
- Haghighi et al. (2018) N Nima Haghighi, Xiaoyue Cathy Liu, Ran Wei, Wenwen Li, and Hu Shao. 2018. Using Twitter data for transit performance assessment: a framework for evaluating transit riders’ opinions about quality of service. Public Transport 10, 2 (2018), 363–377.
- Joulin et al. (2017) Armand Joulin, Edouard Grave, Piotr Bojanowski, and Tomas Mikolov. 2017. Bag of Tricks for Efficient Text Classification. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics: Volume 2, Short Papers. Association for Computational Linguistics, 427–431.
- Li et al. (2019) Dawei Li, Yujia Zhang, and Cheng Li. 2019. Mining Public Opinion on Transportation Systems Based on Social Media Data. Sustainability 11, 15 (2019), 1–15. https://doi.org/10.3390/su11154016
- Liu et al. (2016) Jenny Liu, Wei Shi, Sam Elrahman, Ban Xuegang, and Jack Reilly. 2016. Understanding social media program usage in public transit agencies. International Journal of Transportation Science and Technology 2 (2016), 83–92. https://doi.org/10.1016/j.ijtst.2016.09.005
- Lv et al. (2017) Yisheng Lv, Yuanyuan Chen, Xiqiao Zhang, Yanjie Duan, and Naiqiang Li Li. 2017. Social media based transportation research: The state of the work and the networking. IEEE/CAA Journal of Automatica Sinica 4, 1 (2017), 19–26.
- Mogridge et al. (1987) Martin John Henry Mogridge, DJ Holden, J Bird, and GC Terzis. 1987. The Downs/Thomson paradox and the transportation planning process. International Journal of Transport Economics/Rivista internazionale di economia dei trasporti (1987), 283–311.
- Ni et al. (2016) Ming Ni, Qing He, and Jing Gao. 2016. Forecasting the subway passenger flow under event occurrences with social media. IEEE Transactions on Intelligent Transportation Systems 18, 6 (2016), 1623–1632.
- Nikolaidou and Papaioannou (2018) Anastasia Nikolaidou and Panagiotis Papaioannou. 2018. Utilizing social media in transport planning and public transit quality: Survey of literature. Journal of Transportation Engineering, Part A: Systems 144, 4 (2018), 04018007.
- Pender et al. (2014a) Brendan Pender, Graham Currie, Alexa Delbosc, and Nirajan Shiwakoti. 2014a. Social Media Use during Unplanned Transit Network Disruptions: A Review of Literature. Transport Reviews 34, 4 (2014), 501–521. https://doi.org/10.1080/01441647.2014.915442
- Pender et al. (2014b) Brendan Pender, Graham Currie, Alexa Delbosc, and Nirajan Shiwakoti. 2014b. Social media use during unplanned transit network disruptions: A review of literature. Transport Reviews 34, 4 (2014), 501–521.
- Perriam (2019) Jessamy Perriam. 2019. A Tweet is Not Just a Tweet: Public Sector Understandings and Analysis of Social Media Customer Service Data. SMSociety ’19: Proceedings of the 10th International Conference on Social Media and Society, 33–40. https://doi.org/10.1145/3328529.3328542
- Raghothama et al. (2016) Jayanth Raghothama, Vinutha Magal Shreenath, and Sebastiaan Meijer. 2016. Analytics on public transport delays with spatial big data. 28–33. https://doi.org/10.1145/3006386.3006387
- Rashidi et al. (2017) Taha H Rashidi, Alireza Abbasi, Mojtaba Maghrebi, Samiul Hasan, and Travis S Waller. 2017. Exploring the capacity of social media data for modelling travel behaviour: Opportunities and challenges. Transportation Research Part C: Emerging Technologies 75 (2017), 197–211.
- Serna-Nocedal et al. (2017) Ainhoa Serna-Nocedal, Jon Kepa Gerrikagoitia, Unai Bernabé, and Tomás Ruiz Sánchez. 2017. Sustainability analysis on Urban Mobility based on Social Media content. Transportation Research Procedia 24 (2017), 1–8.
- Tu et al. (2017) Wei Tu, Jinzhou Cao, Yang Yue, Shih-Lung Shaw, Meng Zhou, Zhensheng Wang, Xiaomeng Chang, Yang Xu, and Qingquan Li. 2017. Coupling mobile phone and social media data: A new approach to understanding urban functions and diurnal patterns. International Journal of Geographical Information Science 31, 12 (2017), 2331–2358.
- Wojtowicz and Wallace (2016) Jeffrey Wojtowicz and William Wallace. 2016. Use of social media by transportation agencies for traffic management. Transportation Research Record 2551 (2016), 82–89. https://doi.org/10.3141/2551-10
- Wrocław (2020) Municipal Office Wrocław. 2018 (accessed August 21, 2020). Kompleksowe Badania Ruchu we Wrocławiu i otoczeniu - KBR 2018. https://bip.um.wroc.pl/artykul/565/37499/kompleksowe-badania-ruchu-we-wroclawiu-i-otoczeniu-kbr-2018