def new_tweets(n): ''' This function loads new Twitter information ''' get_options_flow() return html.P(f"Reloaded Tweets {n}")
def new_tweets(n): get_options_flow() return html.P(f"Reloaded Tweets {n}")
####################### Instantiating the server and loading the data ####################### #Connect to sqlite database conn = sqlite3.connect('stocks.sqlite') #instantiate dash app server using flask for easier hosting server = Flask(__name__) app = dash.Dash(__name__,server = server ,meta_tags=[{ "content": "width=device-width"}], external_stylesheets=[dbc.themes.BOOTSTRAP]) #used for dynamic callbacks app.config.suppress_callback_exceptions = True #get options flow from twitter get_options_flow() flow = pd.read_sql("select datetime, text from tweets order by datetime desc", conn) #get reddit data global dfr dfr = get_reddit() ####################### Creating the layout ####################### layout1 = html.Div([ dbc.Row([dbc.Col(make_card("Enter Ticker", "success", ticker_inputs('ticker-input', 'date-picker', 36)))]) #row 1 ,dbc.Row([dbc.Col([make_card("Twitter Order Flow", 'primary', make_table('table-sorting-filtering2', flow, '17px', 10))]) ,dbc.Col([make_card("Fin table ", "secondary", html.Div(id="fin-table"))]) ])
def new_tweets(n): get_options_flow() return print("updated twitter")