lmpy.data_wrangling.occurrence.base
Module containing Occurrence Data Wrangler base class.
Module Contents
Classes
Constructor for _OcccurrenceDataWrangler base class. |
- class lmpy.data_wrangling.occurrence.base._OccurrenceDataWrangler(store_attribute=None, pass_value=0, fail_value=1, **params)[source]
Bases:
lmpy.data_wrangling.base._DataWranglerConstructor for _OcccurrenceDataWrangler base class.
- Parameters
store_attribute (str or None) – If provided, add an assessment field to the point.
pass_value (object) – If the point passes the assessment, set the field to this value.
fail_value (object) – If the point fails the assessment, set the field to this value.
**params (dict) – A dictionary of keyword parameters.
- _modify_point(self, point)[source]
A function that modifies a Point object as needed.
The base class version is a dummy function that returns the input point.
- _pass_condition(self, point)[source]
A function that determines if a point passes some criteria.
The base class version always passes.
- Parameters
point (Point) – A point object to assess.
- Returns
Indication if the point passes the test condition.
- Return type
bool
- get_report(self)[source]
Get a report of the wrangler’s functioning.
- Returns
A dictionary of wrangler outputs.
- Return type
dict
- report_point(self, filtered=False, modified=False)[source]
Report the result of wrangling a point.
- Parameters
filtered (bool) – Was the point filtered.
modified (bool) – Was the point modified.