Skip to content
CATS-Project edited this page Sep 4, 2015 · 74 revisions

Welcome to the CATS wiki! This wiki will give you all the information you need to be able to use CATS to carry out your own projects. Several sections will guide you through the different aspects of CATS, so that you can have detailed information concerning all the tools available. This wiki will be updated regularly, but some elements may be missing or unclear, so do not hesitate to contact us if you have questions regarding any aspects of CATS.

What is CATS?

CATS is a web interface hosted in the university of Lyon 2, in France. It is free to use, open, and accessible by anyone. Its goal is to provide a way for researchers from various domains to easily have access to Twitter's API to collect and analyze data for their own studies.

In the past few years, there has been a growing interest in the analysis of Twitter data for various purposes (marketing, medicine, social sciences, linguistics etc...). Accessing Twitter's API makes it possible for everyone to collect very specific corpora targeting a certain category of people, a certain region, or a certain language. As Twitter is a very popular social media, this represents a good way to have access to textual data from millions of users.

The problem with this method is that in order to have access to Twitter's API, and especially to collect a corpus with various filters (geolocation, keywords etc...), the programming knowledge required can be an obstacle to people who do not have that background. Moreover, we felt that the existing tools enabling to connect to Twitter's API were either not adapted to everyone, or too limited. Thus, the goal of CATS is to bridge that gap, and enable everyone to take advantage of this material, by providing an interface enabling to both collect, and analyze the tweets thanks to the ready-made tools that CATS provides.

The advantage of CATS is that everything is web-based, meaning that the only thing needed to use it is an Internet connection; the performance of your computer will not be a problem. The other advantage is that the interface is not fixed, and will evolve with time in order to provide new features that will suit a greater number of people. It will be regularly updated with the latest corpus analysis tools developed by the teams involved in the project. However, as nothing is perfect, CATS may not (yet) necessarily suit your needs, or may not enable you to do everything you would like to. Remember that it is just supposed to be a tool, and not an "all-in-one" solution. Thus, if you have questions regarding certain functions that you would like to see, feel free to contact us, as other people may be interested in it too, so the solution to your problem may be the solution to many people's problems. Again, the goal of CATS is to help as many researchers as possible, and raising questions or problems is the best way to improve it!

How to use CATS?

The essence of CATS is to be easy to use (and it really is!), however there are certain steps you need to perform before actually being able to use it. Indeed, connecting to Twitter's API requires you to have specific credentials provided by Twitter. The goal of this section is first to teach you how to get those credentials. Then, there are two main ways you can use CATS: as what we call a "Lyon-2-hosted" interface or as a self-hosted interface. Each method has its own advantages and disadvantages, and you need to be aware of those before deciding which method you are going to use, and we will review them in this section as well. Finally, we will explain the different collection methods, and analysis tools at your disposal so that you can understand how to use CATS in the most appropriate way according to your own needs.

Getting your Twitter OAuth

Before using CATS to collect tweets through Twitter's API, you must be able to connect to it with specific access tokens with which you will be able to use OAuth. OAuth is an authentication protocol that allows users to approve application to act on their behalf without sharing their password (for more information concerning the exact way in which OAuth works, feel free to visit http://oauth.net/).

So, to get your own access tokens, you first have to have a Twitter account. If you don't have a Twitter account, you can create one here: https://twitter.com/signup

Once you logged-in to your (newly created) Twitter account, the next thing you have to do is to create an application on the Twitter Developer Site at https://dev.twitter.com/apps. Once it is created, in your new application's options, you should see a tab called "Key and Access Tokens", on which you will see your "Consumer Key", your "Consumer Secret", your "Access Token", and "Access Token Secret"; these are the access tokens you will need to connect to Twitter's API with CATS. Keep them a secret, they should never be made publicly available.

What kinds of CATS are there?

