Twitter Trends App
The Twitter Trends App is managed by the PMG Technical Solutions team and has the datasource ready to go for you. You can see the datasource as Social.Twitter_Trends
.
We will add countries as needed. To check out what countries are already included run the following in Reporting → Explorer using the Custom Redshift
report type.
SELECT
country,
max(date) as max_date
FROM social.twitter_trends
group by country
If you see the country you need, make sure the max_date
column is up to date. However, if you do not see the country you need, submit a ticket here and we will get that added for you.
Use Cases
TOP 10 TRENDING
To get an alert to see the top 10 Trends in a country, save the following SQL in a Custom Alli Alert
( SELECT *
FROM social.twitter_trends
WHERE country = '{INSERT YOUR COUNTRY NAME HERE}'
ORDER BY date DESC, time DESC,rank ASC
LIMIT 10)
The Top 10 query for the United States would look like this :
( SELECT *
FROM social.twitter_trends
WHERE country = 'United States'
ORDER BY rank ASC, date DESC, time DESC
LIMIT 10)
Alert off of Keywords
The Twitter Trends update hourly so we are always on top of recent news. The alert off of keywords you want to follow, do the following.
Copy this Google Sheet - This Sheet will contain all the keywords you wanted to be alerted off of.
Make it a Datasource in Datawarehouse.
In Marketplace, go to your client, click on Add Pallet and search for
Custom Twitter Trend Alert
. Once in there, fill out the sheet and set the pallet run on the:15
of each hour to get hourly scrapes.
Here an example of the sheet filled out.
![](../../__attachments/1079050290/Screen%20Shot%202020-03-18%20at%203.25.41%20PM.png?inst-v=9d2044ed-f5d2-41ad-960f-0e53811769aa)
When this runs, it will alert you off Trends that contain any of the keywords in the google sheet.