NoaaGfsWeather Class

Represents the National Oceanic and Atmospheric Administration (NOAA) Global Forecast System (GFS) dataset.

This dataset contains 15-day US hourly weather forecast data (example: temperature, precipitation, wind) produced by the Global Forecast System (GFS) from the National Oceanic and Atmospheric Administration (NOAA). For information about this dataset, including column descriptions, different ways to access the dataset, and examples, see NOAA Global Forecast System in the Microsoft Azure Open Datasets catalog.

Initialize filtering fields.

Inheritance
NoaaGfsWeather

Constructor

NoaaGfsWeather(start_date: datetime = datetime.datetime(2018, 1, 1, 0, 0), end_date: datetime = datetime.datetime(2018, 1, 1, 0, 0), cols: List[str] | None = None, limit: int | None = -1, enable_telemetry: bool = True)

Parameters

start_date
datetime
default value: 2018-01-01 00:00:00

The date at which to start loading data, inclusive. If None, the default_start_date is used.

end_date
datetime
default value: 2018-01-01 00:00:00

The date at which to end loading data, inclusive. If None, the default_end_date is used.

cols
list[str]
default value: None

A list of columns names to load from the dataset. If None, all columns are loaded. For information on the available columns in this dataset, see NOAA Global Forecast System.

limit
int
default value: -1

A value indicating the number of days of data to load with to_pandas_dataframe(). If not specified, the default of -1 means no limit on days loaded.

enable_telemetry
bool
default value: True

Whether to enable telemetry on this dataset.

start_date
datetime
Required

The start date you'd like to query inclusively.

end_date
datetime
Required

The end date you'd like to query inclusively.

cols
List[str]
Required

A list of column names you'd like to retrieve. None will get all columns.

limit
int
Required

to_pandas_dataframe() will load only "limit" days of data. -1 means no limit.

enable_telemetry
bool
Required

Indicates whether to send telemetry.

Remarks

The example below shows how to use access the dataset.


   from azureml.opendatasets import NoaaGfsWeather
   from datetime import datetime
   from dateutil.relativedelta import relativedelta


   end_date = datetime.today()
   start_date = datetime.today() - relativedelta(months=1)
   gfs = NoaaGfsWeather(start_date=start_date, end_date=end_date)
   gfs_df = gfs.to_pandas_dataframe()

Methods

filter

Filter time.

filter

Filter time.

filter(env: RuntimeEnv, min_date: datetime, max_date: datetime)

Parameters

env
<xref:azureml.opendatasets.RuntimeEnv>
Required

The runtime environment.

min_date
Required

The min date.

max_date
datetime
Required

The max date.

Returns

filtered data frame.

Attributes

default_end_date

default_end_date = datetime.datetime(2024, 2, 7, 0, 0)

default_start_date

default_start_date = datetime.datetime(2018, 1, 1, 0, 0)

id_column_name

id_column_name = 'ID'

latitude_column_name

latitude_column_name = 'latitude'

longitude_column_name

longitude_column_name = 'longitude'