Database Reference
In-Depth Information
Creating an alphabetical list of screen names for a
hashtag
It might be that you are interested in looking at exactly who is tweeting a particular hashtag
and precisely what they are saying. To do this, you can use the following code, replacing
gameinsight with the hashtag of your choice:
index=twitter
| rename entities.hashtags{}.text as hashtags
| rename user.screen_name as screenname
| fields screenname, hashtags, text
| mvexpand hashtags
| where like(hashtags, "gameinsight")
| table screenname, text
| sort screenname
Going through this code, you can see that we have taken the user.screen_name and
renamed it screenname , then limited our data to screenname, hashtags, and text. In the
fourth line, we go on to expand the hashtags into multivalued fields. Then we limit our
hashtags to those including gameinsight . Finally, we create a table showing the screen-
name and the text of the tweets, which is in alphabetical order by screenname. This way,
we can see who is saying what regarding a particular hashtag. Given the increasing import-
ance of one's image on social media, this type of analysis, as well as the others discussed in
this chapter, can be extremely useful.
Search WWH ::




Custom Search