In [1]:
# Reload when code changed:
%load_ext autoreload
%autoreload 2
%pwd
import os 
import sys
path = "../"
sys.path.append(path)
#os.path.abspath("../")
print(os.path.abspath(path))


D:\github\ekostat_calculator

In [3]:
import core
import importlib
importlib.reload(core)
import logging
importlib.reload(core) 
try:
    logging.shutdown()
    importlib.reload(logging)
except:
    pass
import pandas as pd
import numpy as np
import json
from event_handler import EventHandler
print(core.__file__)
pd.__version__


..\core\__init__.py
Out[3]:
'0.19.2'

In [4]:
def print_workspaces():
    request = {'user_id': user_id} 
    respons = ekos.request_workspace_list(request)
    print('')
    print('='*100)
    print('Workspaces for user: {}'.format(user_id)) 
    print('')
    for item in respons['workspaces']:
        print('-'*100)
        for key in sorted(item.keys()):
            print('{}:\t{}'.format(key, item[key]))
        print('')
    print('='*100)
    
    
def print_json(data): 
    json_string = json.dumps(data, indent=2, sort_keys=True)
    print(json_string)

Load directories


In [5]:
root_directory = "../" #os.getcwd()
workspace_directory = root_directory + '/workspaces' 
resource_directory = root_directory + '/resources'
alias = 'lena'
user_id = 'test_user' #kanske ska vara off_line user?

Initiate EventHandler


In [77]:
ekos = EventHandler(root_directory)


2018-04-03 19:01:57,435	event_handler.py	64	__init__	DEBUG	Start EventHandler: event_handler
2018-04-03 19:01:57,449	event_handler.py	65	__init__	DEBUG	
2018-04-03 19:01:57,453	event_handler.py	66	__init__	INFO	TEST info logger
2018-04-03 19:01:57,455	event_handler.py	67	__init__	WARNING	TEST warning logger
2018-04-03 19:01:57,458	event_handler.py	68	__init__	ERROR	TEST error logger
2018-04-03 19:01:57,480	event_handler.py	69	__init__	DEBUG	TEST debug logger
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
dict_keys(['main_event_handler', 'subset_30062c90-2a60-4ee1-9944-f00329db1174', 'subset_default_subset', 'workspace_147f5d47-773c-43f0-b337-57208718d0cf'])
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
event_handler _ main_event_handler

In [77]:
# Remove all workspaces belonging to test user 
# ekos.remove_test_user_workspaces()

In [7]:
# remove selected workspace
workspace_uuid = ekos.get_unique_id_for_alias(user_id, 'lena_indicator')
#ekos.delete_workspace(user_id = user_id, unique_id = workspace_uuid, permanently=True)

LOAD WORKSPACE

Load default workspace


In [48]:
#default_workspace = core.WorkSpace(alias = 'default_workspace', 
#                                   unique_id = 'default_workspace', 
#                                   parent_directory=workspace_directory,
#                                   resource_directory=resource_directory, 
#                                   user_id = 'default')

In [49]:
#default_workspace.step_0.print_all_paths()

In [50]:
#default_workspace.import_default_data()

Add new workspace

Only use this if you are not working with an already created workspace


In [52]:
#ekos.copy_workspace(user_id = user_id, source_alias = 'default_workspace', target_alias = 'lena_indicator')

In [8]:
workspace_alias = 'lena_indicator'

Load existing workspace


In [78]:
ekos.load_workspace(user_id, alias = workspace_alias)
#Här får jag ibland felmeddelande core has no attribute ParameterMapping


2018-04-03 19:02:05,608	event_handler.py	1483	load_workspace	DEBUG	Trying to load workspace "147f5d47-773c-43f0-b337-57208718d0cf" with alias "lena_indicator"
====================================================================================================
Initiating WorkSpace: ..//workspaces/147f5d47-773c-43f0-b337-57208718d0cf
Parent directory is: ..//workspaces
Resource directory is: ..//resources
=== 30062c90-2a60-4ee1-9944-f00329db1174
status ['editable', 'readable', 'deleted']
!!! A
!!! 30062c90-2a60-4ee1-9944-f00329db1174
!!! ..//workspaces/147f5d47-773c-43f0-b337-57208718d0cf/subsets
----------------------------------------------------------------------------------------------------
Initiating Subset: ..//workspaces/147f5d47-773c-43f0-b337-57208718d0cf/subsets/30062c90-2a60-4ee1-9944-f00329db1174
===
..//workspaces/147f5d47-773c-43f0-b337-57208718d0cf/subsets/30062c90-2a60-4ee1-9944-f00329db1174
load_water_body_station_filter
Initiating WorkStep: ..//workspaces/147f5d47-773c-43f0-b337-57208718d0cf/subsets/30062c90-2a60-4ee1-9944-f00329db1174/step_1
load_water_body_station_filter
Initiating WorkStep: ..//workspaces/147f5d47-773c-43f0-b337-57208718d0cf/subsets/30062c90-2a60-4ee1-9944-f00329db1174/step_2
load_water_body_station_filter
Initiating WorkStep: ..//workspaces/147f5d47-773c-43f0-b337-57208718d0cf/subsets/30062c90-2a60-4ee1-9944-f00329db1174/step_3
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
dict_keys(['main_event_handler', 'subset_30062c90-2a60-4ee1-9944-f00329db1174', 'subset_default_subset', 'workspace_147f5d47-773c-43f0-b337-57208718d0cf'])
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
30062c90-2a60-4ee1-9944-f00329db1174 _ main_event_handler
30062c90-2a60-4ee1-9944-f00329db1174 _ subset_30062c90-2a60-4ee1-9944-f00329db1174
=== default_subset
!!! default_subset
!!! default_subset
!!! ..//workspaces/147f5d47-773c-43f0-b337-57208718d0cf/subsets
----------------------------------------------------------------------------------------------------
Initiating Subset: ..//workspaces/147f5d47-773c-43f0-b337-57208718d0cf/subsets/default_subset
===
..//workspaces/147f5d47-773c-43f0-b337-57208718d0cf/subsets/default_subset
load_water_body_station_filter
Initiating WorkStep: ..//workspaces/147f5d47-773c-43f0-b337-57208718d0cf/subsets/default_subset/step_1
load_water_body_station_filter
Initiating WorkStep: ..//workspaces/147f5d47-773c-43f0-b337-57208718d0cf/subsets/default_subset/step_2
load_water_body_station_filter
Initiating WorkStep: ..//workspaces/147f5d47-773c-43f0-b337-57208718d0cf/subsets/default_subset/step_3
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
dict_keys(['main_event_handler', 'subset_30062c90-2a60-4ee1-9944-f00329db1174', 'subset_default_subset', 'workspace_147f5d47-773c-43f0-b337-57208718d0cf'])
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
default_subset _ main_event_handler
default_subset _ subset_30062c90-2a60-4ee1-9944-f00329db1174
default_subset _ subset_default_subset
load_water_body_station_filter
Initiating WorkStep: ..//workspaces/147f5d47-773c-43f0-b337-57208718d0cf/step_0
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
dict_keys(['main_event_handler', 'subset_30062c90-2a60-4ee1-9944-f00329db1174', 'subset_default_subset', 'workspace_147f5d47-773c-43f0-b337-57208718d0cf'])
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
147f5d47-773c-43f0-b337-57208718d0cf _ main_event_handler
147f5d47-773c-43f0-b337-57208718d0cf _ subset_30062c90-2a60-4ee1-9944-f00329db1174
147f5d47-773c-43f0-b337-57208718d0cf _ subset_default_subset
147f5d47-773c-43f0-b337-57208718d0cf _ workspace_147f5d47-773c-43f0-b337-57208718d0cf
Out[78]:
True

In [10]:
workspace_uuid = ekos.get_unique_id_for_alias(user_id, workspace_alias)
print(workspace_uuid)


147f5d47-773c-43f0-b337-57208718d0cf

Copy files from default workspace to make a clone


In [15]:
#ekos.import_default_data(user_id, workspace_alias = workspace_alias)


2018-03-26 15:07:46,967	event_handler.py	938	import_default_data	DEBUG	Trying to load default data in workspace "147f5d47-773c-43f0-b337-57208718d0cf" with alias "lena_indicator"
2018-03-26 15:07:48,013	workspaces.py	972	import_default_data	DEBUG	Default data has been copied to workspace raw data folder.

Load all data in workspace


In [79]:
ekos.load_data(user_id = user_id, unique_id = workspace_uuid)
w = ekos.get_workspace(user_id, unique_id = workspace_uuid, alias = workspace_alias)
len(w.data_handler.get_all_column_data_df())


2018-04-03 19:02:14,237	workspaces.py	1395	load_all_data	DEBUG	data has been loaded from existing all_data.txt file.
2018-04-03 19:02:14,237	event_handler.py	919	get_workspace	DEBUG	Getting workspace "147f5d47-773c-43f0-b337-57208718d0cf" with alias "lena_indicator"
Out[79]:
101465

Step 0

Set first data filter


In [80]:
f0 = w.get_data_filter_object(step=0) 
f0.include_list_filter

#include_WB = ['Norrbottens skärgårds kustvatten']#,
                #'N S M Bottenhavets kustvatten'] 
include_stations = [] 
#exclude_WB = ['Norrbottens skärgårds kustvatten'] 
include_years = [] 

#w.set_data_filter(step=0, filter_type='include_list', filter_name='WATERBODY_NAME', data=include_WB)
w.set_data_filter(step=0, filter_type='include_list', filter_name='STATN', data=include_stations) 
#w.set_data_filter(step=0, filter_type='exclude_list', filter_name='WATERBODY_NAME', data=exclude_WB) 
w.set_data_filter(step=0, filter_type='include_list', filter_name='MYEAR', data=include_years)
f0.include_list_filter


Out[80]:
{'MYEAR': [], 'STATN': []}

Apply first data filter


In [81]:
w.apply_data_filter(step = 0) # This sets the first level of data filter in the IndexHandler


add filter for step: step_0, type area: None, indicator: None, level: None

Extract filtered data


