def max_captured_at()

in src/mapillary/utils/filter.py [0:0]


def max_captured_at(data: list, max_timestamp: str) -> list:
    """
    Selects only the feature items that are less
    than the max_timestamp

    :param data: The feature list
    :type data: list

    :param max_timestamp: The UNIX timestamp as the max time
    :type max_timestamp: str

    :return: Filtered feature list
    :rtype: list

    Usage::

        >>> max_captured_at([{'type': 'Feature', 'geometry':
        ... {'type': 'Point', 'coordinates': [30.98594605922699, 30.003757307208872]}, 'properties':
        ... { ... }, ...}], '2020-05-23')
    """

    return [
        feature
        for feature in data
        if feature["properties"]["captured_at"] <= date_to_unix_timestamp(max_timestamp)
    ]