Skip to content

A framework for observing Twitter through interactive networks.

License

Notifications You must be signed in to change notification settings

Shokesu/twitter-explorer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twitter explorer
version python-version license

An interface to explore Twitter data through interactive network visualizations.

Features

The twitter explorer helps computational social scientists to:

  • Collect Twitter data by providing a visual interface for the Twitter Search API.

  • Transform the collected data into networks: retweet networks capturing the interaction between users and hashtag networks revealing the semantic layer of the debate.

  • Explore these networks interactively by using state-of-the-art network visualizations.

Quick start

The twitter explorer requires Python ≥ 3.6. If you meet this requirement, open a terminal in your preferred folder to clone the repo and install the required libraries:

$ git clone https://github.com/pournaki/twitter-explorer.git
$ pip3 install -r requirements.txt

You can now run the collector and the visualizer:

$ streamlit run collector.py
$ streamlit run visualizer.py

They will open in a new window and instructions will follow.

Getting started

Please refer to the documentation for detailed installation instructions and how to use the twitter explorer.

Screenshots

explorer

Data protection

The twitter explorer facilitates the collection of data through the Twitter Search API. Please respect the developer agreement when handling the collected data. Our interface includes a privacy option that allows to remove all accessible metadata of users that have less than 5000 followers (no public figures) from the interactive visualization in order to comply with current privacy standards. By only displaying tweets that still exist at the time of exploration, the interface complies with Twitter's display requirements.

Future development

  • Add progress bar for collector
  • Incorporate dynamics of the retweet networks
  • Add different graph measures

Common errors

Error: StreamlitAPIException due to an outdated version of Streamlit
Fix: pip3 install streamlit --upgrade

Error: AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key'
Fix: pip3 install protobuf --upgrade

How to cite

Please cite our paper if you use the twitter explorer in your research:
Pournaki, A., Gaisbauer, F., Banisch, S., Olbrich, E., The twitter explorer: a framework for observing Twitter through interactive networks.

Related software

  • DMI-TCAT
    A powerful tool for streaming real-time tweets and storing them in an SQL database

  • twarc
    A CLI for Twitter search/streaming API

About

The idea for the twitter explorer originated from fruitful discussions in the context of the Odycceus project between Armin Pournaki, Felix Gaisbauer, Sven Banisch and Eckehard Olbrich. The tool is designed and developed by Armin Pournaki.

Acknowledgements

The twitter explorer stands on the shoulders of giants:

  • Streamlit
    The frontends of the collector and visualizer are made with Streamlit, a powerful and easily accessible tool to create interactive Python applications.
  • force-graph
    The interactive graph visualization relies on the force-graph library.
  • igraph
    All the graph operations in the twitter explorer are handled by the Python version of igraph.
  • tweepy
    An easy-to-use Python wrapper for Twitter API.

Funding

This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 732942.

License

The twitter explorer is licensed under the GNU GPLV3 license.

About

A framework for observing Twitter through interactive networks.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 41.7%
  • Python 39.9%
  • HTML 11.1%
  • CSS 7.3%