In [82]:
data_after_first_filter = w.get_filtered_data(step=0) # level=0 means first filter 
print('{} rows matching the filter criteria'.format(len(data_after_first_filter)))


2018-04-03 19:02:21,963	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_0
101465 rows matching the filter criteria

Step 1 load subset data


In [53]:
#ekos.copy_subset(user_id, 
#                 workspace_alias=workspace_alias, 
#                 workspace_uuid=None, 
#                 subset_source_alias='default_subset', 
#                 subset_source_uuid='default_subset', 
#                 subset_target_alias='A')

Step 1 Set subset filter


In [83]:
subset_uuid = ekos.get_unique_id_for_alias(user_id, workspace_alias = workspace_alias, subset_alias = 'A')
print(w.get_subset_list())

f1 = w.get_data_filter_object(subset = subset_uuid, step=1) 
print(f1.include_list_filter)

w.apply_data_filter(subset = subset_uuid, step = 1)

df_step1 = w.get_filtered_data(step = 1, subset = subset_uuid)
print(df_step1.columns)


2018-04-03 19:02:25,776	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_1
['30062c90-2a60-4ee1-9944-f00329db1174', 'default_subset']
{'MYEAR': ['2013', '2014', '2015', '2016', '2017', '2018', '2019'], 'STATN': [], 'WATER_BODY': []}
add filter for step: step_1, type area: None, indicator: None, level: None
Index(['Unnamed: 0', 'AMON', 'BIOV_CONC_ALL', 'BQIm', 'CPHL_INTEG', 'DEPH',
       'DIN', 'DOXY_BTL', 'DOXY_CTD', 'LATIT_DD', 'LONGI_DD', 'MNDEP', 'MXDEP',
       'MYEAR', 'NTOT', 'NTRA', 'NTRI', 'NTRZ', 'PHOS', 'PTOT', 'Q_AMON',
       'Q_BIOV_CONC_ALL', 'Q_BQIm', 'Q_CPHL_INTEG', 'Q_DOXY_BTL', 'Q_DOXY_CTD',
       'Q_NTOT', 'Q_NTRA', 'Q_NTRI', 'Q_NTRZ', 'Q_PHOS', 'Q_PTOT',
       'Q_SALT_BTL', 'Q_SALT_CTD', 'Q_SECCHI', 'Q_TEMP_BTL', 'Q_TEMP_CTD',
       'SALT_BTL', 'SALT_CTD', 'SDATE', 'SEA_BASIN', 'SECCHI', 'SERNO',
       'SHARKID_MD5', 'SHIPC', 'STATN', 'STIME', 'TEMP_BTL', 'TEMP_CTD',
       'VISS_EU_CD', 'WATER_BODY_NAME', 'WATER_DISTRICT', 'WATER_TYPE_AREA',
       'WLTYP', 'MONTH'],
      dtype='object')

Step 2


In [84]:
w.get_step_object(step = 2, subset = subset_uuid).load_indicator_settings_filters()

w.get_step_object(step = 2, subset = subset_uuid).indicator_data_filter_settings


Out[84]:
{'BQI': <core.filters.SettingsDataFilter at 0xb785080>,
 'din_winter': <core.filters.SettingsDataFilter at 0xb785828>,
 'dip_winter': <core.filters.SettingsDataFilter at 0xb785518>,
 'ntot_summer': <core.filters.SettingsDataFilter at 0xb785da0>,
 'ntot_winter': <core.filters.SettingsDataFilter at 0xb785668>,
 'ptot_summer': <core.filters.SettingsDataFilter at 0x14357358>,
 'ptot_winter': <core.filters.SettingsDataFilter at 0x991ad68>}

In [53]:
#ref_set = w.get_step_object(step = 2, subset = subset_uuid).indicator_ref_settings['din_winter']
#ref_set.settings.ref_columns
#ref_set.settings.df[ref_set.settings.ref_columns]

In [85]:
dinw_filter_set = w.get_step_object(step = 2, subset = subset_uuid).get_indicator_data_filter_settings('din_winter')
dinw_filter_set.settings.df


Out[85]:
TYPE_AREA_NUMBER TYPE_AREA_SUFFIX DEPH_INTERVAL MIN_NR_YEARS MIN_NR_VALUES TIME_DELTA_TOLERANCE POS_RADIUS_TOLERANCE DEPH_TOLERANCE MONTH_LIST REF_VALUE_LIMIT HG_VALUE_LIMIT GM_VALUE_LIMIT MP_VALUE_LIMIT PB_VALUE_LIMIT HG_EQR_LIMIT GM_EQR_LIMIT MP_EQR_LIMIT PB_EQR_LIMIT SALINITY MAX
0 1 n 0-10 3 3 3 0.1 5 12;1;2;3 -0.51852*s+20 -0.64815*s+25 -0.77778*s+30 -1.1667*s+45 -1.8148*s+70 0.8 0.66 0.44 0.28 27
1 1 s 0-10 3 3 3 0.1 5 12;1;2;3 -0.525*s+15 -0.656*s+18.75 -0.7875*s+22.5 -1.1813*s+33.75 -1.838*s+52.5 0.8 0.67 0.44 0.29 20
2 2 0-10 3 3 3 0.1 5 12;1;2;3 -0.51852*s+20 -0.64815*s+25 -0.77778*s+30 -1.1667*s+45 -1.8148*s+70 0.8 0.66 0.44 0.28 27
3 3 0-10 3 3 3 0.1 5 12;1;2;3 -0.51852*s+20 -0.64815*s+25 -0.77778*s+30 -1.1667*s+45 -1.8148*s+70 0.8 0.66 0.44 0.28 27
4 4 0-10 3 3 3 0.1 5 12;1;2;3 -0.525*s+15 -0.656*s+18.75 -0.7875*s+22.5 -1.1813*s+33.75 -1.838*s+52.5 0.8 0.67 0.44 0.29 20
5 5 0-10 3 3 3 0.1 5 12;1;2;3 0.125*s+1.5 0.1563*s+1.88 0.1875*s+2.25 0.2813*s+3.375 0.4375*s+5.25 0.8 0.67 0.44 0.29 20
6 6 0-10 3 3 3 0.1 5 12;1;2;3 0.125*s+1.5 0.1563*s+1.88 0.1875*s+2.25 0.2813*s+3.375 0.4375*s+5.25 0.8 0.67 0.44 0.29 20
7 7 0-10 3 3 3 0.1 5 12;1;2 -4.928*s+37 -6.1618*s+46.2 -7.3929*s+55.5 -11.089*s+83.25 -17.25*s+130 0.8 0.67 0.45 0.29 7
8 8 0-10 3 3 3 0.1 5 12;1;2 -4.928*s+37 -6.1618*s+46.2 -7.3929*s+55.5 -11.089*s+83.25 -17.25*s+130 0.8 0.67 0.45 0.29 7
9 9 0-10 3 3 3 0.1 5 12;1;2 -4.928*s+37 -6.1618*s+46.2 -7.3929*s+55.5 -11.089*s+83.25 -17.25*s+130 0.8 0.67 0.45 0.29 7
10 10 0-10 3 3 3 0.1 5 12;1;2 0*s+2.5 0*s+3.125 0*s+3.75 0*s+5.625 0*s+8.75 0.81 0.66 0.45 0.28 7
11 11 0-10 3 3 3 0.1 5 12;1;2 0*s+2.5 0*s+3.125 0*s+3.75 0*s+5.625 0*s+8.75 0.81 0.66 0.45 0.28 7
12 12 s 0-10 3 3 3 0.1 5 12;1;2 -1.0833*s+9 -1.354*s+11.25 -1.625*s+13.5 -2.4375*s+20.25 -3.792*s+31.5 0.8 0.66 0.44 0.29 6
13 12 n 0-10 3 3 3 0.1 5 12;1;2 -0.75*s+7 -0.9375*s+8.75 -1.125*s+10.5 -1.6875*s+15.75 -2.625*s+24.5 0.8 0.67 0.44 0.29 6
14 13 0-10 3 3 3 0.1 5 12;1;2 -1.0833*s+9 -1.354*s+11.25 -1.625*s+13.5 -2.4375*s+20.25 -3.792*s+31.5 0.8 0.66 0.44 0.29 6
15 14 0-10 3 3 3 0.1 5 12;1;2 -1.0833*s+9 -1.354*s+11.25 -1.625*s+13.5 -2.4375*s+20.25 -3.792*s+31.5 0.8 0.66 0.44 0.29 6
16 15 0-10 3 3 3 0.1 5 12;1;2 -0.75*s+7 -0.9375*s+8.75 -1.125*s+10.5 -1.6875*s+15.75 -2.625*s+24.5 0.8 0.67 0.44 0.29 6
17 16 0-10 3 3 3 0.1 5 11;12;1;2 -0.4*s+5 -0.5*s+6.25 -0.6*s+7.5 -0.9*s+11.25 -1.4*s+17.5 0.8 0.67 0.44 0.29 5
18 17 0-10 3 3 3 0.1 5 11;12;1;2 -0.4*s+5 -0.5*s+6.25 -0.6*s+7.5 -0.9*s+11.25 -1.4*s+17.5 0.8 0.67 0.44 0.29 5
19 18 0-10 3 3 3 0.1 5 11;12;1;2 -0.2*s+5 -0.25*s+6.25 -0.3*s+7.5 -0.45*s+11.25 -0.7*s+17.5 0.8 0.66 0.44 0.28 5
20 19 0-10 3 3 3 0.1 5 11;12;1;2 -0.2*s+5 -0.25*s+6.25 -0.3*s+7.5 -0.45*s+11.25 -0.7*s+17.5 0.8 0.66 0.44 0.28 5
21 20 0-10 3 3 3 0.1 5 11;12;1;2 -0.76*s+8 -0.95*s+10 -1.14*s+12 -1.71*s+18 -2.66*s+28 0.8 0.67 0.44 0.29 5
22 21 0-10 3 3 3 0.1 5 11;12;1;2 -0.76*s+8 -0.95*s+10 -1.14*s+12 -1.71*s+18 -2.66*s+28 0.8 0.67 0.44 0.29 5
23 22 0-10 3 3 3 0.1 5 11;12;1;2 -1.333*s+9 -1.667*s+11.25 -2*s+13.5 -3*s+20.25 -4.667*s+31.5 0.8 0.67 0.44 0.29 3
24 23 0-10 3 3 3 0.1 5 11;12;1;2 -1.333*s+9 -1.667*s+11.25 -2*s+13.5 -3*s+20.25 -4.667*s+31.5 0.8 0.67 0.44 0.29 3
25 24 0-10 3 3 3 0.1 5 12;1;2 -0.75*s+7 -0.9375*s+8.75 -1.125*s+10.5 -1.6875*s+15.75 -2.625*s+24.5 0.8 0.67 0.44 0.29 6
26 25 0-10 3 3 3 0.1 5 12;1;2;3 -0.525*s+15 -0.656*s+18.75 -0.7875*s+22.5 -1.1813*s+33.75 -1.838*s+52.5 0.8 0.67 0.44 0.29 20

