Exemplo n.º 1
0
def get_dictionary_from_filesystem(property_type, file_type, profile=None, keyword_dictionary=None):
    dictionary = file_dao.get_properties_from_file(property_type=property_type,
                                                   file_type=file_type)
    if profile:
        dict_updater = file_dao.property_keywords_dictionary_closure(profile)
        dictionary = dict_updater(dictionary)
        dictionary['keyword_converter'] = dict_updater
    return dictionary
Exemplo n.º 2
0
def make_yearly_data_records(station_type, data_type):
    """ Takes a given station type (ex, global) and a data type (ex, tmax)
    and returns a collection of named tuples with the appropriate properties for
    those keys.
    """
    properties = file_dao.get_properties_from_file(property_type=station_type,
                                                   file_type="records")
    records = file_dao.get_unique_records(properties, data_types=[data_type],
                                          read_type='directory')
    return records