lib.adf_web

Website (web) generation class for the Atmospheric Diagnostics Framework (ADF). This class inherits from the AdfObs class.

Currently this class does three things:

  1. Initializes an instance of AdfObs.

  2. Determines if a website will be generated.

  3. Sets website-related internal ADF variables.

This class also provides a method for generating a website, as well as a method to add an image file or pandas dataframe to the website.

Attributes

_PANDAS_DF

_PANDAS_DF

Classes

_WebData

Class that stores all of

AdfWeb

Website class, which initializes

Module Contents

lib.adf_web._PANDAS_DF = True
lib.adf_web._PANDAS_DF = False
class lib.adf_web._WebData(web_data, web_name, case_name, category=None, season=None, non_season=False, plot_type='Special', data_frame=False, html_file=None, asset_path=None, multi_case=False)[source]

Class that stores all of the data and metadata from the “add_website_data” method needed by the website generator.

name
data
case
category = None
season = None
non_season = False
plot_type = 'Special'
data_frame = False
html_file = None
asset_path = None
multi_case = False
class lib.adf_web.AdfWeb(config_file, debug=False)[source]

Bases: lib.adf_obs.AdfObs

Website class, which initializes an AdfObs object and provides additional variables and methods needed for website generation.

__website_data = []
__plot_type_order = []
__plot_type_multi = []
__case_web_paths
property create_html

Return the “create_html” logical to user if requested.

add_website_data(web_data, web_name, case_name, category=None, season=None, non_season=False, plot_type='Special', multi_case=False)[source]

Method that provides scripts a way to add an image file or Pandas dataframe to the website generator.

Required Inputs:

web_data -> Either a path to an image file, or a pandas dataframe. web_name -> The name of the plot or table (usually the plotted variable or case name). case_name -> The name of the model case or dataset associated with the plot or table.

Optional Inputs:

category -> Category for associated variable. If not provided then generator will

attempt to grab it from the variable defaults file. If no default is present then it will default to “No category yet”.

season -> What the season is for the plot. If not provided it will assume the

plot does not need any seasonal seperation.

non_season -> Are the plots NOT divided up by seaons, ANN, DJF, MAM, JJA, or SON?
  • QBO is displayed as QBOts and QBOamp in the season argument above

plot_type -> Type of plot. If not provided then plot type will be “Special”.

multi_case -> Logical which indicates whether the image or dataframe can contain

multiple cases (e.g. a line plot with one line for each case).

create_website()[source]

Generate webpages to display diagnostic results.