Share via


CommonWeatherEnricher Class

Defines a common weather enricher, for GFS forecast and ISD history data.

NOAA Global Forecast System (GFS) weather data and NOAA Integrated Surface Data (ISD) historical data are available in the Open Datasets catalog. These public datasets can be used to enrich your data.

Initialize with public data object.

Constructor

CommonWeatherEnricher(public_data_object: PublicData, enable_telemetry: bool = False)

Parameters

Name Description
public_data_object
Required

A public dataset.

enable_telemetry

Indicates whether to send telemetry.

Default value: False
public_data_object
Required

A public dataset.

enable_telemetry
Required

Indicates whether to send telemetry.

Methods

enrich_customer_data_no_agg

Enrich customer data using the default aggregator_all.

enrich_customer_data_with_agg

Enrich customer data with a specified aggregator.

enrich_customer_data_no_agg

Enrich customer data using the default aggregator_all.

enrich_customer_data_no_agg(customer_data_object: CustomerData, location_match_granularity: int = 1, time_round_granularity: str = 'hour') -> Tuple[CustomerData, PublicData, List[Tuple[str, str]]]

Parameters

Name Description
customer_data_object
Required

An instance of a customer data class.

location_match_granularity
int

location_granularity.closest_top_n

Default value: 1
time_round_granularity
str

Time granularity, 'day', 'hour', or 'month'.

Default value: hour

Returns

Type Description

A tuple of enriched customer data (new_customer_data), processed_public_data.

enrich_customer_data_with_agg

Enrich customer data with a specified aggregator.

enrich_customer_data_with_agg(customer_data_object: CustomerData, agg: str, location_match_granularity: int = 1, time_round_granularity: str = 'hour') -> Tuple[CustomerData, List[Tuple[str, str]]]

Parameters

Name Description
customer_data_object
Required

An instance of a customer data class.

agg
Required

An aggregator.

location_match_granularity
int

location_granularity.closest_top_n

Default value: 1
time_round_granularity
str

time_granularity

Default value: hour

Returns

Type Description

A tuple of enriched customer data (joined_data)