Example #1
0
def render_output_city(name, dd):

    bool_val = True
    if dd == 'big_df':
        bool_val = False
    data = Data()
    var = "Casablanca"
    if name == "Type Of Customer":
        li = data.get_types()
        var = 'A'
    else:
        li = data.get_cities()
    panel = html.Div([
        dbc.FormGroup([
            dcc.Dropdown(id="drop_city_type",
                         options=[{
                             "label": x,
                             "value": x
                         } for x in li],
                         value=var,
                         disabled=bool_val)
        ])
    ])

    return panel
Example #2
0
def render_output_column(dd):

    data = Data()
    bool_val = True
    if dd == 'big_df':
        bool_val = False

    panel = html.Div([
        dbc.FormGroup([
            dcc.Dropdown(id="name_group_id",
                         options=[{
                             "label": x,
                             "value": x
                         } for x in data.get_names_groupe()],
                         value="City",
                         disabled=bool_val)
        ])
    ])

    return panel
Example #3
0
def main():
    loop = True
    while loop:
        print("Choose an option:")
        print("0. Text to Morse")
        print("1. Morse to Text")
        print("2. Exit")
        option = input()
        try:
            if option == "0":
                print("Enter text:")
                my_input = input()
                data = Data(my_input, False)
                print_info(data)
            elif option == "1":
                print("Enter morse:")
                my_input = input()
                data = Data(my_input, True)
                print_info(data)
            else:
                loop = False
        except Exception as e:
            print(e)
Example #4
0
###############################################################################

# Setup
import dash
from dash.dependencies import Input, Output, State
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc

from settings import config, about
from python.data import Data
from python.model import Model
from python.result import Result

# Read data
data = Data()
data.get_data()

# App Instance
app = dash.Dash(name=config.name,
                assets_folder=config.root + "/application/static",
                external_stylesheets=[dbc.themes.LUX, config.fontawesome])
app.title = config.name

# Navbar
navbar = dbc.Nav(
    className="nav nav-pills",
    children=[
        ## logo/home
        #dbc.NavItem(html.Img(src=app.get_asset_url("logo.PNG"), height="40px")),
        dbc.NavItem(html.Img(src=app.get_asset_url("logo2.png"),
Example #5
0
def plot_pie(customer):
    data = Data()
    df = data.get_product_customer().groupby('CUST_NAME')
    df_cust = df.get_group(customer)
    chart = Chart()
    return chart.plot_pie(df_cust, customer)
Example #6
0
def render_cluster_plots_products(name, filtre):
    data = Data()
    df = data.get_product_data(name)
    chart = Chart()
    return chart.plot_time_series(df, filtre)
Example #7
0
###############################################################################

# Setup
import dash
from dash.dependencies import Input, Output, State
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc

from settings import config, about
from python.process import Process
from python.data import Data
from python.charts import Chart
# from python.model import Model

data = Data()
data.get_data()

# App Instance
app = dash.Dash(name=config.name,
                assets_folder=config.root + "/application/static",
                external_stylesheets=[dbc.themes.LUX, config.fontawesome])
app.title = config.name

# Navbar
navbar = dbc.Nav(
    className="nav nav-pills",
    children=[
        ## logo/home
        #dbc.NavItem(html.Img(src=app.get_asset_url("dralyze.png"), height="70px")),
        ## about