Пример #1
0
from WatchDogs_MongoWrapper import MongoWrapper
from dash.dependencies import Input, Output
import pandas as pd


df = pd.read_csv('/Users/iankresyman/Desktop/2011_february_us_airport_traffic2.csv')
df.head()

df['text'] = df['airport'] + '' + df['city'] + ', ' + df['state'] + '' + 'Arrivals: ' + df['cnt'].astype(str)

scl = [ [0,"rgb(39,174,96)"],[0.35,"rgb(46,204,113)"],[0.5,"rgb(241,196,15)"],\
    [0.6,"rgb(243,156,18)"],[0.7,"rgb(231,76,60)"],[1,"rgb(192,57,43)"] ]

mongo = MongoWrapper()

negCoord, neuCoord, posCoord = mongo.get_lat_long('Facebook')

getTweets =  mongo.get_tweets_with_lat_long('Facebook')
allLatitude = getTweets['Latitude']
allLongitude = getTweets['Longitude']
allSentiment = getTweets['Sentiment_Value']



print('\n')
# print(negCoord[0])
# df1 = pd.DataFrame()
# df2 = pd.DataFrame()
# df3 = pd.DataFrame()
# df4 = pd.DataFrame()
# df5 = pd.DataFrame()
Пример #2
0
 def test_lat_long(self):
     mongo = MongoWrapper()
     print(mongo.get_lat_long('Facebook'))