Twitter Analysis for Disaster Management

This project aims to explore the potential of Twitter data for disaster management and risk reduction. The project includes several Python scripts that can be used for collecting, preprocessing, and analyzing Twitter data related to natural hazards and disasters.

Find this project on GitHub

The following .py files are included in this project:

  • TweetMining.py: This script can be used for collecting Twitter data using the Twitter API. It includes functions for searching for tweets based on keywords, hashtags, or user mentions, and for collecting tweets from specific locations.
  • LocationMapping.py: This script can be used for mapping Twitter users to their geographic locations based on their profile - information. It includes functions for geocoding user locations and for visualizing the distribution of users on a map.
  • Preprocessing.py: This script can be used for preprocessing Twitter data before conducting further analysis. It includes functions for cleaning and filtering tweets, removing URLs and special characters, and extracting relevant information such as hashtags, mentions, and URLs.
  • HumanitarianTopics.py: This script trains and evaluates an LSTM classifier to classify disaster related Tweets into Humanitarian classes.

Citation

If you use this code for your research, please cite the following papers:

  • Karimiziarani, M., W. Shao, M. Mirzaei, and H. Moradkhani (2023), Toward Reduction of Detrimental Effects of Hurricanes using a Social Media Data Analytic Approach: How Climate Change is perceived?, Climate Risk Management, doi:10.1016/j.crm.2023.100480
  • Karimiziarani, M., Jafarzadegan, K., Abbaszadeh, P., Shao, W., H. Moradkhani (2022), Hazard Risk Awareness and Disaster Management: Extracting the Information Content of Twitter Data, Sustainable Cities and Society, doi:10.1016/j.scs.2021.103577.