livedoor クリップ

今年の一月にlivedoor クリップ データセットが公開されたのでダウンロードしていたのだが、全く使うことなく放置していた。今月には新しいデータが公開されるというのを奇跡的に覚えていたので、今日ダウンロードした。

README.txtによると、
フィールドは順に user_id, 対象url, クリップした時刻,タグ
となっている。


cutコマンドでURLだけ切り出そうとすると、 Illegal byte sequenceエラーになる。(2008/12と2009/06の両方とも)

~/work/LD$ cut -d , -f 2 ldclip_dataset_200812.csv 
   ......
"http://www.nikkansports.com/general/p-gn-tp0-20060809-72814.html"
"http://www.nikkansports.com/general/p-gn-tp0-20060809-72814.html"
"http://www.nikkansports.com/general/p-gn-tp0-20060809-72814.html"
cut: ldclip_dataset_200812.csv: Illegal byte sequence

調べてみると、utf-8の不正なバイト列が含まれる行が一つあったので、タグの部分だけを削った。


URLの総数

~/work/LD$ cut -d , -f 2 200812.csv | uniq | wc -l
  217702
~/work/LD$ cut -d , -f 2 200906.csv | uniq | wc -l
  286220

エントリ数が多いURL

~/work/LD$ cut -d , -f 2 200906.csv | uniq -c | sort -r | head -n 10
1118 "http://clip.livedoor.com/register/finish"
 901 "http://clip.livedoor.com/bookmarklet/"
 560 "http://www.yahoo.co.jp/"
 444 "http://today-student-girl.blogspot.com/"
 444 "http://asian-erotic-girls.blogspot.com/"
 443 "http://thenudistbeaches.blogspot.com/"
 443 "http://japanese-idol-special.blogspot.com/"
 443 "http://hflickr.blogspot.com/"
 443 "http://h-animation.blogspot.com/"
 443 "http://animation-girls.blogspot.com/"

~/work/LD$ cut -d , -f 2 200812.csv | uniq -c | sort -r | head -n 10
 960 "http://clip.livedoor.com/register/finish"
 863 "http://clip.livedoor.com/bookmarklet/"
 489 "http://www.yahoo.co.jp/"
 444 "http://today-student-girl.blogspot.com/"
 444 "http://asian-erotic-girls.blogspot.com/"
 443 "http://thenudistbeaches.blogspot.com/"
 443 "http://japanese-idol-special.blogspot.com/"
 443 "http://hflickr.blogspot.com/"
 443 "http://h-animation.blogspot.com/"
 443 "http://animation-girls.blogspot.com/"