Skip to content

vdslab/twitter-topic-transitions

Repository files navigation

Visualization of Topic Transitions on Twitter

A demo is available at: https://vdslab.github.io/twitter-topic-transitions/.

Prerequirements

$ pip install -r requirements.txt
$ npm ci

Data Preparation

Twitter corpus

For better visualization, we recommend setting the number of topics (= number of tweets / chunk size) to thousands.

$ python3 scripts/create_twitter_corpus.py -o data/corpus/twitter.ndjson --chunk=400 --window=3 path/to/twitter/data/*.ndjson

Learning Doc2Vec model

$ python3 scripts/d2v_learn.py --model data/twitter.model --vector-size 300 data/corpus/twitter.ndjson

generate json file

$ python3 scripts/create_json.py -m ./data/twitter.model -o public/data.json --corpus=data/corpus/twitter.ndjson

Development

$ npm start

About

Visualization of Topic Transitions on Twitter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published