parser-aws/dataset_filter.rb
# twitter attributes to keep
# just copy the lines and adapt to the attributes you want
# default ones: text, coordinates
twitter attributes to keep
just copy the lines and adapt to the attributes you want
default ones: text, coordinates
twitter attributes to keep just copy the lines and adapt to the attributes you want default ones : text coordinates
def transfer_attr(tweet, final_tweet)
  final_tweet['created_at'] = tweet['created_at'] unless tweet['created_at'].nil?
  unless tweet['user'].nil?
    final_tweet['user'] = Hash.new
    final_tweet['user']['location'] = tweet['user']['location'] unless tweet['user']['location'].nil?
  end
end
def transfer_attr ( tweet , final_tweet ) final_tweet [ 'created_at' ] = tweet [ 'created_at' ] unless tweet [ 'created_at' ] . nil? unless tweet [ 'user' ] . nil? final_tweet [ 'user' ] = Hash . new final_tweet [ 'user' ] [ 'location' ] = tweet [ 'user' ] [ 'location' ] unless tweet [ 'user' ] [ 'location' ] . nil? end end
twitter attributes to keep
just copy the lines and adapt to the attributes you want
default ones: text, coordinates
twitter attributes to keep just copy the lines and adapt to the attributes you want default ones : text coordinates
tweet
<not_specific>
final_tweet
<not_specific>