task_geo.data_sources.noaa.noaa_api_formatter module¶
Functions
|
Format the output of the NOAA API to the task-geo Data Model. |
-
task_geo.data_sources.noaa.noaa_api_formatter.
noaa_api_formatter
(raw, metrics=None, country_aggr=False)[source]¶ Format the output of the NOAA API to the task-geo Data Model.
- Parameters
raw (pandas.DataFrame) – Data to be formatted.
metrics (list[str]) – Optional.List of metrics requested,valid metric values are: TMIN: Minimum temperature. TMAX: Maximum temperature. TAVG: Average of temperature. SNOW: Snowfall (mm). SNWD: Snow depth (mm). PRCP: Precipitation
country_aggr (bool) – When True, only an aggregate for each date/country will be returned.
- Returns
pandas.DataFrame