In [96]:
dinw_filter_set = w.get_step_object(step = 2, subset = subset_uuid).get_indicator_ref_settings('din_winter')
dinw_filter_set.allowed_variables


Out[96]:
TYPE_AREA_NUMBER TYPE_AREA_SUFFIX DEPH_INTERVAL MIN_NR_YEARS MIN_NR_VALUES TIME_DELTA_TOLERANCE POS_RADIUS_TOLERANCE DEPH_TOLERANCE MONTH_LIST REF_VALUE_LIMIT HG_VALUE_LIMIT GM_VALUE_LIMIT MP_VALUE_LIMIT PB_VALUE_LIMIT HG_EQR_LIMIT GM_EQR_LIMIT MP_EQR_LIMIT PB_EQR_LIMIT SALINITY MAX
0 1 n 0-10 3 3 3 0.1 5 12;1;2;3 -0.51852*s+20 -0.64815*s+25 -0.77778*s+30 -1.1667*s+45 -1.8148*s+70 0.8 0.66 0.44 0.28 27
1 1 s 0-10 3 3 3 0.1 5 12;1;2;3 -0.525*s+15 -0.656*s+18.75 -0.7875*s+22.5 -1.1813*s+33.75 -1.838*s+52.5 0.8 0.67 0.44 0.29 20
2 2 0-10 3 3 3 0.1 5 12;1;2;3 -0.51852*s+20 -0.64815*s+25 -0.77778*s+30 -1.1667*s+45 -1.8148*s+70 0.8 0.66 0.44 0.28 27
3 3 0-10 3 3 3 0.1 5 12;1;2;3 -0.51852*s+20 -0.64815*s+25 -0.77778*s+30 -1.1667*s+45 -1.8148*s+70 0.8 0.66 0.44 0.28 27
4 4 0-10 3 3 3 0.1 5 12;1;2;3 -0.525*s+15 -0.656*s+18.75 -0.7875*s+22.5 -1.1813*s+33.75 -1.838*s+52.5 0.8 0.67 0.44 0.29 20
5 5 0-10 3 3 3 0.1 5 12;1;2;3 0.125*s+1.5 0.1563*s+1.88 0.1875*s+2.25 0.2813*s+3.375 0.4375*s+5.25 0.8 0.67 0.44 0.29 20
6 6 0-10 3 3 3 0.1 5 12;1;2;3 0.125*s+1.5 0.1563*s+1.88 0.1875*s+2.25 0.2813*s+3.375 0.4375*s+5.25 0.8 0.67 0.44 0.29 20
7 7 0-10 3 3 3 0.1 5 12;1;2 -4.928*s+37 -6.1618*s+46.2 -7.3929*s+55.5 -11.089*s+83.25 -17.25*s+130 0.8 0.67 0.45 0.29 7
8 8 0-10 3 3 3 0.1 5 12;1;2 -4.928*s+37 -6.1618*s+46.2 -7.3929*s+55.5 -11.089*s+83.25 -17.25*s+130 0.8 0.67 0.45 0.29 7
9 9 0-10 3 3 3 0.1 5 12;1;2 -4.928*s+37 -6.1618*s+46.2 -7.3929*s+55.5 -11.089*s+83.25 -17.25*s+130 0.8 0.67 0.45 0.29 7
10 10 0-10 3 3 3 0.1 5 12;1;2 0*s+2.5 0*s+3.125 0*s+3.75 0*s+5.625 0*s+8.75 0.81 0.66 0.45 0.28 7
11 11 0-10 3 3 3 0.1 5 12;1;2 0*s+2.5 0*s+3.125 0*s+3.75 0*s+5.625 0*s+8.75 0.81 0.66 0.45 0.28 7
12 12 s 0-10 3 3 3 0.1 5 12;1;2 -1.0833*s+9 -1.354*s+11.25 -1.625*s+13.5 -2.4375*s+20.25 -3.792*s+31.5 0.8 0.66 0.44 0.29 6
13 12 n 0-10 3 3 3 0.1 5 12;1;2 -0.75*s+7 -0.9375*s+8.75 -1.125*s+10.5 -1.6875*s+15.75 -2.625*s+24.5 0.8 0.67 0.44 0.29 6
14 13 0-10 3 3 3 0.1 5 12;1;2 -1.0833*s+9 -1.354*s+11.25 -1.625*s+13.5 -2.4375*s+20.25 -3.792*s+31.5 0.8 0.66 0.44 0.29 6
15 14 0-10 3 3 3 0.1 5 12;1;2 -1.0833*s+9 -1.354*s+11.25 -1.625*s+13.5 -2.4375*s+20.25 -3.792*s+31.5 0.8 0.66 0.44 0.29 6
16 15 0-10 3 3 3 0.1 5 12;1;2 -0.75*s+7 -0.9375*s+8.75 -1.125*s+10.5 -1.6875*s+15.75 -2.625*s+24.5 0.8 0.67 0.44 0.29 6
17 16 0-10 3 3 3 0.1 5 11;12;1;2 -0.4*s+5 -0.5*s+6.25 -0.6*s+7.5 -0.9*s+11.25 -1.4*s+17.5 0.8 0.67 0.44 0.29 5
18 17 0-10 3 3 3 0.1 5 11;12;1;2 -0.4*s+5 -0.5*s+6.25 -0.6*s+7.5 -0.9*s+11.25 -1.4*s+17.5 0.8 0.67 0.44 0.29 5
19 18 0-10 3 3 3 0.1 5 11;12;1;2 -0.2*s+5 -0.25*s+6.25 -0.3*s+7.5 -0.45*s+11.25 -0.7*s+17.5 0.8 0.66 0.44 0.28 5
20 19 0-10 3 3 3 0.1 5 11;12;1;2 -0.2*s+5 -0.25*s+6.25 -0.3*s+7.5 -0.45*s+11.25 -0.7*s+17.5 0.8 0.66 0.44 0.28 5
21 20 0-10 3 3 3 0.1 5 11;12;1;2 -0.76*s+8 -0.95*s+10 -1.14*s+12 -1.71*s+18 -2.66*s+28 0.8 0.67 0.44 0.29 5
22 21 0-10 3 3 3 0.1 5 11;12;1;2 -0.76*s+8 -0.95*s+10 -1.14*s+12 -1.71*s+18 -2.66*s+28 0.8 0.67 0.44 0.29 5
23 22 0-10 3 3 3 0.1 5 11;12;1;2 -1.333*s+9 -1.667*s+11.25 -2*s+13.5 -3*s+20.25 -4.667*s+31.5 0.8 0.67 0.44 0.29 3
24 23 0-10 3 3 3 0.1 5 11;12;1;2 -1.333*s+9 -1.667*s+11.25 -2*s+13.5 -3*s+20.25 -4.667*s+31.5 0.8 0.67 0.44 0.29 3
25 24 0-10 3 3 3 0.1 5 12;1;2 -0.75*s+7 -0.9375*s+8.75 -1.125*s+10.5 -1.6875*s+15.75 -2.625*s+24.5 0.8 0.67 0.44 0.29 6
26 25 0-10 3 3 3 0.1 5 12;1;2;3 -0.525*s+15 -0.656*s+18.75 -0.7875*s+22.5 -1.1813*s+33.75 -1.838*s+52.5 0.8 0.67 0.44 0.29 20

In [86]:
wb_list = df_step1.VISS_EU_CD.unique()
print('number of waterbodies in step 1: {}'.format(len(wb_list)))
typeA_list = [row.split('-')[0].strip().lstrip('0') for row in df_step1.WATER_TYPE_AREA.unique()]
print('number of type areas in step 1: {}'.format(len(typeA_list)))

#list(zip(typeA_list, df_step1.WATER_TYPE_AREA.unique()))


number of waterbodies in step 1: 310
number of type areas in step 1: 27

Apply indicator filter


In [87]:
for type_area in typeA_list:
    w.apply_indicator_data_filter(step = 2, 
                              subset = subset_uuid, 
                              indicator = 'din_winter',
                              type_area = type_area)


