compass.utilities.location.Jurisdiction#

class Jurisdiction(subdivision_type, state, county=None, subdivision_name=None, code=None)[source]#

Bases: object

Class representing a jurisdiction

Parameters:
  • subdivision_type (str) – Type of subdivision that this jurisdiction represents. Typical values are “state”, “county”, “town”, “city”, “borough”, “parish”, “township”, etc.

  • state (str) – Name of the state containing the jurisdiction.

  • county (str, optional) – Name of the county containing the jurisdiction, if applicable. If the jurisdiction represents a state, leave this input unspecified. If the jurisdiction represents a county or a subdivision within a county, provide the county name here.

    Important

    Make sure this input is capitalized properly!

    By default, None.

  • subdivision_name (str, optional) – Name of the subdivision that the jurisdiction represents, if applicable. If the jurisdiction represents a state or county, leave this input unspecified. Otherwise, provide the jurisdiction name here.

    Important

    Make sure this input is capitalized properly!

    By default, None.

  • code (int or str, optional) – Optional jurisdiction code (typically FIPS or similar). By default, None.

Methods

Attributes

full_county_phrase

Full jurisdiction county phrase, or empty str

full_name

Full jurisdiction name

full_name_the_prefixed

Full jurisdiction name with the prefix if needed

full_subdivision_phrase

Full jurisdiction subdivision phrase, or empty str

full_subdivision_phrase_the_prefixed

Full jurisdiction subdivision phrase, or empty str

property full_name#

Full jurisdiction name

Type:

str

property full_name_the_prefixed#

Full jurisdiction name with the prefix if needed

Type:

str

property full_subdivision_phrase#

Full jurisdiction subdivision phrase, or empty str

Type:

str

property full_subdivision_phrase_the_prefixed#

Full jurisdiction subdivision phrase, or empty str

Type:

str

property full_county_phrase#

Full jurisdiction county phrase, or empty str

Type:

str