def from_json(cls, data):
        """Create a Data Collection from a dictionary.

        Args:
            {
                "header": A Ladybug Header,
                "values": An array of values,
                "datetimes": An array of datetimes,
                "validated_a_period": Boolean for whether header analysis_period is valid
            }
        """
        assert 'header' in data, 'Required keyword "header" is missing!'
        assert 'values' in data, 'Required keyword "values" is missing!'
        assert 'datetimes' in data, 'Required keyword "datetimes" is missing!'
        collection = cls(Header.from_json(data['header']), data['values'],
                         [DateTime.from_json(dat) for dat in data['datetimes']])
        if 'validated_a_period' in data:
            collection._validated_a_period = data['validated_a_period']
        return collection
def from_json ( cls , data ) : assert 'header' in data , 'Required keyword "header" is missing!' assert 'values' in data , 'Required keyword "values" is missing!' assert 'datetimes' in data , 'Required keyword "datetimes" is missing!' collection = cls ( Header . from_json ( data [ 'header' ] ) , data [ 'values' ] , [ DateTime . from_json ( dat ) for dat in data [ 'datetimes' ] ] ) if 'validated_a_period' in data : collection . _validated_a_period = data [ 'validated_a_period' ] return collection
Create a Data Collection from a dictionary.

        Args:
            {
                "header": A Ladybug Header,
                "values": An array of values,
                "datetimes": An array of datetimes,
                "validated_a_period": Boolean for whether header analysis_period is valid
            }