27 Twitter API guide in R
Jiayi Yuan
API, known as application programming interface, is always a strong tool for data scientists or statisticians to gain useful data or information from different websites, computer programs, etc. I tried to collect data using Twitter API for my final project, and I noticed that even though the tool is helpful, not so many of my classmates are familiar with it or used it before, and many of the guides online are outdated. Therefore, in this community contribution, I would like to provide a comprehensive guide on using Twitter API to search tweets or gather some other information, such as followers or favorited tweets, in R. Using the Twitter API should be an easy thing, but there could still be many problems for those who are totally new to such a tool. Therefore, I would like to introduce different setup methods to make sure that everyone who reads this guide can successfully link the interface to R. I will also include some examples of R codes and the output data in this guide to show more directly how the interface works.
As a beginner, it took me a long time to set up the interface. I got many problems and tried to search the solutions online, but I found that not many people had those problems. Even though, for now, I still have many errors that are hard to find an answer online. Therefore, I believe an up-to-date guide on using Twitter API is necessary, and I would also like to introduce such a tool to more people who would like to gather data from webs and would not be freaked out by potential problems at the very beginning stage.
Although I have not tried other APIs, I think the underlying logic is the same. By learning Twitter API, I believe I can also take advantage of getting familiar with other user APIs quickly. Therefore, learning how to use an API can be really helpful to me in my future study and I will also try more APIs or developer tools provided by other platforms.
Here is the link for the guide: https://github.com/MiraYuan/Community_CON/blob/master/2022springcc.md