Monthly Archives: February 2013

Popularity on Twitter (for my blog tags)

I went to a good presentation on twitter tags in January by Kym Raines.

She showed us how to identify has tags that are popular using #HashTagBattle. The idea is that if you use the hashtag that more people use, the more your tweet can show up in people’s twitter searches (yes, some people search by hashtags). So I looked into it because a lurker like me should make the most out of the few tweets I make. I found that HashTagBattle uses a search engine called Topsy. Just for fun, I created a script to capture the popularity of the tags I use in this blog.

Script:

#in IRB
load 'hashcount.rb'
list = """ all the tags scraped out of my blog """
tags = list.split(" ")
tags.each do |tag|
  h = Hashcount.new(tag)
  puts "#{tag} : #{h.get(MONTH)}"
end

#hashcount.rb
require 'hpricot'
require 'mechanize'
MONTH = 'off tab-m'
class Hashcount
    URL = "http://topsy.com/s?"
    def initialize(hash)
        mech = Mechanize.new
        @doc = Hpricot(mech.get("http://topsy.com/s?q=%23#{hash}").body)
    end
    def get(t)
        xpath = %Q(//li[@class='xxxx']/a/span[@class='count'])
        begin
            return @doc.search(xpath.sub('xxxx',t))[0].inner_html
        rescue Exception => e
            # puts e.message             
        end
    end
end

And here is the output of them:

adjuster : 44
author : 19K
automatedtesting : 11
Automation : 3,006
books : 84K
brand : 23K
Bugzilla :
caine : 126
Change : 31K
character : 6,140
children : 30K
choose : 1,661
commitment : 5,058
communityservice : 1,716
competence : 167
Compuware : 104
Confidence : 8,212
Continuousintegration : 44
Cucumber : 2,914
Cucumber-JVM : 0
Culture : 40K
database : 3,837
decision : 1,791
delegates : 83
dictators : 218
ElasticSearch : 357
Exceptional : 316
experience : 6,955
exploratorytesting : 2
Functionaltesting : 4
future : 38K
Git : 5,368
Graphicaluserinterface : 2
grasshopper :
graylog2 : 6
HardWork : 27K
help : 129K
helpingothers : 333
interactiveautomation :
interest : 1,067
investigate : 197
IRB : 274
java : 29K
Jenkins : 449
JeremyLin : 373
job : 1M
Kids : 75K
Leader : 13K
leaders : 7,144
Leadership* : 59K
Learn : 11K
Libraries : 3,339
Library : 16K
Linux : 68K
listener : 228
manager : 19K
masterpo : 1
MongoDB : 2,790
NBA : 246K
NewYorkKnicks : 1,478
Opensource : 10K
Opportunity : 5,545
organization : 2,771
Organizations : 276
payitforward : 4,025
Perserverance : 169
planner : 2,509
practice : 14K
ProblemSolving : 408
problems : 12K
program : 5,688
pursuer : 1
recognition : 1,660
recognize : 1,541
Redmine : 112
reluctantleader : 0
Resistance : 2,759
Revisioncontrol : 0
rewarding : 372
Ruby* : 12K
RubyOnRails : 844
scripts : 1,210
servant : 493
Service : 17K
software : 28K
softwaredevelopment : 1,483
softwaretest : 19
Softwaretesting : 976
speaker : 2,599
Splunk : 273
success : 63K
team : 60K
testautomation : 78
testmanager : 17
TestStack : 0
testingautomationgeneratecases :
tests : 2,539
toolsupported :
Trac : 245
training : 41K
trust : 30K
Unittesting : 70
vendor : 429
vendortesttools :
vendortools :
victimofchanges : 1
VM(operatingsystem) : 1,364
WatirPodcast : 0

Note: When I scraped them, I removed the spaces from between words as is typical of twitter hash tags.