Our goal is to prepare the data in the format which is most appropriate for analysis. It means we need to clean up unnecessary fields and focus only on the relevant parts.
We would like to analyze the sentiments of the tweets that are written by people from their different devices. Therefore, we should get rid of the tweets composed by bots, web pages, automated posting services, and so on. We cannot identify those tweets 100%, but quite a good assumption would be to select tweets posted from physical devices, meaning iPhones, Android phones, desktops, and laptops.
Twitter documents have an interesting feature, because they keep the information about the source of the tweet creation. Whenever someone uses a device to compose ...