<commit_before>"""Each dimension of a multi-dimensional dataset can be indexed by a set of coordinates.

Dimensions might be represented as Euclidean coordinates over a grid::

    >>> x = Coordinates('x', range(0, 100))
    >>> y = Coordinates('y', range(0, 100))

A subset of Local Authority Districts in England would be a region-based spatial dimension::

    >>> local_authority_districts = Coordinates('LADs', ['E07000128', 'E07000180'])

The hours of an average annual day would be a temporal dimension::

    >>> hours = Coordinates('daily_hours', [
    ...     {'name': 0, 'represents': '00:00-00:59:59'}
    ...     {'name': 1, 'represents': '01:00-01:59:59'}
    ...     {'name': 2, 'represents': '02:00-02:59:59'}
    ... ])

The economic sectors from the International Standard Industrial Classification of All Economic
Activities (ISIC), revision 4 would be a categorical dimension::

    >>> economic_sector = Coordinates('ISICrev4', [
    ...     {'name': 'A', 'desc': 'Agriculture, forestry and fishing'},
    ...     {'name': 'B', 'desc': 'Mining and quarrying'},
    ...     {'name': 'C', 'desc': 'Manufacturing'},
    ...     {'name': 'D', 'desc': 'Electricity, gas, steam and air conditioning supply'}
    ... ])

"""


class Coordinates(object):
    """Coordinates provide the labels to index a dimension, along with metadata that may be
    useful to describe, visualise or convert between dimensions.<commit_msg>Refer to interval definition conventionally 'interval'<commit_after>"""Each dimension of a multi-dimensional dataset can be indexed by a set of coordinates.

Dimensions might be represented as Euclidean coordinates over a grid::

    >>> x = Coordinates('x', range(0, 100))
    >>> y = Coordinates('y', range(0, 100))

A subset of Local Authority Districts in England would be a region-based spatial dimension::

    >>> local_authority_districts = Coordinates('LADs', ['E07000128', 'E07000180'])

The hours of an average annual day would be a temporal dimension::

    >>> hours = Coordinates('daily_hours', [
    ...     {'name': 0, 'interval': [['PT0H', 'PT1H']]}
    ...     {'name': 1, 'interval': [['PT1H', 'PT2H']]}
    ...     {'name': 2, 'interval': [['PT2H', 'PT3H']]}
    ... ])

The economic sectors from the International Standard Industrial Classification of All Economic
Activities (ISIC), revision 4 would be a categorical dimension::

    >>> economic_sector = Coordinates('ISICrev4', [
    ...     {'name': 'A', 'desc': 'Agriculture, forestry and fishing'},
    ...     {'name': 'B', 'desc': 'Mining and quarrying'},
    ...     {'name': 'C', 'desc': 'Manufacturing'},
    ...     {'name': 'D', 'desc': 'Electricity, gas, steam and air conditioning supply'}
    ... ])

"""


class Coordinates(object):
    """Coordinates provide the labels to index a dimension, along with metadata that may be
    useful to describe, visualise or convert between dimensions.
{'fraction_non_alphanumeric': 0.15756951596292482, 'fraction_numerical': 0.03226913834534844, 'mean_word_length': 3.6549520766773163, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '647354', 'n_tokens_mistral': 914, 'n_tokens_neox': 823, 'n_words': 307}