Now that you have your access tokens ready to use, you have to choose the kind of CATS you are going to use. As we mentioned earlier, there are at the moment two versions of CATS. One version which will be hosted by the servers of the university of Lyon 2, and one version which will be hosted by your own server. Why would you go through the trouble of hosting your own server running CATS you may ask? Because both versions of CATS do not have the same advantages, and both have some limitations that we will review in the next two sections. What you have to understand though, is that both versions of CATS will be using the same interface. In other words, if you want to go from a version of CATS hosted by Lyon to a version hosted by one of your own servers, there will be no learning curve, they will be both identical. What changes simply is the person/organization hosting the server running CATS, that's it, but we will come back to that in greater details in the next section.

Lyon-2-hosted CATS

WE HAVE TO EXPLAIN HOW TO ENTER ONE'S CONSUMER KEYS AND SECRETS FOR BOTH VERSIONS OF CATS. As mentioned above, this version of CATS will be hosted on our servers, meaning that you will connect to CATS from your personal computer, send your requests to our server, and then it will take care of the rest, without you having to worry about anything. You will be able to monitor the progress of your collection of tweets in real time, and do all the kinds of analyses you wish from your own computer, but taking advantage of the power of our servers. In other words, if for your analyses you would need to process hundreds of millions of tweets with a very old computer, it may take a very long time, so the advantage of this method is that since everything is taken care by the servers in Lyon, you will not be limited by the power of your computer. That is the main advantage of using the Lyon-2-hosted version of CATS, as you will not depend on the resources of your computer for the collection, and the analyses of your data.

The problem with the Lyon-2-hosted version, on the other hand, is that the number of people collecting tweets thanks to CATS at the same time has to be limited in order for CATS to run optimally. Indeed, if many people use the Lyon 2 servers at the same time, the resources these servers will be able to allocate to each user will quickly become limited. This is why the Lyon-2-hosted CATS is not publicly accessible. In order to be able to use it, you first have to request a CATS login and password. This procedure will enable us to better monitor the number of people using CATS at the same time to ensure that the performances of our servers are constantly optimal. It will also facilitate the communication between us and CATS users, so that we can better guide them when using it.

Thus, if you request access to our servers to use CATS when the maximum number of users currently using it is reached, you will have to wait for other users to stop collecting tweets with CATS to be able to use it. For this reason, we will limit the time of collection through this method to thirty days per user and per collection. This will enable everyone to have a chance to use CATS without having to wait too long.

To request access to the Lyon-2-hosted CATS, please refer to the contact section of this wiki to get all the details you need to know.

If you can't afford to wait a month (at most) to start using CATS, the alternative you have is to install it directly on your own computer, and use a self-hosted version of CATS.

Self-hosted CATS

You also have the possibility to install CATS on your own computer in order to collect and analyze your corpora of tweets. This method has several advantages over the Lyon-2-hosted CATS. The first one is what we just explained. If the Lyon 2 servers are too busy, you have to wait for other users to stop using CATS to collect. If for some reason you cannot wait, you have the possibility of installing CATS directly on your computer, and use it as your personal server hosting CATS. Thus you will be able to start using it immediately, and you will be able to collect data for as long as you please, you will not be limited to thirty days only, as you are when using the Lyon 2 servers. The other advantage is that, as you will have access to the source codes of CATS, you will be able to modify everything as you please, and even create new functions for CATS. Should you do so, don't forget to make them available for everyone by using (GIVE INDICATIONS ON HOW TO SHARE THE NEW PIECES OF CODE WITH EVERYONE), as your innovations may also benefit others.

The only potential drawback with this solution, is that your computer will serve as the server managing all the operations, and thus you will depend on its power to manage everything, from the collection of tweets, to the analyses of your corpora. Thus, when collecting tweets, your self-hosted CATS will only collect while your computer is on and has access to the Internet, so you will have to let it run for as long as you want your collection to last. Well, depending on the methodology you adopt for creating your corpus of tweets, you can shutdown your computer and stop the collection, but very often, people carrying out studies on Twitter want to have a corpus which is as representative as possible, and frequent interruptions during the collection process may not be an optimal way to reach this representativeness., but of course you decide what you want to do. The same principle applies for the analyses you want to carry out with your self-hosted CATS; the time it will take for certain processes to run will be directly linked to the speed of your computer. For corpora of reasonable sizes of course, this will not be a problem, but when reaching several million tweets, an older computer may take a long time to process. It is not necessarily a problem, and not everyone will be concerned by this aspect, but we want to make sure that users are aware of the potential limits of both version of CATS.

