Esempio n. 1
0
    def daily_stats_callback(state, period, hoverData):
        original_state = state
        try:

            county = hoverData["points"][0]["customdata"][0]
            return daily_stats(county, state, period, df, county_df)
        except:
            try:
                county = None
                state = hoverData["points"][0]["location"]
                if state in states:
                    return daily_stats(county, state, period, df, county_df)
            except:
                county = None
                return daily_stats(county, original_state, period, df, county_df)
Esempio n. 2
0
def daily_stats_callback(state):
    cards = daily_stats(state)
    return [cards]
Esempio n. 3
0
    """Callback to change between news and twitter feed
    """
    if value == "testing-us-map-tab":
        return drive_thru_scatter_mapbox()
    else:
        return confirmed_scatter_mapbox()
        ##### TODO: fix this back to confirmed_scatter_mapbox()


########################################################################
#
# Desktop App Body
#
########################################################################
desktop_body = [
    dbc.Row(daily_stats(), className="top-bar-content"),  # TOP BAR
    dbc.Row(  # MIDDLE - MAP & NEWS FEED CONTENT
        [
            # LEFT - TWITTER & NEWS FEED COL
            dbc.Col(feed_tabs, className="left-col-twitter-feed-content", width=2),
            # MIDDLE - MAPS COL
            dbc.Col(
                [
                    # big map
                    html.Div(us_maps_tabs),
                    # bottom two charts
                    html.Div(
                        dbc.Row(
                            [
                                dbc.Col(
                                    dbc.Card(
Esempio n. 4
0
    def update_output(state):
        cards = daily_stats(state)

        return [cards]