# stdnum.eu.nace

NACE (classification for businesses in the European Union).

The NACE (nomenclature statistique des activités économiques dans la Communauté européenne) is a 4-level (and up to 4 digit) code for classifying economic activities. It is the European implementation of the UN classification ISIC.

The first 4 digits are the same in all EU countries while additional levels and digits may be vary between countries. This module validates the numbers according to revision 2 and based on the registry as published by the EC.

More information:

- https://en.wikipedia.org/wiki/Statistical_Classification_of_Economic_Activities_in_the_European_Community

- https://ec.europa.eu/eurostat/ramon/nomenclatures/index.cfm?TargetUrl=LST_NOM_DTL&StrNom=NACE_REV2&StrLanguageCode=EN&IntPcKey=&StrLayoutCode=HIERARCHIC

    >>> validate('A')
    'A'
    >>> validate('62.01')
    '6201'
    >>> str(get_label('62.01'))
    'Computer programming activities'
    >>> validate('62.05')
    Traceback (most recent call last):
        ...
    InvalidComponent: ...
    >>> validate('62059')  # does not validate country-specific numbers
    Traceback (most recent call last):
        ...
    InvalidLength: ...
    >>> format('6201')
    '62.01'

stdnum.eu.nace.compact(number)

  Convert the number to the minimal representation. This strips the number of any valid separators and removes surrounding whitespace.

stdnum.eu.nace.format(number)

  Reformat the number to the standard presentation format.

stdnum.eu.nace.get_label(number)

  Lookup the category label for the number.

stdnum.eu.nace.info(number)

  Lookup information about the specified NACE. This returns a dict.

stdnum.eu.nace.is_valid(number)

  Check if the number is a valid NACE. This checks the format and searches the registry to see if it exists.

stdnum.eu.nace.validate(number)

  Check if the number is a valid NACE. This checks the format and searches the registry to see if it exists.