User:Rita Graca/gradproject/prototyping/twittertrends: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
Line 7: Line 7:




''1. Using the Twitter API I could get the current trends in the US.''
'''1. Using the Twitter API I could get the current trends in the US.'''


Steps:
Steps:
Line 19: Line 19:
   twurl "/1.1/trends/place.json?id=23424977" | jq
   twurl "/1.1/trends/place.json?id=23424977" | jq


''2. I was only interested in the trends related to cancel culture, so I used Python to develop the script a bit more.''
'''2. I was only interested in the trends related to cancel culture, so I used Python to develop the script a bit more.'''


Steps:
Steps:
Line 26: Line 26:
*Look for trends with words related with cancel culture
*Look for trends with words related with cancel culture


''3. It was useful to save the trends. Instead of saving them in a .txt file, it made more sense to post them back in a Twitter account.''
'''3. It was useful to save the trends. Instead of saving them in a .txt file, it made more sense to post them back in a Twitter account.'''


Steps:
Steps:
*Create a status with the search results (a status is a tweet in the library)
*Create a status with the search results (a status is a tweet in the library)


''4. To make it look for trends regularly I created a cron job on my computer.''
'''4. To make it look for trends regularly I created a cron job on my computer.'''


   46 * * * * /usr/local/bin/python3 /Users/0972516/desktop/ritaiscancelled/trends.py
   46 * * * * /usr/local/bin/python3 /Users/0972516/desktop/ritaiscancelled/trends.py


''Outcome:''</br>
'''Outcome:'''</br>
The account @CancelledWho looks for trends related to my topic and posts them. This way I can be always monitoring an important topic of my research.
The account @CancelledWho looks for trends related to my topic and posts them. This way I can be always monitoring an important topic of my research.



Revision as of 22:34, 3 December 2019

Twitter trends

API

Cancel culture happens in Twitter through design features such as hashtags and trending topics.
To investigate better this movement, I understood I had to inform myself about which topics/people/things were being cancelled, how was the engagement with this topic, what were the language and strategies used.


1. Using the Twitter API I could get the current trends in the US.

Steps:

  • Create a Twitter developer account
  • Get keys and tokens from Twitter
  • Install Ruby
  • Install Twurl
  • Install JQ to read JSON
  • Use the command line
  twurl "/1.1/trends/place.json?id=23424977" | jq

2. I was only interested in the trends related to cancel culture, so I used Python to develop the script a bit more.

Steps:

  • Use Python library Tweepy
  • Get trends
  • Look for trends with words related with cancel culture

3. It was useful to save the trends. Instead of saving them in a .txt file, it made more sense to post them back in a Twitter account.

Steps:

  • Create a status with the search results (a status is a tweet in the library)

4. To make it look for trends regularly I created a cron job on my computer.

  46 * * * * /usr/local/bin/python3 /Users/0972516/desktop/ritaiscancelled/trends.py

Outcome:
The account @CancelledWho looks for trends related to my topic and posts them. This way I can be always monitoring an important topic of my research.

Get trends from historical archive

Use existing database

Scrape from existing website

(less accurate, abandoned)