add filter for step: step_2, type area: 14, indicator: din_winter, level: None
Water body None
14
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 14
RESULT [[0, 10]]
14
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 14
add filter for step: step_2, type area: 2, indicator: din_winter, level: None
Water body None
2
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 2
RESULT [[0, 10]]
2
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 2
add filter for step: step_2, type area: 9, indicator: din_winter, level: None
Water body None
9
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 9
RESULT [[0, 10]]
9
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 9
add filter for step: step_2, type area: 22, indicator: din_winter, level: None
Water body None
22
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 22
RESULT [[0, 10]]
22
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 22
add filter for step: step_2, type area: 20, indicator: din_winter, level: None
Water body None
20
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 20
RESULT [[0, 10]]
20
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 20
add filter for step: step_2, type area: 18, indicator: din_winter, level: None
Water body None
18
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 18
RESULT [[0, 10]]
18
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 18
add filter for step: step_2, type area: 12n, indicator: din_winter, level: None
Water body None
12n
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 12n
RESULT [[0, 10]]
12n
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 12n
add filter for step: step_2, type area: 13, indicator: din_winter, level: None
Water body None
13
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 13
RESULT [[0, 10]]
13
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 13
add filter for step: step_2, type area: 12s, indicator: din_winter, level: None
Water body None
12s
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 12s
RESULT [[0, 10]]
12s
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 12s
add filter for step: step_2, type area: 1n, indicator: din_winter, level: None
Water body None
1n
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 1n
RESULT [[0, 10]]
1n
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 1n
add filter for step: step_2, type area: 25, indicator: din_winter, level: None
Water body None
25
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 25
RESULT [[0, 10]]
25
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 25
add filter for step: step_2, type area: 21, indicator: din_winter, level: None
Water body None
21
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 21
RESULT [[0, 10]]
21
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 21
add filter for step: step_2, type area: 7, indicator: din_winter, level: None
Water body None
7
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 7
RESULT [[0, 10]]
7
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 7
add filter for step: step_2, type area: 5, indicator: din_winter, level: None
Water body None
5
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 5
RESULT [[0, 10]]
5
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 5
add filter for step: step_2, type area: 16, indicator: din_winter, level: None
Water body None
16
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 16
RESULT [[0, 10]]
16
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 16
add filter for step: step_2, type area: 23, indicator: din_winter, level: None
Water body None
23
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 23
RESULT [[0, 10]]
23
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 23
add filter for step: step_2, type area: 3, indicator: din_winter, level: None
Water body None
3
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 3
RESULT [[0, 10]]
3
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 3
add filter for step: step_2, type area: 1s, indicator: din_winter, level: None
Water body None
1s
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 1s
RESULT [[0, 10]]
1s
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 1s
add filter for step: step_2, type area: 4, indicator: din_winter, level: None
Water body None
4
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 4
RESULT [[0, 10]]
4
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 4
add filter for step: step_2, type area: 6, indicator: din_winter, level: None
Water body None
6
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 6
RESULT [[0, 10]]
6
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 6
add filter for step: step_2, type area: 8, indicator: din_winter, level: None
Water body None
8
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 8
RESULT [[0, 10]]
8
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 8
add filter for step: step_2, type area: 10, indicator: din_winter, level: None
Water body None
10
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 10
RESULT [[0, 10]]
10
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 10
add filter for step: step_2, type area: 24, indicator: din_winter, level: None
Water body None
24
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 24
RESULT [[0, 10]]
24
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 24
add filter for step: step_2, type area: 17, indicator: din_winter, level: None
Water body None
17
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 17
RESULT [[0, 10]]
17
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 17
add filter for step: step_2, type area: 15, indicator: din_winter, level: None
Water body None
15
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 15
RESULT [[0, 10]]
15
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 15
add filter for step: step_2, type area: 19, indicator: din_winter, level: None
Water body None
19
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 19
RESULT [[0, 10]]
19
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 19
add filter for step: step_2, type area: 11, indicator: din_winter, level: None
Water body None
11
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 11
RESULT [[0, 10]]
11
Index(['TYPE_AREA_NUMBER', 'TYPE_AREA_SUFFIX', 'DEPH_INTERVAL', 'MIN_NR_YEARS',
       'MIN_NR_VALUES', 'TIME_DELTA_TOLERANCE', 'POS_RADIUS_TOLERANCE',
       'DEPH_TOLERANCE', 'MONTH_LIST', 'REF_VALUE_LIMIT', 'HG_VALUE_LIMIT',
       'GM_VALUE_LIMIT', 'MP_VALUE_LIMIT', 'PB_VALUE_LIMIT', 'HG_EQR_LIMIT',
       'GM_EQR_LIMIT', 'MP_EQR_LIMIT', 'PB_EQR_LIMIT', 'SALINITY MAX'],
      dtype='object')
type_area_type_area 11

In [83]:
#print(len(w.index_handler.booleans['step_0'][subset_uuid]['step_1']['step_2'].keys()))
#w.index_handler.booleans['step_0'][subset_uuid]['step_1']['step_2'].keys()

In [88]:
wb =  'SE654470-222700'
type_area = '2'#'01s - Västkustens inre kustvatten'
#w.index_handler.booleans['step_0'][subset_uuid]['step_1']['step_2'][type_area]['din_winter']['boolean']

In [89]:
#temp_df = w.get_filtered_data(step = 2, subset = subset_uuid, indicator = 'din_winter', water_body = 'SE654470-222700')
#temp_df.loc[(temp_df['MONTH'].isin([11, 12, 1, 2])) & (temp_df['VISS_EU_CD'].isin(['SE654470-222700']))][['MONTH', 'WATER_BODY_NAME', 'VISS_EU_CD', 'WATER_TYPE_AREA']]

print(w.get_filtered_data(step = 2, subset = subset_uuid, type_area = type_area, indicator = 'din_winter').MONTH.unique())
#[['MONTH', 'WATER_BODY_NAME', 'VISS_EU_CD']]

print(w.get_filtered_data(step = 2, subset = subset_uuid, type_area = type_area, indicator = 'din_winter').DEPH.min(),
w.get_filtered_data(step = 2, subset = subset_uuid, type_area = type_area, indicator = 'din_winter').DEPH.max())

w.get_filtered_data(step = 2, subset = subset_uuid, type_area = type_area).WATER_TYPE_AREA.unique()


2018-04-03 19:02:43,614	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
2018-04-03 19:02:43,629	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
2018-04-03 19:02:43,630	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
2018-04-03 19:02:43,630	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
[12  3  2  1]
0.0 10.0
Out[89]:
array(['14 - Östergötlands yttre kustvatten', '02 - Västkustens fjordar',
       '09 - Blekinge skärgård och Kalmarsund. Yttre kustvatten',
       '22 - Norra Bottenviken. Inre kustvatten',
       '20 - Norra Kvarkens inre kustvatten',
       '18 - Norra Bottenhavet. Höga kusten. Inre kustvatten',
       '12n - Östergötlands och Stockholms skärgård. Mellankustvatten',
       '13 - Östergötlands inre kustvatten',
       '12s - Östergötlands och Stockholms skärgård. Mellankustvatten',
       '01n - Västkustens inre kustvatten',
       '25 - Göta älvs- och Nordre älvs estuarie',
       '21 - Norra Kvarkens yttre kustvatten', '07 - Skånes kustvatten',
       '05 - Södra Hallands och norra Öresunds kustvatten',
       '16 - Södra Bottenhavet. Inre kustvatten',
       '23 - Norra Bottenviken. Yttre kustvatten',
       '03 - Västkustens yttre kustvatten. Skagerrak',
       '01s - Västkustens inre kustvatten',
       '04 - Västkustens yttre kustvatten. Kattegatt',
       '06 - Öresunds kustvatten',
       '08 - Blekinge skärgård och Kalmarsund. Inre kustvatten',
       '10 - Ölands och Gotlands kustvatten',
       '24 - Stockholms inre skärgård och Hallsfjärden',
       '17 - Södra Bottenhavet. Yttre kustvatten',
       '15 - Stockholms skärgård. Yttre kustvatten',
       '19 - Norra Bottenhavet. Höga kusten. Yttre kustvatten',
       '11 - Gotlands nordvästra kustvatten'], dtype=object)

In [ ]:


In [90]:
water_body = wb
temp_df = w.get_filtered_data(step = 2, subset = subset_uuid, indicator = 'din_winter', type_area = type_area)[['SDATE','MONTH', 'WATER_BODY_NAME', 'VISS_EU_CD', 'WATER_TYPE_AREA', 'DIN','SALT_CTD', 'SALT_BTL']].dropna(thresh=7)
print('Waterbodys left: {}'.format(temp_df['WATER_BODY_NAME'].unique()))
temp_df.loc[temp_df['WATER_BODY_NAME'].isin(['Gullmarn centralbassäng'])]


