Skip to content

GCI-vis is a tool for the recovery and analysis of Government-Citizen Interaction on Twitter using data mining and visualizations techniques.

Notifications You must be signed in to change notification settings

rbhubert/GCI-vis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

GCI-vis

GCI-vis is a web tool for the recovery and analysis of Government-Citizen Interaction on Twitter using data mining and visualizations techniques.

The tool allows the user to retrieve (and keep listening for new) tweets from a Twitter account, in particular an official government Twitter account. The tool also allows you to visualize different aspects of the data: account activity over time, topics covered over a period of time, citizen interactions and emotions identified in the comments, use of multimedia resources by the account, etc.

You can see the research papers that analyze different Latin American countries using this tool, published in a relevant conference and journal in the area of e-Government:

Used technologies

The backend for this project was written with Python 3.8.1. The following libraries were used:

  • flask for the set up of the web server;
  • tweepy and twarc for retrieving tweets and all the comments related;
  • pandas and NLTK for the data analysis and manipulation;
  • and pymongo for the database (MongoDB) management.

The frontend was generated with Angular CLI version 7.3.6. The following packages were used for the different visualizations:

How to use

Preparation

You will need to have Angular, Python, RQ (Redis Queue), and Mongo installed, along with the requeriments for the backend. Once you have the code in your computer, open different console windows to run the following commands.

for the frontend

cd /path/to/the/GCI-vis/frontend
ng serve --open

for the backend

Installing the requeriments:

cd /path/to/the/GCI-vis/backend
source ~/path/to/the/GCI-vis/backend/.venv/bin/activate
pip install -r requirements.txt

Server:

cd /path/to/the/GCI-vis/backend
source ~/path/to/the/GCI-vis/backend/.venv/bin/activate
export FLASK_APP=main_app.py
flask run

Redis Queue:

cd /path/to/the/GCI-vis/backend
redis-server

Worker

cd /path/to/the/GCI-vis/backend
source ~/path/to/the/GCI-vis/backend/.venv/bin/activate
python worker.py

Database

mongod --dbpath ~/data/db

Usage

When you first open the tool, you can see a section to follow an account. Enter the account name and the tool will retrieve the last 100 tweets posted by that account and will listen for any new tweets. It will also periodically retrieve all citizen interactions, including new comments.

image

Once you follow at least one account, you can start to see the visualizations. The tool offers seven different types: time series chart, Euler chart, Hasse chart, word cloud, bubble chart, radar chart, and Sankey chart. These graphs help to analyze different aspects of government communication and citizen responses, such as government activity and citizen interactions over time, the communication strategy and multimedia resource used, the emotions identified in the comments, among others.

image

About

GCI-vis is a tool for the recovery and analysis of Government-Citizen Interaction on Twitter using data mining and visualizations techniques.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published