Contenido

  1. turbulence.Graph
  2. turbulence.Graph.time_series
  3. turbulence.Graph.windrose
  4. turbulence.Graph.anomalies_meaning_average
  5. turbulence.Graph.time_series_web
  6. turbulence.Graph.plotly_RidgelinePlot_web
  7. turbulence.Graph.fig_html_web
  8. turbulence.Graph.backup_figure

turbulence.Graph

class turbulence.Graph()

Class using as constructor of the interactive graphics employing bokeh and plotly library; and statics graphics employing matplotlib.pyplot. These graphs are mainly oriented to be used with data from class Sesor but it's possible to use it with other data if this contained in a dataframe object with characteristics given in each method

turbulence.Graph.time_series

turbulence.Graph.time_series(data = None, variables = None, style = 'Bokeh', kind = 'line', ylabel = None, name_graph = None, time_units = None, plot_height = 350, plot_width = 600, line_widths = 2, line_alphas = 1, legend_location = 'top_left', color = None, show_figure = False, save_figure = False)

Generate an interactive graph using the bokeh or static library using matplolib.pyplot. You can use any dataframe, including the turbulent variable information contained in the Sensor object

Parameters:

Returns:

Examples

Creating random data to graphic

Interactive graph using bokeh

series_gif

Static graph. All variables are graphics in the same space

series_jpg

turbulence.Graph.windrose

turbulence.Graph.windrose(data = None, nsector = 16, style = 'plotly', lst_color = None, title = None, show_figure = False, save_figure = False)

Create an interactive windrose using plotly library or a static plot using matplotlib.pyplot

Parameters:

Returns:

Examples

Creating random data to graphic

Interactive graph using plotly

windrose_gif

Static graph using WindRose

windrose

turbulence.Graph.anomalies_meaning_average

turbulence.Graph.anomalies_meaning_average(data = None, variables = ['LE', 'H', 'TAU'], period = '30T', units = ['W/m²', 'W/m²', 'N/m²'], window = 12, min_periods = 11, plot_width = 800, plot_height = 350, line_width = 4, bar_alpha = 1, style = 'Bokeh', show_figure = False, save_figure = False, path = None)

The database is resampled according to the 'period' parameter. The moving average is then calculated by taking a width window 'window' with a minimum of 'min_periods' data. Anomalies are calculated as: anomaly = (resampled data) - (moving average) The initial configuration is for processed data from EddyPro Parameters:

Returns:

Examples

Creating random data to graphic

Interactive graph using bokeh

windrose_gif

Static graph using matplotlib.pyplot to show the sensible heat 'H'

windrose

Using the same data but modify the period of smooth to 20 minutes and taking a window of 3 hours

windrose

turbulence.Graph.time_series_web

turbulence.Graph.windrose(data = None, style = 'Bokeh', show_figure = False)

This function uses time_series and graph_AllVariables to generate the graphs used on the COMPLEX campaign website. View them at https://siata.gov.co/COMPLEX/Website/ by selecting the "Go to diagnostics" button on each station.

Parameters:

Returns:

turbulence.Graph.plotly_RidgelinePlot_web

turbulence.Graph.plotly_RidgelinePlot_web(data = None, variables = None, title = None, legend = False, color = None, fig_size = None, html_save = False, show_figure = False)

The ridgeline plot allows us to study the distribution of the numerical variables of interest. For this case, the following have been selected: 'TAU', 'Ux', 'Uy', 'Uz', 'WS', 'WS_MAX', 'T_SONIC', 'H2O_density', read from EasyFlux, but you can use data that has the format of dataframe described

Parameters:

Returns:

Examples

Creating random data to graphic

Interactive graph using plotly

ridgelineplot

turbulence.Graph.fig_html_web

turbulence.Graph.fig_html_web(lst_figs_bokeh, lst_caption_bokeh, lst_figs_plotly, lst_caption_plotly, path = None)

Save interactive figures created with bokeh or plotly in .html format2

Parameters:

Returns:

Examples

Generating the random data for the bokeh and plotly figures

Creating the figures, saving in lists and making the captions and saving HTML file

join_html

turbulence.Graph.backup_figure

turbulence.Graph.backup_figure()

This method is employed just with the Sensor object and generate the figure used in backups process

 


1 If you are a developer you can also find these graphs in this location on the GOMITA server
2 If HTML is created from Sensor object and the no path is given the file is saved here in GOMITA server