This paper presents the Python code and illustrative crisis management data from Twitter. The code includes Twitter data collection and three machine learning algorithms that are readily usable. Three machine learning algorithms generate sentiment measures, extract topics from the tweets, and compare the similarity of topics across time. The code and the illustrative data will be accessible to researchers that are interested in using Twitter data to analyze a wide range of public perceptions and responses such as StockTwits activity; firm events such as the announcement of investment decisions or security breaches; public movements such as #earthday; and significant global events such as the invasion of Ukraine. A better understanding of the code and datasets will enable researchers in this field to engage in more extensive studies that fully utilize this rich data source to capture public perceptions.

You do not currently have access to this content.