> For the complete documentation index, see [llms.txt](https://lijeffrey39.gitbook.io/sentiment-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lijeffrey39.gitbook.io/sentiment-ai/project-setup/user-tweets.md).

# User tweets

Each user's labeled tweets must be stored locally to be used for generating user features. To fetch a user's tweets, a search is done on all tweets associated with a user using the following MongoDB query. More info about the tweets collection [here](/sentiment-ai/cloud-processing/mongodb/tweets.md).

```python
{
    {'user': username}, 
    {"$or": 
        [{'isBull': True}, {'isBull': False}] 
    }
}
```

Once tweets are fetched, the only information saved is the *time, symbol, and bull/bear* sentiment associated with each tweet. The data for each user is then stored in the `user_tweets` folder as CSV files (ex. `user_tweets/lemurback.csv`).&#x20;

![Example user tweets](https://1191160537-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MD0bNmrAlgQ-ZkaKZF1%2F-MDGFao6MjRSDr18diSU%2F-MDGG0AaLNmJcQtAeIqF%2FScreen%20Shot%202020-07-27%20at%201.11.48%20PM.png?alt=media\&token=15580f54-bd58-41b9-aa9c-c43b86c9d8ea)
