T-cracia is a data-driven application aimed to monitor, measure and analyze the Spanish political activity on Twitter.

By querying the Twitter REST API  (and eventually the Streaming API) it gathers Twitter data from a list of accounts of more than 600 Spanish parties and politicians. After 7 months we are currently recording hourly samples for relevant account measures (followers count, tweets, friends, listed, etc.). The web applications interactively sorts and displays current and recorded values, and refreshes every 10 minutes.

t cracia mix 800px T craciaA quick tour of the web application


The “Arch” shows how the parties in the Spanish Congress would be distributed if seats were given according to Twitter followers instead of votes.

20150302 dofideas post arco T craciaRankings

There are rankings for parties and politicians, according to the number of followers (total, daily, weekly, current year).

20150302 dofideas post ranking partidos T cracia20150302 dofideas post ranking politicos T cracia

 Monitoring panel

The monitoring panel shows what parties and politicians are having some relevant activity during the present day. You can jump to the their Twitter feed to follow what is happening.

20150302 dofideas post panel politicos T craciaEvolution charts

This chart shows the evolution for the last two weeks and for different measures (followers, tweets, daily, weekly, total). It can display a few accounts or, if you wish, way too many of them together.

20150302 dofideas post evol politicos saturado1 T craciaDetail view

The detail view shows a statistics summary for a single account (party or politician), allowing to navigate through the relationships between parties and politicians. It also shows the hourly patterns for tweets and followers (accumulated over the last 4 weeks).

20150302 post dofideas detalle pacma1 T craciaTwitter panel

The twitter panel shows in three columns Twitter feeds with all the parties and politicians we monitor. Besides, it shows our own Twitter feed. We daily tweet stats, relevant events related to the data we gather, and stay connected with our followers.

20150302 dofideas post twitter panel T craciaFollowers

The “followers” panel shows what parties and politicians follow us back. They are potential users of our app.

20150302 dofideas post nossiguen partidos T cracia We monitor ourselves

Yes, we know we are neither party nor politician, but we monitor ourselves with the app.

20150302 dofideas post detalle tuitocracia1 T cracia 20150302 dofideas post evol tuitocracia 2015 T craciaTechnologies

T-cracia integrates a diverse set of technologies. Let me write down a short summary:

  • Databases: Postgresql for the relational structure of parties and politicians. MongoDB for the timestamped recorded events. Redis for caching.
  • Programming languages: Javascript in the front and back-end. Python for the Django admin interface that drives the Postgresql relational database.
  • Frameworks: Nodejs for the back-end, serving the single-page web app, the REST endpoints and the worker processes that query the Twitter API. AngularJS for the front-end. Django for its admin interface in order to feed and manage the Postgresql relational database.
  • Libraries: D3js for the interactive visualizations and charts, embedded in AngularJS directives. Python Pandas library for off-line data analysis.
  • Platform as a Service: Heroku, with plugins. MongoLab for MongoDB, Papertrail for logging, New Relic for performance monitoring,  RedisCloud, Blitz & Loader.io for load testing.

Get in touch

We watch Twitter every day: find us at @tuitocracia, T-cracia app and T-cracia blog.

If you like the project, want to share some ideas, ask questions or make suggestions, please do!

Leave a Reply

%d bloggers like this: