indicators#
Shared weighted-indicator vocabulary for the vote-based curation steps.
A single predicate language reused by every step that tallies weighted
evidence toward a class (resolve_by_vote in reconcilers.py,
classify_parcel_land_use in inferers.py): each indicator references
existing columns and contributes a boolean vote, so any recipe can mix and
match the same vocabulary regardless of which voting step it configures.
Functions#
|
Return a boolean Series marking rows that satisfy one voting indicator. |
Module Contents#
- openplaces.io.curator.indicators.evaluate_indicator(curated: pandas.DataFrame, indicator: dict) pandas.Series#
Return a boolean Series marking rows that satisfy one voting indicator.
Indicators reference columns by name; any referenced column that is absent yields an all-False result, so the indicator simply contributes no votes.
Supported
typevalues:value_share_below:value / sum(total) < max_ratio. Withinclude_zerotrue, a zerovaluealso matches (covers a zero total).keyword: case-insensitivestr.contains(pattern)oncolumn(regexdefaults to true; set false for a literal substring match).equals:columnequalsvalue.in_set:columnvalue is invalues.numeric_at_least(aliascount_at_least):column >= min.numeric_at_most:column <= max.any_of: true where any of the nestedindicatorsmatches. Lets a backing signal corroborate an existing indicator (e.g. an independent source agreeing with a generic column) without contributing an extra weighted vote of its own – the whole group counts once.