Last active
December 26, 2015 19:29
-
-
Save richardking/7202064 to your computer and use it in GitHub Desktop.
NFL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| delta | |
| BUF | |
| delta | |
| MIA | |
| delta | |
| NE | |
| delta | |
| Jets | |
| NY Jets | |
| NYJ | |
| delta | |
| Ravens | |
| BAL | |
| delta | |
| CIN | |
| delta | |
| Browns | |
| CLE | |
| delta | |
| PIT | |
| delta | |
| HOU | |
| delta | |
| Titans | |
| TEN | |
| delta | |
| JAC | |
| delta | |
| Colts | |
| Indianapolis | |
| IND | |
| delta | |
| DAL | |
| delta | |
| PHI | |
| delta | |
| NY Giants | |
| NYG | |
| delta | |
| Washington | |
| WAS | |
| delta | |
| CHI | |
| delta | |
| GB | |
| delta | |
| DET | |
| delta | |
| MIN | |
| delta | |
| ATL | |
| delta | |
| NO | |
| delta | |
| Tampa Bay | |
| TB | |
| delta | |
| CAR | |
| delta | |
| DEN | |
| delta | |
| delta | |
| SD | |
| delta | |
| KC | |
| delta | |
| ARI | |
| delta | |
| SF | |
| delta | |
| SEA | |
| delta | |
| St. Louis | |
| STL |
Author
Author
Tag.find_by_permalink("nfl").teams.each do |t|
new = [t.name, t.short_name, t.nav_name, t.city_name, t.mascot_name, t.abbreviation].uniq
puts "delta"
new.each do |n|
puts n unless (t.positive_keywords.map{|a| a.keyword} + dups).include?(n)
t.twitter_keywords.create(:keyword => n, :positive => true) unless (t.positive_keywords.map{|a| a.keyword} + dups).include?(n)
end
puts
end
Tag.find_by_permalink("nfl").teams.map{|a| a.twitter_keywords}.flatten.count
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
new = Tag.find_by_permalink("nfl").teams.map{|t| [t.name, t.short_name, t.nav_name, t.city_name, t.mascot_name, t.abbreviation].uniq }.flatten
aa = Hash[new.map{|a| [a, new.count(a)]}]
dups = Hash[aa.select {|a| a[1] >1 }].keys
Tag.find_by_permalink("nfl").teams.each do |t|
new = [t.name, t.short_name, t.nav_name, t.city_name, t.mascot_name, t.abbreviation].uniq
puts "delta"
new.each do |n|
puts n unless (t.positive_keywords.map{|a| a.keyword} + dups).include?(n)
end
puts
end