Collecting and analyzing tweets

CATS is fairly easy to use, and we did our best to make it as user-friendly as possible. It should be obvious now, that the two main goals of CATS are to enable you to collect, and analyze tweets. This section is here to introduce you to these two aspect of CATS. To make things clearer for the user, we divided CATS into two parts, that we call dashboards: a collection dashboard, and an analysis dashboard. This section will introduce you to the different functions of both aspects of CATS.

Tweet collection dashboard

Collecting tweets is obviously the first thing you have to do before being able to carry out a Twitter study of any kind, and there are different ways of doing it with CATS. This section will present the different parameters you can, and have to take into account when collecting a corpus. The screenshot below shows what the collection dashboard looks like:

On this dashboard, you can either choose to collect a new corpus or select a corpus collected previously. Each CATS user will be allocated their personal credentials giving access to a private account. Thus, the different corpora that you will collect with CATS will be accessible by no one else but you.

Duration

Each corpus collection has to have a limited duration that you must specify in this field. It is up to you to decide what the collection time, in days, should be. Note that if you are using a Lyon-2-hosted CATS, the collection time will be limited to a maximum of 30 days per collection in order to allow everyone to have a chance to use it, as mentioned earlier. If you are using a self-hosted version of CATS however, you will be free to collect for as long as you please. Note that specifying a duration for your collection is mandatory.

Language

No matter which collection filter you will choose (see below), you have the possibility to only keep the tweets which are in a specific language. This feature may be interesting if you want to isolate one category of speakers in a specific region for example (e.g. Spanish speakers in the US). Thus, if you collect tweets from the US with the location filter, and specify that you only want tweets detected as being in Spanish, you will only collect those tweets. You can also only select a language filter, with no specific collection filter, which will result in CATS only collecting tweets considered as being in Spanish, no matter who tweeted them, or where they were tweeted from.

To assign a specific language to a tweet, CATS uses the language detection system used by Twitter, to have more information regarding the way it works, see: https://dev.twitter.com/streaming/overview/request-parameters#language

IMPORTANT: One drawback with the language filter is that the quality of the text mining tools that you may apply to your corpus with the Tweet analysis dashboard may vary according to the language of your tweets. Indeed, most of these tools work better with English or French tweets, and are less efficient with other languages (REFERENCES NEEDED). Thus, if you choose to collect tweets in a language other than English or French, you have to be careful with the interpretations that you will draw if you use the CATS Tweets analysis dashboard, as the results may not be as relevant as they would be with English or French.

Collection filters

Once a duration is chosen, you have to select the filter you want to apply to your collection of tweets. This section will review the different filters available to you. The choice of filter will depend on what you wish to analyze in your analyses, and it is up to you to decide. For example, you may want to only collect tweets from a specific region, no matter the content of those tweets. Or you may want to collect tweets containing certain words which are key to your research. Finally, you may also want to focus on specific Twitter users, and collect all the tweets that these users tweeted.

Note that to start the collection process, you can only apply one of those filters. Thus, you cannot collect tweets from a specific region AND containing specific words for example. What you can do however, if you absolutely need to combine those two (or more) aspects, is collect all the tweets from the region which is of interest to you, and then, when using the analysis dashboard, isolate only the tweets containing the words you are interested in. Check the section on the Tweet analysis dashboard to have more information on how to filter your corpus, or do not hesitate to contact us if you are unsure of the methodology to adopt to combine several parameters in the most efficient way.

Keyword filter

Location filter

User filter

Tweet analysis dashboard

Exporting results

How CATS works

CATS and Twitter's API

Want to contribute to CATS ?

Contact

Terms of use and privacy

Publications

In this section, we will keep an up-to-date list of all the studies using CATS, so that users can easily be pointed to relevant work, and have an idea of what it is possible to do with it. If you are aware of studies which are not listed here, or are yourself a user of CATS in a study that you published, please contact us so that we can update this list.

Clone this wiki locally