Implementation of Causal Modeling of Twitter Activity during COVID-19 - Gencoglu O. & Gruber M. (2020)
This repository provides the full implementation. Requires python 3.7.
Distinguishing events that "correlate" with public attention and sentiment change from events that "cause" public attention and sentiment change during COVID-19 pandemic
See directory_info in the data directory for the expected files. Template of tweets.csv is provided.
See source directory.
Relevant configurations are defined in configs.py, e.g.:
--start_date '2020-01-22' --end_date '2020-03-18' --sentiment_model 'distilbert-base-uncased-finetuned-sst-2-english' --percentiles [75]
source directory tree:
├── causal_inference.ipynb
├── configs.py
├── data_utils.py
├── eval_utils.py
├── feature_extraction.py
├── inference.py
├── sentiment.py
├── train.py
└── train_utils.py
@article{gencoglu2020causal, title={Causal Modeling of Twitter Activity during COVID-19}, author={Gencoglu, Oguzhan and Gruber, Mathias}, journal={Computation}, volume={8}, number={4}, pages={85}, year={2020}, doi={10.3390/computation8040085} }
or
Gencoglu, Oguzhan, and Gruber, Mathias. "Causal Modeling of Twitter Activity during COVID-19." Computation. 2020; 8(4):85.