Esempio n. 1
0
def lr_load_cleaned_data(n_clicks):
    files = FileUtils.files('clean')
    print('Linear Load Clean')
    if len(files) == 0:
        options = [{'label': 'No files cleaned yet!', 'value': 'None'}]
    else:
        options = [{'label': file, 'value': file} for file in files]
    return options
Esempio n. 2
0
def load_upload_raw_data(n_clicks):
    files = FileUtils.files('raw')
    print('Raw')
    if len(files) == 0:
        options=[{'label':'No files uploaded yet!', 'value':'None'}]
    else:
        options=[{'label':file, 'value':file} for file in files]
    return options
Esempio n. 3
0
def cr_load_models(n_clicks):
    files = FileUtils.files('clean')
    f = []
    for file in files:
        f.append({'label': file, 'value': file})
    models = db.get('models')
    m = []
    if models is None:
        return f, m
    for k, v in models.items():
        m.append({'label': k, 'value': k})
    return f, m
Esempio n. 4
0
            'borderRadius': '5px',
            'textAlign': 'center',
            'margin': '10px'
        },
        multiple=True),
        html.Div([], id = "data-upload-msg"),
        html.Div([
            dbc.Button("Load Uploaded Files", color="info", id = 'home-load-raw-files', className="mr-4"),
            #dbc.Button("Reset App", color="danger", id = 'reset-app', className="mr-4"),
            html.Br()],
            style = {'margin': '10px', 'width': '50%'}),
        html.Div([
            html.H2("Select a file from all the uploaded files:"),
            dcc.Dropdown(
                id = 'selected-file',
                options=[{'label':file, 'value':file} for file in FileUtils.files('raw')],
                value=None,
                multi=False
            ),
            html.Br()
        ],
        style = {'margin': '10px', 'width': '50%'}),

        html.Div([], id = "display-file"),

        html.Div([], id = "file-properties"),
        html.Div([], id = "file-separator-do-nothing"),
        html.Div([], id = "file-header-do-nothing"),
        html.Div([], id = "clear-home-do-nothing"),
        html.Div([], id = "reset-app-do-nothing")
])
Esempio n. 5
0
                       id='home-load-raw-files',
                       className="mr-4"),
            #dbc.Button("Reset App", color="danger", id = 'reset-app', className="mr-4"),
            html.Br()
        ],
        style={
            'margin': '10px',
            'width': '50%'
        }),
    html.Div([
        html.H2("Select a file from all the uploaded files:"),
        dcc.Dropdown(id='selected-file',
                     options=[{
                         'label': file,
                         'value': file
                     } for file in FileUtils.files('raw')],
                     value=None,
                     multi=False),
        html.Br()
    ],
             style={
                 'margin': '10px',
                 'width': '50%'
             }),
    html.Div([], id="display-file"),
    html.Div([], id="file-properties"),
    html.Div([], id="file-separator-do-nothing"),
    html.Div([], id="file-header-do-nothing"),
    html.Div([], id="clear-home-do-nothing"),
    html.Div([], id="reset-app-do-nothing")
])
Esempio n. 6
0
"""App Main

python3 app_main
"""
import os
from dataanalytics.framework.file_utils import FileUtils
FileUtils.mkdir('raw')
FileUtils.mkdir('clean')

from dataanalytics.framework.database import db
clean_files = FileUtils.files('clean')
tags = {'empty': 1}
db.put('tags', tags)
for file in clean_files:
    tags[file] = 1

from dataanalytics.ux import index

if __name__ == '__main__':
    ""
Esempio n. 7
0
layout = html.Div(children=[
    common.navbar("Linear Regression"),
    html.Br(),
    html.Div([
        html.H2("Select a file from all the cleaned files:"),
        dbc.Button("Load Cleaned Files",
                   color="info",
                   id='lr-load-clean-files',
                   className="mr-4"),
        html.Br(),
        html.Br(),
        dcc.Dropdown(id='lr-select-file',
                     options=[{
                         'label': file,
                         'value': file
                     } for file in FileUtils.files('clean')],
                     value='empty',
                     multi=False),
        html.Br(),
        dbc.Button("Select File",
                   color="primary",
                   id='linear-regression-select-file',
                   className="mr-4")
    ],
             style={
                 'margin': '10px',
                 'width': '50%'
             }),
    html.Br(),
    html.Div([], id="linear-regression", style={'margin': '10px'}),
    html.Div([], id="linear-regression-file-do-nothing")