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:

>>> validate('A')
'A'
>>> validate('62.01')
'6201'
>>> str(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.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.label(number)

Lookup the category label for the number.

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.