mlair.helpers.data_sources.toar_data_v2
¶
Functions to access https://toar-data.fz-juelich.de/api/v2/
Module Contents¶
Functions¶
|
Download data from https://toar-data.fz-juelich.de/api/v2/ |
|
|
|
Extract timezone information and convert data index to this timezone. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Attributes¶
-
mlair.helpers.data_sources.toar_data_v2.
__date__
= 2022-06-30¶
-
mlair.helpers.data_sources.toar_data_v2.
str_or_none
¶
-
mlair.helpers.data_sources.toar_data_v2.
download_toar
(station_name: Union[str, List[str]], stat_var: dict, sampling: str = 'daily', data_origin: Dict = None)¶ Download data from https://toar-data.fz-juelich.de/api/v2/
Uses station name to indicate measurement site and keys of stat_var to indicate variable name. If data origin is given, this method tries to load time series for this origin. In case no origin is provided, this method loads data with the highest priority according to toar-data’s order parameter.
- Parameters
station_name –
stat_var –
sampling –
data_origin –
- Returns
-
mlair.helpers.data_sources.toar_data_v2.
merge_data
(*args, sampling='hourly')¶
-
mlair.helpers.data_sources.toar_data_v2.
correct_timezone
(data, meta, sampling)¶ Extract timezone information and convert data index to this timezone.
Uses UTC if no information is provided. Note that is method only modifies data in with sampling=’hourly’. In all other cases, it returns just the given data without any change. This method expects date index of data to be in UTC. Timezone information is not added to the index to get rid of daylight saving time and ambiguous timestamps.
-
mlair.helpers.data_sources.toar_data_v2.
prepare_meta
(meta, sampling, stat_var, var)¶
-
mlair.helpers.data_sources.toar_data_v2.
combine_meta_data
(station_meta, timeseries_meta)¶
-
mlair.helpers.data_sources.toar_data_v2.
load_timeseries_data
(timeseries_meta, url_base, opts, headers, sampling)¶
-
mlair.helpers.data_sources.toar_data_v2.
extract_timeseries_data
(result, result_format)¶
-
mlair.helpers.data_sources.toar_data_v2.
load_station_information
(station_name: List[str], url_base: str, headers: Dict)¶
-
mlair.helpers.data_sources.toar_data_v2.
load_timeseries_information
(station_meta, var_meta, url_base: str, headers: Dict, data_origin: Dict = None) → [Dict, Dict]¶
-
mlair.helpers.data_sources.toar_data_v2.
select_timeseries_by_order
(toar_meta)¶
-
mlair.helpers.data_sources.toar_data_v2.
select_timeseries_by_origin
(toar_meta, var_origin)¶
-
mlair.helpers.data_sources.toar_data_v2.
load_variables_information
(var_dict, url_base, headers)¶