見出し画像

#D-TW08 データ収集をツール化してみた (Traditional desktop tool to collect data from twitter)

(English follows)
前回は特定の検索結果を時系列で見ながら、予測を行って比較したら面白いかもっていう部分の話をしました。まだ見てない方は是非このダッシュボードもみてみてくださいな(ここ
今回は今までの記事の結果をアプリ(?)にしてみたらどんな見た目になったのかというところを短く紹介してみようかと思います。個人用の遊び道具なのでダサさに関してはご容赦ください。。。

ツイッターを検索して、データを集める部分はこうなりました。

うふ。いろいろ仕様がバレますね。はいデータベースは以前お話した最低限のコストと、ファイルとしてコピーできるという簡便性とか、使ってみたかったという理由でSQライトを使っています。最初は通常のRDB的に使おうとして仕様に慣れなくてぎこちなく使ってました。。。
この画面では、Tryというボタンを付けていて、とりあえず適当な単語で検索するとどんな結果が出てくるのかをさらっと試す機能をつけてあります。時間のかかるクリーニングとか形態素解析などなどをやらないそのまま4のリストに表示するだけです。言語や、リツイート、リプライを含めるかなどもここで設定したりしてます。

これができたおかげで気軽にいろいろな単語を入れて分析することができるようになり結構重宝してます。ニュースになった事柄とかちょっとやってみよ、とか。たまに「流行っている」とか検索してみると日本の楽しい情報が手に入ったりして、満喫してます。無限キャベツとかはそれで知って、大ハマリした商品の一つです(お試しください)。
前回のTwitterAPI v2の仕様のアップデートで当初月50万件までしか取得できなかった無料枠が現在200万件にアップデートされました(もともともユーザーのアカウントは)。7日間しか遡れないという制約はありつつも、より色々と遊べる状況にはなりました。

The last article was about how I enjoy forecasting for chronological data. Comparing actual data with forecasting data gives us interesting insights to view data. If you haven't seen it yet, please have a look at the dash board (Here). Then today I'll introduce the interface of data collection app which I incorporated all functions which I introduced in this series of posts. Please do not mind my "not" good design since its my personal toy… 

The data collection screen looks like this (Below).

Ops, yes this image discloses a part of the app specification Lol. Yes, I used SQLight as a core database. As I mentioned before, I wanted to make it cost minimal, it allows me to copy data like a file and I simply wanted to try it by myself. It was a bit different from normal RDB system which confused me a bit. Also data was much bigger than I expected. Maybe it was not a good idea.
Here I set "Try" function to see how a search word works. This is actually the same as searching on Twitter though… It shows the quick result without doing data cleaning and tokenizing which takes a bit of time. Also including reply or retweets and language can be set here.

This app allows me to easily & quickly collect data and analyze data when I read interesting news or … sometimes I search for "what's recently popular" to get interesting information about Japan market which is very fun to me. "infinite cabbage" is one of the example I learnt from data and have been into it since then. Have a try when you have chance to get it!!

Thanks to the twitter API v2 update, my monthly quota of 500K per month increased to 2 million per month. I can use this app more than before to enjoy NLP.  I'll introduce in post when I find something interesting! Hahahaha.

この記事が気に入ったらサポートをしてみませんか?