Repository navigation
Home
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.
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!
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.
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.
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.
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 before being able to use it yourself. For this reason, we will limit the time of collection through this method to thirty days in a row 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.
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 be the server managing all the operations, and thus you will depend on its power to do 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. Of course, 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 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.
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.
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.
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 in a row 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.
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 also have the possibility to only select a language filter, which will result in CATS only collecting tweets considered as being in the language you specified, 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). This is due to the way these tools work. For example, many of these tools first need to lemmatize a corpus, and because of the morphology and grammatical rules of certain languages, some lemmatizers will work more or less efficiently. 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.
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 the way you want to collect you rcorpus, 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.
As mentioned before, the keyword filter enables to collect in real time tweets containing at least one, or more words present in the list of words you enter in this field. Two operators are available for the keyword filter: the "and" operator, and the "or" operator. The "and" operator is represented with a space, and the "or" operator is represented with a ",". So, if you enter "cat cheese Elvis" in your list of keywords, CATS will collect all the tweets containing "cat" and "cheese" and "Elvis" in the same tweet (and yes, I'm sure it's very common!). On the other hand, if you enter "cat,cheese,Elvis" in the keyword field, CATS will collect all the tweets containing either "cat", or "cheese", or "Elvis". It is also possible to combine both operators, and thus if you enter "cat cheese Elvis,moustache", CATS will collect all the tweets containing "cat" and "cheese" and "Elvis", as well as the tweets containing "moustache". In this case the "or" operator (",") serves as a delimitation between the two kinds of tweets that you wish to collect: the ones containing all three words "cat", "cheese" and "Elvis", and the tweets simply containing the word "moustache".
Note that CATS in case insensitive, so here it would also collect the tweets containing "elvis".
Also note that this filter will collect tweets matching your query as they are tweeted. In other words, CATS will collect tweets tweeted AFTER the beginning of your collection. Tweets collected using this filter will be collected in real time, and you will not be able to collect tweets which have been tweeted BEFORE the beginning of the collection process.
This keyword collection filter only focuses on the content of the tweets themselves, and does not take into account other parameters like the location, or the user tweeting this. But again, if you want to apply other filters to this collection, you still have the possibility to do it with the Tweet analysis dashboard, after the collection process.
This filter enables you to only collect geolocated tweets which fall within an area of your choice. This collection method is very interesting if you want to focus on users from a specific region/country. In order for CATS to determine this region, you have to give a comma-separated list of longitude,latitude pairs specifying a set of bounding boxes to filter tweets by, the southwest corner of the bounding box coming first. Only geolocated tweets falling within the requested bounding boxes will be collected by CATS. In other words, you have to enter two sets of coordinates representing the southwestern and northeastern angles of a square which would determine the region you are interested in. For example, the set of coordinates "-122.75,36.8,-121.75,37.8" would match the San Francisco area; "-122.75" being the longitude coordinates of the south-west angle of the bounding box, "36.8" being the latitude of that very angle, and "121.75" and "37.8" being respectively the longitude and latitude of the north-east angle of the bounding box.
To help you determine the bounding boxes of the areas which are relevant to you, there are several online tools available, but Google Maps also provides the longitude and latitude information you need: https://www.google.com/maps/
Left-clicking once anywhere on the map will display the coordinates of that point at the bottom of the screen. However, note that the first value displayed corresponds to the latitude, and the second one is the longitude, so be careful when entering those coordinates in CATS, as the first one you have to give for each pair is the longitude. Also, do not forget that the southwest corner of your bounding box has to come first.
This filter enables you to collect all the tweets from specific users. To do that, you have to enter a list of Twitter IDs corresponding to the Twitter users you are interested in. Each Twitter user is associated to a unique ID, which is represented by a list of numbers. This ID is not openly displayed on one's Twitter profile, but is easy to retrieve with this online application: http://tweeterid.com/
To get the ID associated to a user thanks to this application, simply enter the username you are interested in, and press "convert". Note that the Twitter username is the name preceded by the "@" symbol. Thus, if you want to retrieve the Twitter ID of the user @tomselleck, enter @tomselleck, and click on "convert" to obtain the ID of that user.
Once you have the list of all the user IDs you want to collect tweets from, enter them separated by a comma in the user filter field in CATS.
This collection method will thus enable you to collect all the tweets from the users whose IDs you mentioned. Note that retweets from other users will also be collected. Indeed, a tweet from someone retweeting one of the users you mentioned will be collected as well. This detail is important, because this can potentially make your corpus grow very fast if you focus on public figures who are likely to be retweeted a lot.
The user filter, as the other filters, will only enable you to collect tweets tweeted after the beginning of the collection, and not before.
The goal of this section will be to present the different analysis tools feature in CATS. Some of them are relatively standard, but some of them are more specific, so a review of all these tools will explain how they work, and how to use them, so that users know exactly what method can best fit their needs. As with other sections, this one will be updated regularly as new features are implemented in CATS. Our goal is to add new functions with time, in order to regularly provide new tools enabling people to analyze various aspects of their corpora.
Once you start collecting tweets with CATS, you will be able to analyze your corpus in real time. Rather, you will almost be able to analyze your corpus in real time... CATS will be updated with the latest composition of the corpus you are collecting everyday at midnight, meaning that you will have to wait a few hours after the very beginning of the collection to be able to play around with the Tweet analysis dashboard.
All along this section, several screenshots will show what each part of the analysis dashboard look like.
Before reviewing the different aspects of the analysis dashboard, it is important to know that when collecting tweets, various information, called meta-data, are stored along with the content of the tweets themselves. Actually, among all the meta data collected, the content of the tweet itself only represents a small proportion of all that is collected. Then, information such as the date when the tweet was published, username of the author, description the user provided, etc, is available. To have a description of all the possible meta-data stored along with each tweet, feel free to visit: https://dev.twitter.com/overview/api/users
Depending on the preferences of each user, not all kinds of meta-data will be available. Thus, if a user decided to disable the geolocation, this information will not appear.
These meta-data will be accessible by CATS users, either through CATS itself, or when downloading tweets to analyze them with tools other than CATS.
If you experience a bug with CATS, or feel like a new feature could be added to the interface, feel free to post it in the "Issues" section, on the right hand side of this wiki. Before submitting the issue, try to see if you can reproduce it. When submitting the issue, be as descriptive as possible of the bug, as the more accurate you will be, the better we will be able to spot and fix it. Please only use the "Issues" section to report bugs, problems, or new features that you feel could be useful to many people. Do not use this section to ask questions. If you have any question, or if you would like to know more about any feature of CATS, please contact us and ask your question directly.
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 CATS. 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.
M. Gauthier, A. Guille, A. Deseille, and F. Rico. 2015. "Text Mining and Twitter to Analyze British Swearing Habits". In Proceedings of the 1st International Conference on Twitter for Research. https://www.academia.edu/13924468/Text_Mining_and_Twitter_to_Analyze_British_Swearing_Habits
- [What is CATS?] (https://github.com/CATS-Project/CATS/wiki#what-is-cats)
- [How to connect to CATS] (https://github.com/CATS-Project/CATS/wiki#how-to-connect-to-cats)
- [Getting your Twitter OAuth and logging in to CATS] (https://github.com/CATS-Project/CATS/wiki#getting-your-twitter-oauth-and-logging-in-to-cats-a-completer)
- [What kinds of CATS are there?] (https://github.com/CATS-Project/CATS/wiki#what-kinds-of-cats-are-there)
- [Lyon-2-hosted CATS] (https://github.com/CATS-Project/CATS/wiki#lyon-2-hosted-cats)
- [Self-hosted CATS] (https://github.com/CATS-Project/CATS/wiki#self-hosted-cats)
-
Tweet collection dashboard
- [Duration] (https://github.com/CATS-Project/CATS/wiki#duration)
- [Language] (https://github.com/CATS-Project/CATS/wiki#language)
- [Collection filters] (https://github.com/CATS-Project/CATS/wiki#collection-filters)
- [Keyword filter] (https://github.com/CATS-Project/CATS/wiki#keyword-filter)
- [Location filter] (https://github.com/CATS-Project/CATS/wiki#location-filter)
- [User filter] (https://github.com/CATS-Project/CATS/wiki#user-filter)
- [Tweet analysis dashboard] (https://github.com/CATS-Project/CATS/wiki#tweet-analysis-dashboard)
- [Corpus filtering] (https://github.com/CATS-Project/CATS/wiki#corpus-filtering)
- [Tweets and their meta-data... Meta what?] (https://github.com/CATS-Project/CATS/wiki#tweets-and-their-meta-data-meta-what-)
- [Corpus browsing] (https://github.com/CATS-Project/CATS/wiki#corpus-browsing)
- [Vocabulary] (https://github.com/CATS-Project/CATS/wiki#vocabulary)
- [Tweets] (https://github.com/CATS-Project/CATS/wiki#tweets)
- [Corpus Mining] (https://github.com/CATS-Project/CATS/wiki#corpus-mining)
- [Named-entity recognition] (https://github.com/CATS-Project/CATS/wiki#named-entity-recognition)
- [Topic modeling] (https://github.com/CATS-Project/CATS/wiki#topic-modeling)
- [Latent Dirichlet Allocation] (https://github.com/CATS-Project/CATS/wiki#latent-dirichlet-allocation-lda)
- [Latent Semantic Analysis] (https://github.com/CATS-Project/CATS/wiki#latent-semantic-analysis-lsa)
- [Event detection and tracking] (https://github.com/CATS-Project/CATS/wiki#event-detection-and-tracking)
- [How CATS works] (https://github.com/CATS-Project/CATS/wiki#how-cats-works)
- [CATS and Twitter's API] (https://github.com/CATS-Project/CATS/wiki#cats-and-twitters-api)
- [Want to contribute to CATS?] (https://github.com/CATS-Project/CATS/wiki#want-to-contribute-to-cats-)
- [Want to report an issue?] (https://github.com/CATS-Project/CATS/wiki#want-to-report-an-issue-)
- [Terms of use and privacy] (https://github.com/CATS-Project/CATS/wiki#terms-of-use-and-privacy)
- [Contact] (https://github.com/CATS-Project/CATS/wiki#contact)
- [References] (https://github.com/CATS-Project/CATS/wiki#references)
- [Publications] (https://github.com/CATS-Project/CATS/wiki#publications)