def Navbar(routes: dot = dot()): children = [ NavItem(NavLink(value.nav, href=key, active=True)) for key, value in routes.items() ] return NavbarSimple(children, brand="PriceTracker", brand_href="#", color="primary", dark=True, id='app-navbar')
from dash_bootstrap_components import Container from dash_html_components import H1 from dash_html_components import H4 from dash_html_components import Button from dash.dependencies import Input as DInput from dash.dependencies import Output as DOutput from dotmap import DotMap as dot import pandas as pd import numpy as np import plotly.express as px import dash_core_components as dcc from dash.dash import no_update selected = dot({ 'date': None, 'shop': None, 'kind': None }) __prices_file = 'csv/prices.csv' prices_df = pd.read_csv(__prices_file) productOptions= prices_df.kind.unique() productOptions = np.append(productOptions, ['All']) dates = prices_df.date.unique() shops = prices_df.shop.unique() shops = np.append(shops, ["All"]) #TODO:
routes = dot({ '/': dot({ 'layout': home_page, 'nav': 'Home', 'title': 'Home' }), '/table': dot({ 'layout': table_page, 'nav': 'Table', 'title': 'Table' }), '/bars': dot({ 'layout': bars_page, 'nav': 'Bars', 'title': 'Bars' }), '/evolution': dot({ 'layout': evolution_page, 'nav': 'Evolution', 'title': 'Evolution' }), '/comparator': dot({ 'layout': comp_page, 'nav': 'Comparator', 'title': 'Comparator' }) # '/maps/heat': dot({ # 'layout': heat_maps_page, # 'nav': 'Heat', # 'title': 'MM Heat Maps' # }), # '/maps/choro': dot({ # 'layout': choro_maps_page, # 'nav': 'Choropleth', # 'title': 'MM Choropleth Maps' # }) })
from dash_html_components import Button from dash.dependencies import Input as DInput from dash.dependencies import Output as DOutput from dotmap import DotMap as dot import plotly.express as px import pandas as pd from dash.dash import no_update import dash_core_components as dcc #TODO: #Dropdown limit #Shop dropdown? selected = dot({ 'One': None, 'Two': None }) selectedOne = dot({ 'shop': None, 'kind': None }) selectedTwo = dot({ 'shop': None, 'kind': None }) __prices_file = 'csv/prices.csv' prices_df = pd.read_csv(__prices_file) names = prices_df["name"].unique() shops = prices_df.shop.unique()