2018-04-03 19:02:46,960	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
Waterbodys left: ['Kungshamn s skärgård' 'Rivö fjord' 'Yttre Brofjorden'
 'Gullmarn centralbassäng' 'Byfjorden' 'Halsefjorden' 'Havstensfjorden'
 'Älgöfjorden' 'Koljö fjord' 'Dana fjord' 'S Kosterfjorden'
 'Onsala kustvatten' 'Marstrandsfjorden' 'S Kalmarsunds utsjövatten'
 'N m Öresunds kustvatten' 'Askims fjord' 'Stridsfjorden'
 'Råssö-Resöfjorden sek namn' 'Färlevfjorden' 'Sannäsfjorden sek namn'
 'Tanumskilen' 'Dynekilen' 'Strömstadsfjorden' 'Inre Tjärnöarkipelagen'
 'Kalvöfjorden' 'Stigfjorden' 'Askeröfjorden' 'Ellösefjorden'
 'Snäckedjupet' 'Brofjorden' 'Fjällbacka inre skärgård'
 'Hunnebostrand skärgård' 'Bottnefjorden' 'Grebbestad inre skärgård'
 'Trälebergskile' 'Åbyfjorden' 'N m Hallands kustvatten' 'Skälderviken'
 'Sotefjorden' 'Lommabukten' 'S m Öresunds kustvatten' 'Inre Gamlebyviken'
 'Vivassen' 'Västrumsfjärden' 'M n Kalmarsunds utsjövatten'
 'Mönsteråsområdet sek namn' 'Lövöområdet sek namn'
 'Ödänglaområdet sek namn' 'Emområdet sek namn' 'Gåsfjärden' 'Västra sjön'
 'S n Kalmarsund' 'Edsviken' 'Krabbfjärden' 'Fågelöfjärden'
 'Inre Oskarshamnsområdet' 'Simpevarpsområdet' 'Pampusfjärden'
 'Yttre Bråviken' 'Inre Bråviken' 'Arkösund' 'Ronnebyfjärden'
 'Torhamnsfjärden' 'Östra fjärden' 'Yttre redden' 'Hallarumsviken'
 'Västra fjärden' 'Gussöfjärden' 'S v s Kalmarsunds kustvatten'
 'Inre Slätbaken' 'Trännöfjärden' 'Kärrfjärden' 'Orren'
 'Inre Pukaviksbukten' 'Tjäröfjärden'
 'Västra Blekinge skärgårds kustvatten' 'Karlshamnsfjärden'
 'Sölvesborgsviken' 'Inre Valdemarsviken' 'Yttre Valdemarsviken'
 'Halsöfjärden' 'Kaggebofjärden' 'V Hanöbuktens kustvatten' 'Gaviksfjärden'
 'Örefjärden' 'Rånefjärden' 'Norafjärden' 'Sörleviken' 'Bäckfjärden'
 'Idbyfjärden' 'Lilla Värtan' 'Skäldervikens kustvatten'
 'N Öresunds kustvatten' 'Lundåkrabukten' 'S Öresunds kustvatten'
 'Björnöfjärden' 'Nämdöfjärden' 'Älgöfjärden' 'Sollenkrokafjärden'
 'Laholmsbukten' 'Inre Kungsbackafjorden' 'Yttre Kungsbackafjorden'
 'Repskärsfjärden' 'Bollstafjärden' 'Storfjärden' 'Ramöfjärden sek namn'
 'Norra sundet' 'Södra Sundet' 'Kramforsfjärden sek namn'
 'Yttre Österfjärden' 'Holmsund' 'S n Kvarkens kustvatten'
 'Fjärdgrundsområdet sek namn' 'Mjältöfjärden sek namn' 'Sörbrändöfjärden'
 'Sandöfjärden' 'Yttre Lulefjärden' 'Inrefjärden' 'Vargödraget'
 'Yttrefjärden' 'Ö sydkustens kustvatten' 'Gårdsfjärden'
 'Agöfjärden sek namn' 'S Höga kustens kustvatten' 'Alnösundet'
 'Sundsvallsfjärden' 'Klingerfjärden' 'Draget' 'Svartviksfjärden'
 'Hudiksvallsfjärden' 'Njutångersfjärden' 'Siviksfjärden' 'Enångersfjärden'
 'Stora Värtan' 'Kapellskärs hamnområde' 'Norrtäljeviken' 'Björköfjärden'
 'Ortalaviken' 'Galtfjärden' 'Bergshamraviken'
 'Norrbottens skärgårds kustvatten' 'Lillfjärden' 'Baggholmsdraget'
 'Göteborgs s skärgårds kustvatten' 'Möröfjärden' 'Ostnäsfjärden'
 'Svensbyfjärden' 'Ersnäsfjärden' 'Granöfjärden' 'Mulöviken'
 'Måttsundsfjärden' 'Boviksfjärden' 'Burefjärden' 'Inre Lövselefjärden'
 'Kågefjärden' 'Hemsösundet sek namn' 'Älandsfjärden' 'Österlångslädan'
 'Västerfjärden' 'Megrundsområdet' 'N n Kalmarsunds utsjövatten'
 'Nordmalingsfjärden' 'Raggavaviken' 'Tavlefjärden'
 'Laholmsbuktens kustvatten']
Out[90]:
SDATE MONTH WATER_BODY_NAME VISS_EU_CD WATER_TYPE_AREA DIN SALT_CTD SALT_BTL
5220 2017-12-05 12 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 15.76 18.350 NaN
5221 2017-12-05 12 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 8.59 24.190 NaN
5222 2017-12-05 12 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 6.4 25.220 NaN
5223 2017-12-05 12 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 6.46 27.980 NaN
6451 2017-03-12 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 0.37 24.320 NaN
6452 2017-03-12 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 0.4 24.840 NaN
6453 2017-03-12 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 1.36 26.000 NaN
6474 2017-03-07 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 10.88 30.820 29.640
6475 2017-03-07 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 8.63 31.810 31.470
6476 2017-03-07 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 6.45 33.000 33.040
6477 2017-03-07 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 6.22 33.220 33.210
6565 2017-02-13 2 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 4.06 20.830 NaN
6566 2017-02-13 2 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 4.24 20.890 NaN
6567 2017-02-13 2 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 5.13 22.050 NaN
6612 2017-02-06 2 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 7.47 25.170 24.860
6613 2017-02-06 2 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 7.37 25.170 24.910
6614 2017-02-06 2 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 6.78 25.190 25.240
6615 2017-02-06 2 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 7.25 26.260 26.800
6783 2017-01-12 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 4.65 30.770 NaN
6784 2017-01-12 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 4.66 30.770 NaN
6785 2017-01-12 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 4.71 30.830 NaN
6872 2017-01-09 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 5.87 31.140 NaN
6873 2017-01-09 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 5.57 31.150 NaN
6874 2017-01-09 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 5.44 31.320 NaN
6875 2017-01-09 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 5.35 31.320 NaN
7002 2016-12-11 12 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 4.97 31.310 NaN
7003 2016-12-11 12 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 4.4 32.390 NaN
7117 2016-12-06 12 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 5.46 30.500 30.475
7118 2016-12-06 12 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 6.04 32.340 32.306
7119 2016-12-06 12 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 4.01 33.350 33.400
... ... ... ... ... ... ... ... ...
27062 2013-12-03 12 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 6.32 29.480 NaN
27063 2013-12-03 12 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 6.29 29.480 NaN
27064 2013-12-03 12 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 6.1 29.770 NaN
27065 2013-12-03 12 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 5.95 30.000 NaN
32869 2013-03-25 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 0.3 23.255 NaN
32870 2013-03-25 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 0.3 23.536 23.275
32871 2013-03-25 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 0.39 23.728 25.430
33223 2013-03-06 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 8.83 19.210 NaN
33224 2013-03-06 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 7.09 21.120 NaN
33225 2013-03-06 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 6.89 21.980 NaN
33226 2013-03-06 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 8.09 26.450 NaN
33234 2013-03-06 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 6.18 23.670 NaN
33235 2013-03-06 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 5.88 23.900 NaN
33236 2013-03-06 3 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 6.31 24.260 NaN
33571 2013-02-26 2 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 6.28 21.250 21.992
33572 2013-02-26 2 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 6.7 21.366 22.908
33573 2013-02-26 2 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 7.1 24.407 25.012
34007 2013-02-07 2 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 8.88 24.020 NaN
34008 2013-02-07 2 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 7.99 32.380 NaN
34009 2013-02-07 2 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 8.12 33.360 NaN
34117 2013-01-28 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 6.05 21.651 21.755
34118 2013-01-28 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 5.7 21.644 21.869
34119 2013-01-28 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 5.78 21.706 21.953
34437 2013-01-08 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 11.68 6.530 NaN
34438 2013-01-08 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 7.77 20.720 NaN
34439 2013-01-08 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 7.59 23.660 NaN
34440 2013-01-08 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 7.34 25.180 NaN
34490 2013-01-08 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 9.55 24.050 24.004
34491 2013-01-08 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 9.42 24.700 24.696
34492 2013-01-08 1 Gullmarn centralbassäng SE581700-113000 02 - Västkustens fjordar 8.67 26.440 26.733

157 rows × 8 columns


In [91]:
w.get_available_indicators(subset= 'A', step=2)


2018-04-03 19:02:48,893	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
2018-04-03 19:02:48,975	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
2018-04-03 19:02:49,077	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
subset A
subset A
subset A
2018-04-03 19:02:49,184	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
subset A
2018-04-03 19:02:49,452	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
2018-04-03 19:02:49,532	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
2018-04-03 19:02:49,621	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
subset A
subset A
"['TOT_COVER_ALL' 'SALT'] not in index"
subset A
2018-04-03 19:02:49,737	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
2018-04-03 19:02:49,851	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
subset A
subset A
2018-04-03 19:02:49,956	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
2018-04-03 19:02:50,067	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
subset A
subset A
2018-04-03 19:02:50,192	workspaces.py	1271	get_filtered_data	DEBUG	STEP: step_2
subset A
Out[91]:
['biov',
 'bqi',
 'chl',
 'din_winter',
 'dip_winter',
 'ntot_summer',
 'ntot_winter',
 'o2',
 'ptot_summer',
 'ptot_winter',
 'secchi']

In [92]:
w.cfg['indicators']
[item.strip() for item in w.cfg['indicators'].loc['din_winter'][0].split(', ')]


Out[92]:
['DIN', 'SALT_CTD']

Step 3 Load Indicator objects step 3....


In [93]:
w.get_step_object(step = 3, subset = subset_uuid).calculate_indicator_status(subset_unique_id = subset_uuid, indicator_list = ['din_winter'])

In [94]:
w.get_step_object(step = 3, subset = subset_uuid).indicator_objects['din_winter'].get_water_body_indicator_df(water_body = wb)


---------------------------------------------------------------------------
UserWarning                               Traceback (most recent call last)
<ipython-input-94-d8c6914d608a> in <module>()
----> 1 w.get_step_object(step = 3, subset = subset_uuid).indicator_objects['din_winter'].get_water_body_indicator_df(water_body = wb)

D:\github\ekostat_calculator\core\indicators.py in get_water_body_indicator_df(self, water_body, level)
     91         """
     92         type_area = self.mapping_objects['water_body'].get_type_area_for_water_body(water_body, include_suffix=True)
---> 93         df = self.get_filtered_data(subset = self.subset, step = self.step, type_area = type_area, indicator = self.name)
     94         df = df[self.column_list]
     95         try:

D:\github\ekostat_calculator\core\indicators.py in get_filtered_data(self, subset, step, type_area, indicator)
     74         """
     75 
---> 76         return self.index_handler.get_filtered_data(subset, step, type_area, indicator)
     77 
     78     #==========================================================================

D:\github\ekostat_calculator\core\index_handler.py in get_filtered_data(self, subset, step, type_area, indicator)
    322         """
    323 
--> 324         step_0, step_1, step_2 = self._get_steps(step=step)
    325 
    326         boolean = self._get_boolean(step_0, subset, step_1, step_2, type_area, indicator)

D:\github\ekostat_calculator\core\index_handler.py in _get_steps(self, step)
    186             return 'step_0', 'step_1', step
    187         else:
--> 188             raise UserWarning('Step definition is incorrect. Acceptable step is step_0, step_1 or step_2')
    189 
    190 

UserWarning: Step definition is incorrect. Acceptable step is step_0, step_1 or step_2

In [95]:
w.get_step_object(step = 3, subset = subset_uuid).indicator_objects['din_winter'].get_ref_value(type_area = '1s', salinity = 25)


---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-95-2382cea2d78d> in <module>()
----> 1 w.get_step_object(step = 3, subset = subset_uuid).indicator_objects['din_winter'].get_ref_value(type_area = '1s', salinity = 25)

D:\github\ekostat_calculator\core\indicators.py in get_ref_value(self, type_area, salinity)
    138 
    139         """
