import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html #from tempgraphs import tnTPPlotAll from dash.dependencies import Input, Output from app import app from freshGraphs import tn_tp_scatter_filter, choose2Filtered, mapPlotFiltered, convert_to_json, overTimeFiltered from s3References import pullMasterdata from controls import LAKES, lake_status_options, Substrate_Status, Substrate_Status_options, \ Sample_Types_options, Sample_Types, Field_Methods_options, Microcystin_Method, Microcystin_Method_options, \ Field_Methods, institution_status_options, INSTITUTIONS, ynOptions, ynLabels #from NewGraphs import tn_tp_scatter_filter, choose2Filtered, mapPlotFiltered, convert_to_json, overTimeFiltered app.config['suppress_callback_exceptions'] = True df = pullMasterdata() dateFilters = html.Div([ html.Details([ html.Summary("Filter by Date"), html.Div(children=[ html.H6( 'Year', className="control_label" ), dcc.RangeSlider( id='filter-year-slider', min=df['Year'].min(), max=df['Year'].max(), value=[df['Year'].min(), df['Year'].max()], marks={
import dash_table import dash_html_components as html from dash.dependencies import Input, Output, State from s3References import client, MasterData, pullMasterdata, pullMetaDB, Bucket, UploadFolder, dfexampleSheet, AssetsFolder import base64 import io import pandas as pd from dash_reusable_components import Card, NamedSlider, NamedInlineRadioItems, HalsNamedInlineRadioItems from controls import month_Controls, Substrate_Status_options, Sample_Types_options, Field_Methods_options, Microcystin_Method_options, data_Review_options import datetime from urllib.parse import quote as urlquote import urllib.parse import dash import random dfMasterData = pullMasterdata() dfMetadataDB = pullMetaDB() app.config['suppress_callback_exceptions'] = True class User: def __init__(self, username, password, fullName): self.username = username self.password = password self.fullName = fullName def __repr__(self): return f'<User: {self.username}>' users = []
def update_graph(selected_option, yaxis_column_name, jsonified_data): desiredData = pullMasterdata() overTime(selected_option, yaxis_column_name, desiredData)
def update_output(jsonified_data): desiredData = pullMasterdata() return mapPlot(desiredData)
def update_graph(selected_option, xaxis_column_name, yaxis_column_name, jsonified_data): desiredData = pullMasterdata() return choose2(selected_option, xaxis_column_name, yaxis_column_name, desiredData)
def update_output(jsonified_data): desiredData = pullMasterdata() return tn_tp(desiredData)