sepal_ui.sepalwidgets.inputs.LoadTableField#

class sepal_ui.sepalwidgets.inputs.LoadTableField(**kwargs)[source]#

A custom input widget to load points data.

The user will provide a csv or txt file containing labeled dataset. The relevant columns (lat, long and id) can then be identified in the updated select. Once everything is set, the widget will populate itself with a json dict. {pathname, id_column, lat_column,lng_column}.

Parameters:
  • label (str) – the label of the widget

  • kwargs – any parameter from a v.Col. If set, ‘children’ and ‘v_model’ will be overwritten.

Attributes

IdSelect

input to select the id column

LatSelect

input to select the lat column

LngSelect

input to select the lng column

default_v_model

xx, 'lat_column': xx, 'lng_column': xx}

fileInput

The file input to select the .csv or .txt file

Methods

__init__

A custom input widget to load points data.

reset

Clear the values and return to the empty default json.

LoadTableField.__init__(label='Table file', **kwargs)[source]#

A custom input widget to load points data.

The user will provide a csv or txt file containing labeled dataset. The relevant columns (lat, long and id) can then be identified in the updated select. Once everything is set, the widget will populate itself with a json dict. {pathname, id_column, lat_column,lng_column}.

Parameters:
  • label (str) – the label of the widget

  • kwargs – any parameter from a v.Col. If set, ‘children’ and ‘v_model’ will be overwritten.

Return type:

None

LoadTableField.reset()[source]#

Clear the values and return to the empty default json.

Return type:

Self