Prototyping Python Dashboards for Scientists and Engineers by Unknown

Prototyping Python Dashboards for Scientists and Engineers by Unknown

Author:Unknown
Language: eng
Format: epub


Chapter 5 Our First DashbOarD

Figure 5-4. The atads_figures class initialization customizes the variable names used for the CSV data (self.names) and also defines the lists used for creating the self.var_dict used to map user-friendly (self.var_labels) and the more succinct forms (self.var_names) used internally.

72

Chapter 5 Our First DashbOarD

Miscellaneous Variable Initialization

At the end of the __init__() function (see Figure 5-5), some useful variables are set, the variable name dictionary created, a list of unique airports built, and data for PHX (Phoenix Sky Harbor) read as a default.

Figure 5-5. The last part of the atads_figures class initialization sets some general variables and builds the self.var_dict dictionary, builds a list of available airports, and reads in PHX as the default airport.

Class Methods

The class methods, other than __init__(), naturally form into different groups based on their roles:

1. A set of utilities supporting data input and managing

the main internal data repository – the self.df

dataframe

2. The

update_mainchart() used to create the

graphical output

3. Utilities to draw line graphics

4. Utilities to support linear and quadratic polynomial

curve fitting

5. Utilities to enhance graphical output – titles,

watermarks, colors, etc.

73



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.