共用方式為


CommonWeatherEnricher 類別

定義 GFS 預測和 ISD 歷程記錄資料的常見天氣擴充器。

NOAA 全球預報系統 (GFS) 天氣數據和 NOAA 整合表面數據 (ISD) 歷程記錄數據可在開放數據集目錄中取得。 這些公用數據集可用來擴充您的數據。

使用公用數據物件初始化。

建構函式

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

參數

名稱 Description
public_data_object
必要

公用數據集。

enable_telemetry

指出是否要傳送遙測。

預設值: False
public_data_object
必要

公用數據集。

enable_telemetry
必要

指出是否要傳送遙測。

方法

enrich_customer_data_no_agg

使用預設aggregator_all擴充客戶數據。

enrich_customer_data_with_agg

使用指定的匯總工具擴充客戶數據。

enrich_customer_data_no_agg

使用預設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]]]

參數

名稱 Description
customer_data_object
必要

客戶數據類別的實例。

location_match_granularity
int

location_granularity.closest_top_n

預設值: 1
time_round_granularity
str

時間粒度、『day』、『hour』或 『month』。

預設值: hour

傳回

類型 Description

擴充客戶數據的 Tuple new_customer_data processed_public_data。

enrich_customer_data_with_agg

使用指定的匯總工具擴充客戶數據。

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]]]

參數

名稱 Description
customer_data_object
必要

客戶數據類別的實例。

agg
必要

匯總工具。

location_match_granularity
int

location_granularity.closest_top_n

預設值: 1
time_round_granularity
str

time_granularity

預設值: hour

傳回

類型 Description

擴充客戶數據的 Tuple(joined_data)