leaf_focus/report/processing/normalise.py
def electorate(self, value: str):
        """Normalise an electorate name, which may include a state name."""
        if not value:
            return None
        alpha = re.compile("[^a-zA-Z ]")
        value = alpha.sub("", value).lower()
        known = {}
        result = known.get(value, None)
        if result is None:
            return value
        return result
Normalise an electorate name, which may include a state name.
Normalise an electorate name, which may include a state name.
Normalise an electorate name which may include a state name .
def electorate(self, value: str):
        if not value:
            return None
        alpha = re.compile("[^a-zA-Z ]")
        value = alpha.sub("", value).lower()
        known = {}
        result = known.get(value, None)
        if result is None:
            return value
        return result
def electorate ( self , value : str ) : if not value : return None alpha = re . compile ( "[^a-zA-Z ]" ) value = alpha . sub ( "" , value ) . lower ( ) known = { } result = known . get ( value , None ) if result is None : return value return result
Normalise an electorate name, which may include a state name.
Normalise an electorate name which may include a state name .
"""Normalise an electorate name, which may include a state name."""
self
value
str