create_merged_contour()   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
1
#!/usr/bin/env python3
2
3
import sys
4
import os
5
6
import numpy
7
8
parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
9
sys.path.append(parentdir)
10
11
import nsmaps
12
from nsmaps.logger import logger
13
14
15
DATA_DIR = './data/'
16
17
18
def create_merged_contour():
19
    min_level = 55
20
    max_level = 180
21
    n_levels = 37
22
    # n_levels = 100
23
    levels_minor = numpy.linspace(min_level, max_level, num=n_levels)
24
    config = nsmaps.contourmap.ContourPlotConfig()
25
    contourmap = nsmaps.contourmap.ContourMerged(config)
26
    contourmap.merge_grid_data(DATA_DIR)
27
    contourmap.create_geojson('combined.geojson', stroke_width=4, levels=levels_minor)
28
29
30
if __name__ == "__main__":
31
    create_merged_contour()