-
create virtual env - virtualenv -p python3 vtwit source source vtwit/bin/activate
-
install dependencies from requirements.txt
-
replace credentials in config.yml for twitter app
-
run app.py to start flask API
-
run runStream.py to activate twitter stream
-
To get top 5 locations for Iphone tweets: http://0.0.0.0:9001/v1/gadgetscore/Iphone
update 1 from contributor v2
sample: Top 5 locations
[
{
"location": "USA",
"name": "Iphone",
"score": 300
},
{
"location": "Unknown",
"name": "Iphone",
"score": 99
},
{
"location": "China",
"name": "Iphone",
"score": 9
},
{
"location": "California, USA",
"name": "Iphone",
"score": 8
},
{
"location": "Austin, TX",
"name": "Iphone",
"score": 6
}
]