def style_data(self):
        """Applies self.style_function to each feature of self.data."""

        def recursive_get(data, keys):
            if len(keys):
                return recursive_get(data.get(keys[0]), keys[1:])
            else:
                return data

        geometries = recursive_get(self.data, self.object_path.split('.'))['geometries']  # noqa
        for feature in geometries:
            feature.setdefault('properties', {}).setdefault('style', {}).update(self.style_function(feature))
def style_data ( self ) : def recursive_get ( data , keys ) : if len ( keys ) : return recursive_get ( data . get ( keys [ 0 ] ) , keys [ 1 : ] ) else : return data geometries = recursive_get ( self . data , self . object_path . split ( '.' ) ) [ 'geometries' ] for feature in geometries : feature . setdefault ( 'properties' , { } ) . setdefault ( 'style' , { } ) . update ( self . style_function ( feature ) )
Applies self.style_function to each feature of self.data.