Skip to content

Commit 4426faa

Browse files
committed
- initial import
0 parents  commit 4426faa

37 files changed

+2014
-0
lines changed

.directory

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[Dolphin]
2+
SortRole=date
3+
Timestamp=2015,3,8,1,6,21
4+
Version=3
5+
ViewMode=1

3vs.png

53.7 KB
Loading

Diagram1.dia

1.23 KB
Binary file not shown.

Diagram1.png

94.9 KB
Loading

bigdata1.png

1.05 MB
Loading

bigdata2.png

1.02 MB
Loading

cluster.jpg

1.24 MB
Loading

commands.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
CREATE EXTERNAL TABLE json_tweet (json STRING)
2+
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\n'
3+
LINES TERMINATED BY '\n'
4+
STORED AS TEXTFILE
5+
LOCATION 's3n://bdigital-mob-dataset-twitter/CAT/';
6+
7+
CREATE TABLE IF NOT EXISTS tweets AS
8+
SELECT get_json_object(json_tweet.json, '$.id') as id, get_json_object(json_tweet.json, '$.createdAt') as timestamp, get_json_object(json_tweet.json, '$.geoLocation.longitude') as longitude, get_json_object(json_tweet.json, '$.geoLocation.latitude') as latitude,
9+
ST_Point(get_json_object(json_tweet.json, '$.geoLocation.longitude') ,get_json_object(json_tweet.json, '$.geoLocation.latitude') ) as geom ,
10+
get_json_object(json_tweet.json, '$.text') as text FROM json_tweet;
11+
12+
13+
curl -XPUT -u bdigital:gvivSjqauYLvcTnW50p8 http://54.194.28.244:8080/tweets -d '
14+
{
15+
"mappings" : {
16+
"_default_" : {
17+
"properties" : {
18+
"loc" : {
19+
"type" : "geo_point"
20+
}
21+
22+
}
23+
}
24+
}
25+
}
26+
';
27+
28+
geohive -e 'select concat("{\"index\":{\"_index\":\"tweets\",\"_type\":\"tweet\",\"_id\":", rowsequence() , "}} \n") , to_json(named_struct("id", id, "loc", array(cast(longitude as double),cast(latitude as double)))) from tweets where geom is not null;' > tweets.json

data_analysis.png

60.8 KB
Loading

ebola_ushahidi.jpg

196 KB
Loading

0 commit comments

Comments
 (0)