get_tweets/get_tweets.ipynb
: uses twitter api v2 to retrieve tweets data and save them inget_tweets/
andget_tweets/tweets_data/
as.json
files- requires twitter api keys
get_tweets/merge_tweets.ipynb
: cleans up and merge tweets data from relevant companies and save it todata/tweets_dow.csv
train.ipynb
: uses labeled data to train the nlp model via spacy, trained models are saved tooutput/
tweets.ipynb
: loads trained model to calculate climate-related score for each tweets, then aggregate into monthly scores for each stock
conda-env.yml
: create conda environment byconda env create -f conda-env.yml
config.cfg
: for spacy training pipelinekeywords.txt
: climate topic keywords, used to construct non-climate related labelsget_tweets/search_*.yaml
: search queries for retrieving tweets inget_tweets.ipynb
data/tickers_dow.csv
,data/tickers_sp_100.csv
: stocks informationclimate_score.csv
: constructed monthly score for each stock