--> 140         return self.ref_settings.get_ref_value(type_area, salinity)
    141 
    142     #==========================================================================

D:\github\ekostat_calculator\core\filters.py in get_ref_value(self, type_area, salinity)
    866         Updated     20180328    by Lena Viktorsson
    867         """
--> 868         ref_value = self.get_value(variable = self.refvalue_column[0], type_area = type_area)
    869 
    870         if ref_value is float:

AttributeError: 'SettingsRef' object has no attribute 'refvalue_column'

In [67]:
indicator= 'din_winter'
w.get_step_object(step = 3, subset = subset_uuid).get_indicator_data_filter_settings(indicator)


Out[67]:
False

In [242]:
s = w.get_subset_object(subset_uuid).indicator_objects['din_winter']
s.get_filtered_data(subset = subset_uuid, step = 'step_2')


Out[242]:
VISS_EU_ID SDATE DEPH SEA_AREA_NAME SALT_BTL DOXY_BTL PHOS NTRA AMON SECCHI NTOT PTOT DIN MONTH
0 SE652400-223501 1985-01-01 0.00 Norrbottens skärgårds kustvatten 3.000 8.081 0.500 3.003 0.100 6.8 18.401 0.619 3.1 1
1 SE652400-223501 1985-01-01 0.25 Norrbottens skärgårds kustvatten 3.000 8.081 0.500 3.003 0.100 6.8 18.401 0.619 3.1 1
2 SE652400-223501 1985-01-01 0.75 Norrbottens skärgårds kustvatten 3.000 8.074 0.500 3.003 0.100 6.8 18.430 0.621 3.1 1
3 SE652400-223501 1985-01-01 1.25 Norrbottens skärgårds kustvatten 3.000 8.070 0.500 3.003 0.100 6.8 18.430 0.621 3.1 1
4 SE652400-223501 1985-01-01 1.75 Norrbottens skärgårds kustvatten 3.000 8.067 0.500 3.003 0.100 6.8 18.430 0.621 3.1 1
5 SE652400-223501 1985-01-01 2.25 Norrbottens skärgårds kustvatten 3.000 8.065 0.500 3.003 0.100 6.8 18.430 0.621 3.1 1
6 SE652400-223501 1985-01-01 2.75 Norrbottens skärgårds kustvatten 3.000 8.063 0.500 3.003 0.100 6.8 18.430 0.621 3.1 1
7 SE652400-223501 1985-01-01 3.25 Norrbottens skärgårds kustvatten 3.000 8.062 0.500 3.003 0.100 6.8 18.430 0.621 3.1 1
8 SE652400-223501 1985-01-01 3.75 Norrbottens skärgårds kustvatten 3.000 8.061 0.500 3.003 0.100 6.8 18.430 0.621 3.1 1
9 SE652400-223501 1985-01-01 4.50 Norrbottens skärgårds kustvatten 3.000 8.059 0.500 3.003 0.100 6.8 18.430 0.621 3.1 1
10 SE652400-223501 1985-01-01 5.50 Norrbottens skärgårds kustvatten 3.000 8.057 0.500 3.003 0.100 6.8 18.430 0.621 3.1 1
11 SE652400-223501 1985-01-01 6.50 Norrbottens skärgårds kustvatten 3.000 8.055 0.500 3.003 0.100 6.8 18.430 0.621 3.1 1
12 SE652400-223501 1985-01-01 7.50 Norrbottens skärgårds kustvatten 3.000 8.053 0.500 3.003 0.100 6.8 18.430 0.621 3.1 1
13 SE652400-223501 1985-01-01 8.50 Norrbottens skärgårds kustvatten 3.000 8.052 0.500 3.003 0.100 6.8 18.431 0.621 3.1 1
14 SE652400-223501 1985-01-01 9.50 Norrbottens skärgårds kustvatten 3.000 8.050 0.500 3.003 0.100 6.8 18.431 0.621 3.1 1
15 SE652400-223501 1985-01-01 112.50 Norrbottens skärgårds kustvatten 3.000 7.994 0.501 3.017 0.100 6.8 18.444 0.621 3.12 1
16 SE652400-223501 1985-01-01 115.00 Norrbottens skärgårds kustvatten 3.000 7.994 0.501 3.017 0.100 6.8 18.444 0.621 3.12 1
17 SE652400-223501 1985-01-02 0.00 Norrbottens skärgårds kustvatten 3.000 8.183 0.501 3.015 0.100 6.8 18.403 0.619 3.12 1
18 SE652400-223501 1985-01-02 0.25 Norrbottens skärgårds kustvatten 3.000 8.183 0.501 3.015 0.100 6.8 18.403 0.619 3.12 1
19 SE652400-223501 1985-01-02 0.75 Norrbottens skärgårds kustvatten 3.000 8.177 0.501 3.015 0.100 6.8 18.430 0.620 3.12 1
20 SE652400-223501 1985-01-02 1.25 Norrbottens skärgårds kustvatten 3.000 8.174 0.501 3.015 0.100 6.8 18.430 0.620 3.12 1
21 SE652400-223501 1985-01-02 1.75 Norrbottens skärgårds kustvatten 3.000 8.172 0.501 3.015 0.100 6.8 18.430 0.620 3.12 1
22 SE652400-223501 1985-01-02 2.25 Norrbottens skärgårds kustvatten 3.000 8.170 0.501 3.015 0.100 6.8 18.430 0.620 3.12 1
23 SE652400-223501 1985-01-02 2.75 Norrbottens skärgårds kustvatten 3.000 8.169 0.501 3.015 0.100 6.8 18.430 0.620 3.12 1
24 SE652400-223501 1985-01-02 3.25 Norrbottens skärgårds kustvatten 3.000 8.167 0.501 3.015 0.100 6.8 18.430 0.620 3.12 1
25 SE652400-223501 1985-01-02 3.75 Norrbottens skärgårds kustvatten 3.000 8.166 0.501 3.015 0.100 6.8 18.430 0.620 3.12 1
26 SE652400-223501 1985-01-02 4.50 Norrbottens skärgårds kustvatten 3.000 8.165 0.501 3.015 0.100 6.8 18.430 0.620 3.12 1
27 SE652400-223501 1985-01-02 5.50 Norrbottens skärgårds kustvatten 3.000 8.163 0.501 3.015 0.100 6.8 18.430 0.620 3.12 1
28 SE652400-223501 1985-01-02 6.50 Norrbottens skärgårds kustvatten 3.000 8.162 0.501 3.015 0.100 6.8 18.431 0.620 3.12 1
29 SE652400-223501 1985-01-02 7.50 Norrbottens skärgårds kustvatten 3.000 8.160 0.501 3.015 0.100 6.8 18.431 0.620 3.12 1
... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
106 SE652400-223501 1985-01-07 1.75 Norrbottens skärgårds kustvatten 3.039 8.552 0.453 3.213 0.113 7.2 18.111 0.553 3.33 1
107 SE652400-223501 1985-01-07 2.25 Norrbottens skärgårds kustvatten 3.045 8.547 0.449 3.215 0.111 7.2 18.092 0.549 3.33 1
108 SE652400-223501 1985-01-07 2.75 Norrbottens skärgårds kustvatten 3.050 8.542 0.446 3.217 0.109 7.2 18.077 0.546 3.33 1
109 SE652400-223501 1985-01-07 3.25 Norrbottens skärgårds kustvatten 3.054 8.538 0.443 3.219 0.107 7.2 18.065 0.543 3.33 1
110 SE652400-223501 1985-01-07 3.75 Norrbottens skärgårds kustvatten 3.058 8.534 0.441 3.221 0.106 7.2 18.055 0.541 3.33 1
111 SE652400-223501 1985-01-07 4.50 Norrbottens skärgårds kustvatten 3.062 8.528 0.438 3.223 0.104 7.2 18.045 0.538 3.33 1
112 SE652400-223501 1985-01-07 5.50 Norrbottens skärgårds kustvatten 3.066 8.521 0.435 3.226 0.103 7.2 18.039 0.536 3.33 1
113 SE652400-223501 1985-01-07 6.50 Norrbottens skärgårds kustvatten 3.068 8.515 0.433 3.229 0.102 7.2 18.039 0.534 3.33 1
114 SE652400-223501 1985-01-07 7.50 Norrbottens skärgårds kustvatten 3.070 8.510 0.432 3.233 0.101 7.2 18.043 0.534 3.33 1
115 SE652400-223501 1985-01-07 8.50 Norrbottens skärgårds kustvatten 3.071 8.506 0.432 3.236 0.101 7.2 18.052 0.534 3.34 1
116 SE652400-223501 1985-01-07 9.50 Norrbottens skärgårds kustvatten 3.072 8.503 0.431 3.239 0.100 7.2 18.061 0.534 3.34 1
117 SE652400-223501 1985-01-07 112.50 Norrbottens skärgårds kustvatten 3.262 7.961 0.426 4.257 0.099 7.2 17.547 0.538 4.36 1
118 SE652400-223501 1985-01-07 115.00 Norrbottens skärgårds kustvatten 3.262 7.961 0.426 4.257 0.099 7.2 17.547 0.538 4.36 1
119 SE652400-223501 1985-01-08 0.00 Norrbottens skärgårds kustvatten 3.034 8.571 0.451 3.248 0.119 7.2 18.108 0.549 3.37 1
120 SE652400-223501 1985-01-08 0.25 Norrbottens skärgårds kustvatten 3.034 8.571 0.451 3.248 0.119 7.2 18.108 0.549 3.37 1
121 SE652400-223501 1985-01-08 0.75 Norrbottens skärgårds kustvatten 3.033 8.571 0.451 3.248 0.119 7.2 18.113 0.549 3.37 1
122 SE652400-223501 1985-01-08 1.25 Norrbottens skärgårds kustvatten 3.035 8.571 0.450 3.249 0.118 7.2 18.108 0.549 3.37 1
123 SE652400-223501 1985-01-08 1.75 Norrbottens skärgårds kustvatten 3.039 8.569 0.448 3.250 0.116 7.2 18.095 0.546 3.37 1
124 SE652400-223501 1985-01-08 2.25 Norrbottens skärgårds kustvatten 3.046 8.565 0.444 3.252 0.114 7.2 18.075 0.541 3.37 1
125 SE652400-223501 1985-01-08 2.75 Norrbottens skärgårds kustvatten 3.052 8.561 0.440 3.255 0.112 7.2 18.058 0.538 3.37 1
126 SE652400-223501 1985-01-08 3.25 Norrbottens skärgårds kustvatten 3.058 8.558 0.437 3.257 0.110 7.2 18.043 0.534 3.37 1
127 SE652400-223501 1985-01-08 3.75 Norrbottens skärgårds kustvatten 3.062 8.554 0.434 3.259 0.109 7.2 18.031 0.531 3.37 1
128 SE652400-223501 1985-01-08 4.50 Norrbottens skärgårds kustvatten 3.068 8.548 0.430 3.262 0.106 7.2 18.015 0.528 3.37 1
129 SE652400-223501 1985-01-08 5.50 Norrbottens skärgårds kustvatten 3.073 8.541 0.427 3.266 0.104 7.2 18.002 0.524 3.37 1
130 SE652400-223501 1985-01-08 6.50 Norrbottens skärgårds kustvatten 3.077 8.535 0.424 3.270 0.103 7.2 17.996 0.522 3.37 1
131 SE652400-223501 1985-01-08 7.50 Norrbottens skärgårds kustvatten 3.080 8.530 0.423 3.274 0.102 7.2 17.996 0.521 3.38 1
132 SE652400-223501 1985-01-08 8.50 Norrbottens skärgårds kustvatten 3.081 8.525 0.421 3.278 0.101 7.2 18.000 0.520 3.38 1
133 SE652400-223501 1985-01-08 9.50 Norrbottens skärgårds kustvatten 3.082 8.521 0.421 3.282 0.101 7.2 18.007 0.520 3.38 1
134 SE652400-223501 1985-01-08 112.50 Norrbottens skärgårds kustvatten 3.300 7.911 0.419 4.454 0.100 7.2 17.461 0.531 4.55 1
135 SE652400-223501 1985-01-08 115.00 Norrbottens skärgårds kustvatten 3.300 7.911 0.419 4.454 0.100 7.2 17.461 0.531 4.55 1

136 rows × 14 columns


In [120]:
B2_NTOT_WINTER_SETTINGS = lv_workspace.get_subset_object('B').get_step_object('step_2').indicator_ref_settings['ntot_winter']
lv_workspace.get_subset_object('B').get_step_object('step_2').indicator_ref_settings['ntot_winter'].allowed_variables
# gör om till
# lv_workspace.get_indicator_ref_settings(step = , subset = , indicator = , waterbody/type)
# ger samma resultat som:
#lv_workspace.get_subset_object('B').get_step_object('step_2').indicator_ref_settings['ntot_winter'].settings.ref_columns

lv_workspace.get_subset_object('B').get_step_object('step_2').indicator_ref_settings['ntot_winter'].settings.get_value('EK G/M', 22)
#print(B2_NTOT_WINTER_SETTINGS)
#B2_NTOT_WINTER_SETTINGS.get_value('2', 'DEPTH_INTERVAL')


Out[120]:
'0.85'

In [124]:
av = lv_workspace.get_subset_object('B').get_step_object('step_2').indicator_data_filter_settings['ntot_winter'].allowed_variables
lv_workspace.get_subset_object('B').get_step_object('step_2').indicator_data_filter_settings['ntot_winter'].settings.df[av]


Out[124]:
DEPH_INTERVAL MONTH_LIST
0 0-10 1;2;3;12
1 0-10 1;2;3;12
2 0-10 1;2;3;12
3 0-10 1;2;3;12
4 0-10 1;2;3;12
5 0-10 1;2;3;12
6 0-10 1;2;3;12
7 0-10 1;2;12
8 0-10 1;2;12
9 0-10 1;2;12
10 0-10 1;2;12
11 0-10 1;2;12
12 0-10 1;2;12
13 0-10 1;2;12
14 0-10 1;2;12
15 0-10 1;2;12
16 0-10 1;2;12
17 0-10 1;2;11;12
18 0-10 1;2;11;12
19 0-10 1;2;11;12
20 0-10 1;2;11;12
21 0-10 1;2;11;12
22 0-10 1;2;11;12
23 0-10 1;2;11;12
24 0-10 1;2;11;12
25 0-10 1;2;12
26 0-10 1;2;3;12

In [119]:
lv_workspace.get_subset_object('B').get_step_object('step_2').indicator_data_filter_settings['ntot_winter'].settings.df


Out[119]:
TYPE_AREA_NUMBER TYPE_AREA_SUFFIX DEPH_INTERVAL MIN_NR_YEARS MIN_NR_VALUES TIME_DELTA_TOLERANCE POS_RADIUS_TOLERANCE DEPH_TOLERANCE MONTH_LIST EKV REF EKV H/G EKV G/M EKV M/O EKV O/D EK H/G EK G/M EK M/O EK O/D SALINITY MAX
0 1 n 0-10 3 3 3 0.1 5 1;2;3;12 -0.630*s+36 -0.715*s+40.86 -0.799*s+45.72 -1.0546*s+60.3 -1.480*s+84.6 0.88 0.79 0.6 0.43 27
1 1 s 0-10 3 3 3 0.1 5 1;2;3;12 -0.65*s+30 -0.738*s+34.05 -0.8255*s+38.1 -1.0888*s+50.25 -1.528*s+70.5 0.88 0.79 0.6 0.43 20
2 2 NaN 0-10 3 3 3 0.1 5 1;2;3;12 -0.630*s+36 -0.715*s+40.86 -0.799*s+45.72 -1.0546*s+60.3 -1.480*s+84.6 0.88 0.79 0.6 0.43 27
3 3 NaN 0-10 3 3 3 0.1 5 1;2;3;12 -0.630*s+36 -0.715*s+40.86 -0.799*s+45.72 -1.0546*s+60.3 -1.480*s+84.6 0.88 0.79 0.6 0.43 27
4 4 NaN 0-10 3 3 3 0.1 5 1;2;3;12 -0.65*s+30 -0.738*s+34.05 -0.8255*s+38.1 -1.0888*s+50.25 -1.528*s+70.5 0.88 0.79 0.6 0.43 20
5 5 NaN 0-10 3 3 3 0.1 5 1;2;3;12 0*s+17 0*s+19.295 0*s+21.59 0*s+28.475 0*s+39.95 0.89 0.77 0.61 0.43 20
6 6 NaN 0-10 3 3 3 0.1 5 1;2;3;12 0*s+17 0*s+19.295 0*s+21.59 0*s+28.475 0*s+39.95 0.89 0.77 0.61 0.43 20
7 7 NaN 0-10 3 3 3 0.1 5 1;2;12 -6*s+59 -6.6*s+64.9 -7.2*s+70.8 -9*s+88.5 -12*s+118 0.91 0.84 0.67 0.5 7
8 8 NaN 0-10 3 3 3 0.1 5 1;2;12 -6*s+59 -6.6*s+64.9 -7.2*s+70.8 -9*s+88.5 -12*s+118 0.91 0.84 0.67 0.5 7
9 9 NaN 0-10 3 3 3 0.1 5 1;2;12 -6*s+59 -6.6*s+64.9 -7.2*s+70.8 -9*s+88.5 -12*s+118 0.91 0.84 0.67 0.5 7
10 10 NaN 0-10 3 3 3 0.1 5 1;2;12 0*s+17 0*s+18.7 0*s+20.4 0*s+25.5 0*s+34 0.89 0.85 0.65 0.5 7
11 11 NaN 0-10 3 3 3 0.1 5 1;2;12 0*s+17 0*s+18.7 0*s+20.4 0*s+25.5 0*s+34 0.89 0.85 0.65 0.5 7
12 12 s 0-10 3 3 3 0.1 5 1;2;12 -2.833*s+34 -3.1167*s+37.4 -3.4*s+40.8 -4.25*s+51 -5.6667*s+68 0.91 0.83 0.66 0.5 6
13 12 n 0-10 3 3 3 0.1 5 1;2;12 -1*s+23 -1.1*s+25.3 -1.2*s+27.6 -1.5*s+34.5 -2*s+46 0.93 0.85 0.68 0.51 6
14 13 NaN 0-10 3 3 3 0.1 5 1;2;12 -2.833*s+34 -3.1167*s+37.4 -3.4*s+40.8 -4.25*s+51 -5.6667*s+68 0.91 0.83 0.66 0.5 6
15 14 NaN 0-10 3 3 3 0.1 5 1;2;12 -2.833*s+34 -3.1167*s+37.4 -3.4*s+40.8 -4.25*s+51 -5.6667*s+68 0.91 0.83 0.66 0.5 6
16 15 NaN 0-10 3 3 3 0.1 5 1;2;12 -1*s+23 -1.1*s+25.3 -1.2*s+27.6 -1.5*s+34.5 -2*s+46 0.93 0.85 0.68 0.51 6
17 16 NaN 0-10 3 3 3 0.1 5 1;2;11;12 -1*s+23 -1.1*s+25.3 -1.2*s+27.6 -1.5*s+34.5 -2*s+46 0.93 0.85 0.68 0.51 5
18 17 NaN 0-10 3 3 3 0.1 5 1;2;11;12 -1*s+23 -1.1*s+25.3 -1.2*s+27.6 -1.5*s+34.5 -2*s+46 0.93 0.85 0.68 0.51 5
19 18 NaN 0-10 3 3 3 0.1 5 1;2;11;12 -0.4*s+20 -0.44*s+22 -0.48*s+24 -0.6*s+30 -0.8*s+40 0.91 0.83 0.66 0.5 5
20 19 NaN 0-10 3 3 3 0.1 5 1;2;11;12 -0.4*s+20 -0.44*s+22 -0.48*s+24 -0.6*s+30 -0.8*s+40 0.91 0.83 0.66 0.5 5
21 20 NaN 0-10 3 3 3 0.1 5 1;2;11;12 -0.6*s+21 -0.66*s+23.1 -0.72*s+25.2 -0.9*s+31.5 -1.2*s+42 0.91 0.83 0.67 0.5 5
22 21 NaN 0-10 3 3 3 0.1 5 1;2;11;12 -0.6*s+21 -0.66*s+23.1 -0.72*s+25.2 -0.9*s+31.5 -1.2*s+42 0.91 0.83 0.67 0.5 5
23 22 NaN 0-10 3 3 3 0.1 5 1;2;11;12 -1*s+21 -1.09*s+22.89 -1.18*s+24.78 -1.45*s+30.45 -1.9*s+39.9 0.93 0.85 0.68 0.51 3
24 23 NaN 0-10 3 3 3 0.1 5 1;2;11;12 -1*s+21 -1.09*s+22.89 -1.18*s+24.78 -1.45*s+30.45 -1.9*s+39.9 0.93 0.85 0.68 0.51 3
25 24 NaN 0-10 3 3 3 0.1 5 1;2;12 -1*s+23 -1.1*s+25.3 -1.2*s+27.6 -1.5*s+34.5 -2*s+46 0.93 0.85 0.68 0.51 6
26 25 NaN 0-10 3 3 3 0.1 5 1;2;3;12 -0.65*s+30 -0.738*s+34.05 -0.8255*s+38.1 -1.0888*s+50.25 -1.528*s+70.5 0.88 0.79 0.6 0.43 20

In [67]:
B2_NTOT_WINTER_SETTINGS.settings.mapping_water_body['N m Bottenvikens kustvatten']


Out[67]:
{'BASIN_NUMBER': '110002.0',
 'CENTER_LAT': '64° 42\' 35,349"',
 'CENTER_LON': '21° 24\' 5,383"',
 'EU_CD': 'SE648760-213140',
 'HID': '649640-214530',
 'TYPE_AREA_NUMBER': '23',
 'TYPE_AREA_SUFFIX': '',
 'URL_VISS': 'http://www.viss.lansstyrelsen.se/waters.aspx?waterEUID=SE648760-213140'}

Set subset time and area filter


In [35]:
f1_A = lv_workspace.get_data_filter_object(step=1, subset='A') 
f1_A.include_list_filter


Out[35]:
{'MYEAR': ['2016', '2017'],
 'SEA_AREA_NAME': ['Gullmarn centralbassäng', 'Rivö fjord'],
 'STATN': ['BJÖRKHOLMEN']}

In [136]:
lv_workspace.get_data_filter_info(step=1, subset='A')


Out[136]:
{'exclude_list': ['MYEAR', 'SEA_AREA_NAME', 'STATN'],
 'include_list': ['MYEAR', 'SEA_AREA_NAME', 'STATN']}

In [36]:
f1_A.exclude_list_filter


Out[36]:
{'MYEAR': ['2015', '2016'], 'SEA_AREA_NAME': [], 'STATN': ['SLÄGGÖ']}

In [21]:
f0.include_list_filter


Out[21]:
{'MYEAR': ['2016', '2017'],
 'SEA_AREA_NAME': ['Byfjorden',
  'Gullmarn centralbassäng',
  'Havstensfjorden',
  'Rivö fjord'],
 'STATN': []}

Apply subset filter


In [22]:
lv_workspace.apply_subset_filter(subset='A') # Not handled properly by the IndexHandler


Out[22]:
True

Extract filtered data


In [23]:
data_after_subset_filter = lv_workspace.get_filtered_data(level=1, subset='A') # level=0 means first filter 
print('{} rows mathing the filter criteria'.format(len(data_after_subset_filter)))
data_after_subset_filter.head()


198 rows mathing the filter criteria
Out[23]:
AMON BQIm CPHL DEPH DOXY_BTL DOXY_CTD LATIT_DD LONGI_DD MNDEP MXDEP ... SERNO SHARKID_MD5 SHIPC STATN STIME TEMP_BTL TEMP_CTD WATER_DISTRICT WATER_TYPE_AREA WLTYP
2628 0.76 NaN 0.6 0.0 7.05 58.38767 11.62667 NaN NaN ... 8.0 NaN 77SN BJÖRKHOLMEN 17:30 4.96 4.84 Västerhavets vattendistrikt 02 - Västkustens fjordar 2 - Havsområde innanför 1 NM
2629 0.72 NaN 0.5 2.0 7.12 58.38767 11.62667 NaN NaN ... 8.0 NaN 77SN BJÖRKHOLMEN 17:30 4.93 4.84 Västerhavets vattendistrikt 02 - Västkustens fjordar 2 - Havsområde innanför 1 NM
2630 0.74 NaN 0.6 5.0 7.16 58.38767 11.62667 NaN NaN ... 8.0 NaN 77SN BJÖRKHOLMEN 17:30 4.88 4.84 Västerhavets vattendistrikt 02 - Västkustens fjordar 2 - Havsområde innanför 1 NM
2631 0.65 NaN 0.5 10.0 7.11 58.38767 11.62667 NaN NaN ... 8.0 NaN 77SN BJÖRKHOLMEN 17:30 5.12 4.86 Västerhavets vattendistrikt 02 - Västkustens fjordar 2 - Havsområde innanför 1 NM
2632 0.46 NaN 0.3 15.0 6.86 58.38767 11.62667 NaN NaN ... 8.0 NaN 77SN BJÖRKHOLMEN 17:30 5.52 5.10 Västerhavets vattendistrikt 02 - Västkustens fjordar 2 - Havsområde innanför 1 NM

5 rows × 46 columns


In [24]:
# show available waterbodies
lst = data_after_subset_filter.SEA_AREA_NAME.unique()
print('Waterbodies in subset:\n{}'.format('\n'.join(lst)))


Waterbodies in subset:
Gullmarn centralbassäng

In [24]:
import numpy as np
np.where(lv_workspace.index_handler.subset_filter)


Out[24]:
(array([2629, 2630, 2631, 2632, 2633, 2634, 2635, 2636, 2637, 2638, 2639,
        2754, 2755, 2756, 2757, 2758, 2759, 2760, 2761, 2762, 2763, 2764,
        2870, 2871, 2872, 2873, 2874, 2875, 2876, 2877, 2878, 2879, 2880,
        2952, 2953, 2954, 2955, 2956, 2957, 2958, 2959, 2960, 2961, 2962,
        3077, 3078, 3079, 3080, 3081, 3082, 3083, 3084, 3085, 3086, 3087,
        3185, 3186, 3187, 3188, 3189, 3190, 3191, 3192, 3193, 3194, 3195,
        3282, 3283, 3284, 3285, 3286, 3287, 3288, 3289, 3290, 3291, 3292,
        3409, 3410, 3411, 3412, 3413, 3414, 3415, 3416, 3417, 3418, 3419,
        3493, 3494, 3495, 3496, 3497, 3498, 3499, 3500, 3501, 3502, 3503,
        3624, 3625, 3626, 3627, 3628, 3629, 3630, 3631, 3632, 3633, 3634,
        3717, 3718, 3719, 3720, 3721, 3722, 3723, 3724, 3725, 3726, 3727,
        3859, 3860, 3861, 3862, 3863, 3864, 3865, 3866, 3867, 3868, 3869,
        3979, 3980, 3981, 3982, 3983, 3984, 3985, 3986, 3987, 3988, 3989,
        4110, 4111, 4112, 4113, 4114, 4115, 4116, 4117, 4118, 4119, 4120,
        4265, 4266, 4267, 4268, 4269, 4270, 4271, 4272, 4273, 4274, 4275,
        4354, 4355, 4356, 4357, 4358, 4359, 4360, 4361, 4362, 4363, 4364,
        4502, 4503, 4504, 4505, 4506, 4507, 4508, 4509, 4510, 4511, 4512,
        4806, 4807, 4808, 4809, 4810, 4811, 4812, 4813, 4814, 4815, 4816], dtype=int64),)

In [25]:
f = lv_workspace.get_data_filter_object(step=1, subset='A')

In [26]:
f.all_filters


Out[26]:
{'exclude_list': ['MYEAR', 'SEA_AREA_NAME', 'STATN'],
 'include_list': ['MYEAR', 'SEA_AREA_NAME', 'STATN']}

In [27]:
f.exclude_list_filter


Out[27]:
{'MYEAR': ['2015', '2016'], 'SEA_AREA_NAME': [], 'STATN': ['SLÄGGÖ']}

In [28]:
f.include_list_filter


Out[28]:
{'MYEAR': ['2016', '2017'],
 'SEA_AREA_NAME': ['Gullmarn centralbassäng', 'Rivö fjord'],
 'STATN': ['BJÖRKHOLMEN']}

In [29]:
s = lv_workspace.get_step_1_object('A')

In [30]:
s.data_filter.all_filters


Out[30]:
{'exclude_list': ['MYEAR', 'SEA_AREA_NAME', 'STATN'],
 'include_list': ['MYEAR', 'SEA_AREA_NAME', 'STATN']}

In [31]:
f0 = lv_workspace.get_data_filter_object(step=0)

In [32]:
f0.exclude_list_filter


Out[32]:
{'MYEAR': ['2015', '2016'], 'SEA_AREA_NAME': [], 'STATN': []}

In [33]:
f0.include_list_filter


Out[33]:
{'MYEAR': ['2016', '2017'],
 'SEA_AREA_NAME': ['Byfjorden',
  'Gullmarn centralbassäng',
  'Havstensfjorden',
  'Rivö fjord'],
 'STATN': []}

In [ ]:

Quality factor Nutrients


In [ ]:
lv_workspace.initiate_quality_factors()

In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]:


In [ ]: