Skip to content

SoMatch

SoMatch

Bases: SoFresh

Class for matching program data.

Parameters

input : object An object to be manipulated. Object must be of type: string

match_eventprogram(s1)

Extracts state names from event names to find host organization State/Country search and match within event name.

Keywork arguments: s1 : Country and US States searched in cleaned string Note: Includes Bharat, N. California, S. California, and DC Note: Best if used after going through soclean.clean_event()

match_program(program, info=None)

Function to match name to soi program name. This also allows you to retrieve info on the location. This pulls from pycountry, geonamescache, and SOIPrograms table in db. Can also Retrieve the match score bw/ input name & matched name (for insert into ProgramResolved table)

Keyword args: program (str) : program name to be matched info (list) : list of items to retrieve