<commit_before>define ->
    class DataVisualization
        # Data layers as in name: map_id
        HEATMAP_DATASETS =
            'all':                      'asyht'
            'age_0-6':                  'ika0_6'
            'age_7-12':                 'ika7_12'
            'age_13-17':                'ika13_17'
            'age_18-29':                'ika18_29'
            'age_30-64':                'ika30_64'
            'age_over_65':              'ika65_'
            'language_fi':              'suom'
            'language_sv':              'ruots'
            'language_other':           'muunkiel'
        STATISTICS_DATASETS =
            'all':                      'väestö_yhteensä'
            'age_0-6':                  '06vuotiaat'
            'age_7-12':                 '712vuotiaat'
            'age_13-15':                '1315vuotiaat'
            'age_16-29':                '1629vuotiaat'
            'age_30-64':                '3064vuotiaat'
            'age_65-74':                '6574vuotiaat'
            'age_over_75':              'yli_75vuotiaat'
            'household-dwelling_unit':  'asuntokuntien_keskikoko_hlöäasuntokunta'
            'language_fi-se':           'suomi_ja_saame'
            'language_sv':              'ruotsi'
            'language_other':           'muu_kieli'
        FORECAST_DATASETS =
            'all':                      'väestö_yhteensä'
            'age_0-6':                  '06vuotiaat'
            'age_7-12':                 '712vuotiaat'
            'age_13-15':                '1315vuotiaat'
            'age_16-29':                '1629vuotiaat'
            'age_30-64':                '3064vuotiaat'
            'age_65-74':                '6574vuotiaat'
            'age_over_75':              'yli_75vuotiaat'
        STATISTICS_TYPES =
            'current':                  'asuntokunnat'
            'forecast':                 'ennuste'
        DATA_LAYERS = Object.keys HEATMAP_DATASETS
        getStrata: ->
            HEATMAP_DATASETS

        heatmapLayerPath: (id) ->
            layerFmt = 'png'
            # "http://geoserver.hel.fi/geoserver/gwc/service/tms/1.0.0/popdensity:#{id}@ETRS-TM35FIN@#{layerFmt}/{z}/{x}/{y}.#{layerFmt}"
            # "http://geoserver.hel.fi/geoserver/gwc/service/wmts/?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=popdensity:alltest&FORMAT=image%2Fpng&TILEMATRIXSET=ETRS-TM35FIN&TILEMATRIX=ETRS-TM35FIN:15&TILEROW=26700&TILECOL=14500&STYLE=popdensity:all_density_suom"
            unless HEATMAP_DATASETS[id]
                return ''
            "http://geoserver.hel.fi/geoserver/gwc/service/wmts/?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=popdensity:alltest&style=popdensity:all_density_#{HEATMAP_DATASETS[id]}&FORMAT=image%2F#{layerFmt}&TILEMATRIXSET=ETRS-TM35FIN&TILEMATRIX=ETRS-TM35FIN:{z}&TILEROW={y}&TILECOL={x}"

        getStatisticsLayer: (name) ->
            STATISTICS_DATASETS[name]

        getStatisticsType: (name) ->
            STATISTICS_TYPES[name]

        getHeatmapLayers: ->
            Object.keys HEATMAP_DATASETS
<commit_msg>Use https in visualisations.<commit_after>define ->
    class DataVisualization
        # Data layers as in name: map_id
        HEATMAP_DATASETS =
            'all':                      'asyht'
            'age_0-6':                  'ika0_6'
            'age_7-12':                 'ika7_12'
            'age_13-17':                'ika13_17'
            'age_18-29':                'ika18_29'
            'age_30-64':                'ika30_64'
            'age_over_65':              'ika65_'
            'language_fi':              'suom'
            'language_sv':              'ruots'
            'language_other':           'muunkiel'
        STATISTICS_DATASETS =
            'all':                      'väestö_yhteensä'
            'age_0-6':                  '06vuotiaat'
            'age_7-12':                 '712vuotiaat'
            'age_13-15':                '1315vuotiaat'
            'age_16-29':                '1629vuotiaat'
            'age_30-64':                '3064vuotiaat'
            'age_65-74':                '6574vuotiaat'
            'age_over_75':              'yli_75vuotiaat'
            'household-dwelling_unit':  'asuntokuntien_keskikoko_hlöäasuntokunta'
            'language_fi-se':           'suomi_ja_saame'
            'language_sv':              'ruotsi'
            'language_other':           'muu_kieli'
        FORECAST_DATASETS =
            'all':                      'väestö_yhteensä'
            'age_0-6':                  '06vuotiaat'
            'age_7-12':                 '712vuotiaat'
            'age_13-15':                '1315vuotiaat'
            'age_16-29':                '1629vuotiaat'
            'age_30-64':                '3064vuotiaat'
            'age_65-74':                '6574vuotiaat'
            'age_over_75':              'yli_75vuotiaat'
        STATISTICS_TYPES =
            'current':                  'asuntokunnat'
            'forecast':                 'ennuste'
        DATA_LAYERS = Object.keys HEATMAP_DATASETS
        getStrata: ->
            HEATMAP_DATASETS

        heatmapLayerPath: (id) ->
            layerFmt = 'png'
            # "http://geoserver.hel.fi/geoserver/gwc/service/tms/1.0.0/popdensity:#{id}@ETRS-TM35FIN@#{layerFmt}/{z}/{x}/{y}.#{layerFmt}"
            # "http://geoserver.hel.fi/geoserver/gwc/service/wmts/?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=popdensity:alltest&FORMAT=image%2Fpng&TILEMATRIXSET=ETRS-TM35FIN&TILEMATRIX=ETRS-TM35FIN:15&TILEROW=26700&TILECOL=14500&STYLE=popdensity:all_density_suom"
            unless HEATMAP_DATASETS[id]
                return ''
            "https://geoserver.hel.fi/geoserver/gwc/service/wmts/?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=popdensity:alltest&style=popdensity:all_density_#{HEATMAP_DATASETS[id]}&FORMAT=image%2F#{layerFmt}&TILEMATRIXSET=ETRS-TM35FIN&TILEMATRIX=ETRS-TM35FIN:{z}&TILEROW={y}&TILECOL={x}"

        getStatisticsLayer: (name) ->
            STATISTICS_DATASETS[name]

        getStatisticsType: (name) ->
            STATISTICS_TYPES[name]

        getHeatmapLayers: ->
            Object.keys HEATMAP_DATASETS

{'fraction_non_alphanumeric': 0.11578099838969404, 'fraction_numerical': 0.05249597423510467, 'mean_word_length': 1.4598019801980198, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 1, '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': '4713409', 'n_tokens_mistral': 2338, 'n_tokens_neox': 2106, 'n_words': 205}