<commit_before>#!/usr/bin/env python3

import sys
import os

sys.path.append('./climatemaps')

import climatemaps


DATA_DIR = './website/data'


def test():
    for month in range(1, 13):
        latrange, lonrange, Z = climatemaps.data.import_climate_data(month)
        filepath_out = os.path.join(DATA_DIR, 'contour_cloud_' + str(month) + '.json')
        test_config = climatemaps.contour.ContourPlotConfig()
        contourmap = climatemaps.contour.Contour(test_config, lonrange, latrange, Z)
        contourmap.create_contour_data(filepath_out)


if __name__ == "__main__":
    test()<commit_msg>Create contour data for multiple climate data types<commit_after>#!/usr/bin/env python3

import sys
import os

sys.path.append('./climatemaps')

import climatemaps


DATA_OUT_DIR = './website/data'

TYPES = {
    'precipitation': './data/precipitation/cpre6190.dat',
    'cloud': './data/cloud/ccld6190.dat',
}


def main():
    for data_type, filepath in TYPES.items():
        for month in range(1, 13):
            latrange, lonrange, Z = climatemaps.data.import_climate_data(filepath, month)
            filepath_out = os.path.join(DATA_OUT_DIR, 'contour_' + data_type +'_' + str(month) + '.json')
            test_config = climatemaps.contour.ContourPlotConfig()
            contourmap = climatemaps.contour.Contour(test_config, lonrange, latrange, Z)
            contourmap.create_contour_data(filepath_out)


if __name__ == "__main__":
    main()
{'fraction_non_alphanumeric': 0.12568681318681318, 'fraction_numerical': 0.01098901098901099, 'mean_word_length': 3.5673981191222572, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, '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': '1031756', 'n_tokens_mistral': 516, 'n_tokens_neox': 498, 'n_words': 96}