sedimentanalyst.app package

Submodules

sedimentanalyst.app.accessories module

Accessory elements for the web app

Author: Beatriz Negreiros

class sedimentanalyst.app.accessories.Accessories

Bases: object

A class for allocating accessories elements for the Dash app, including layout and Dash component settings, extensive callouts and parsing of input contents.

style_upload

style information for a dropbox component

Type

dict

intro_text

markdown test for introducing the app

Type

dash.dcc.Markdown.Markdown

inputs_text

markdown text for explaining the inputs

Type

dash.dcc.Markdown.Markdown

img_style

style information for formatting images

Type

dict

input_boxes

list of Input objects for enabling user to enter the indexing information to read from user’s files

Type

list

style_graph
Type

dict

style_statistic

style information for the statistic dropdown

Type

dict

parse_contents(tuple)

tuple of object (sedimentanalyst.analyzer.StatisticalAnalyzer) plus an object of

type html.Div with reading messages.
parse_contents(contents, filename, date, input_dict_app)
Parameters
  • contents (dash.dcc.Input.Input) – Contents of the file containing the sample data (class weights and

  • sizes) (corresponding grain) –

  • filename (dash.dcc.State.State) – Filename

  • date (dash.dcc.State.State) – date of last modified

  • input_dict_app (dict) – Index parameters input by the user necessary to read and parse the contents of the file

Returns

object for accessing necessary attributes of the class.

Return type

StatisticalAnalyzer

sedimentanalyst.app.appconfig module

sedimentanalyst.app.interac_plotter module

Module designated for the class InteractivePlotter

Author : Federica Scolari

class sedimentanalyst.app.interac_plotter.InteractivePlotter(df)

Bases: object

A class for creating interactive plots for the comparison of the statistical analysis results

df

DataFrame containing the information from the statistical analysis

Type

pandas.core.frame.DataFrame

convert_coordinates(df, projection)

Transforms the coordinates of a given projection to degrees

create_map(df, projection, samples=None)

Creates a scatter map

plot_barchart(param, samples)

Plots the user-selected parameter for all samples in a bar chart

plot_gsd(samples)

Plots the cumulative grain size distribution curve for all samples using a line chart

plot_diameters(samples)

Plots the calculated sediment diameters in a bar chart for all samples

convert_coordinates(df, projection)

Method which transforms the coordinates of a give projection to degrees.

Parameters
  • df (pandas.core.frame.DataFrame) – DataFrame on which the coordinate transformation is applied

  • projection (str) – Name of the initial projection

Returns

DataFrame object on which the coordinate transformation has been applied

Return type

pandas.core.frame.DataFrame

create_map(df, projection='epsg:3857', samples=None)

Creates a scatter map based on the DataFrame.

Parameters
  • df (DataFrame) – DataFrame on which the coordinate transformation has been applied

  • projection (str) – Name of the initial projection

  • samples (list) – Names of the collected samples

Returns

Figure object that allows the visualization of the Open Street map of the area where the samples were collected

Return type

plotly.graph_objects.Figure

plot_barchart(param, samples)

Method that outputs the results in a bar chart for the interactive comparison of the results.

Parameters
  • param (str) – Statistical parameters selectable from the user

  • samples (list) – Names of the collected samples

Returns

Figure object that allows the visualization of the plot of a

bar chart in which the statistical parameter selected by the user is shown for each selected sample

Return type

plotly.graph_objects.Figure

plot_diameters(samples)

Method which plots the calculated sediment diameters in a bar chart for all selected samples.

Parameters

samples (list) – Names of the collected samples

Returns

Figure object allowing to visualize the calculated diameters (d10, d16, d25, d30, d50, d60, d75, d84 and d90) for all the collected samples

Return type

plotly.graph_objects.Figure

plot_gsd(samples)

Method which plots the cumulative grain size distribution curve for all selected samples.

Parameters

samples (list) – Names of the collected samples

Returns

Figure object enabling the visualization of the plot of the grain

size distribution curve for all collected sample by using a line chart

Return type

plotly.graph_objects.Figure

sedimentanalyst.app.web_application module

Stand-alone designated for the web application

Author : Beatriz Negreiros

sedimentanalyst.app.web_application.download_summary_stats(data, n_clicks)
sedimentanalyst.app.web_application.parse_and_analyse(list_of_contents, list_of_names, list_of_dates, input_dict_in_layout, click)
sedimentanalyst.app.web_application.save_inputs(header, gs_clm, cw_clm, n_rows, porosity, sf_porosity, index_lat, index_lon, sample_name_index, sample_date_index, projection, n_clicks)
sedimentanalyst.app.web_application.update_barchart(data, stat_value, samples)
sedimentanalyst.app.web_application.update_diameters(data, samples)
sedimentanalyst.app.web_application.update_gsd(data, samples)
sedimentanalyst.app.web_application.update_map(data, dict_to_get_proj, samples)
sedimentanalyst.app.web_application.update_sample_id(n_clicks, data)
sedimentanalyst.app.web_application.update_stat_drop(n_clicks, data)

Module contents