synoptic.services.Precipitation#

class synoptic.services.Precipitation(**params)[source]#

Request derived precipitation total or intervals.

Refer to the official documentation: https://docs.synopticdata.com/services/precipitation

Parameters:
  • start (datetime or str, optional) – The start time of the desired time range as a datetime.datetime or a string in the form 'YYYYMMDDHHMM' or 'YYYY-MM-DD HH:MM'. Required if recent is not provided.

  • end (datetime or str, optional) – The end time of the desired time range as a datetime.datetime or a string in the form 'YYYYMMDDHHMM' or 'YYYY-MM-DD HH:MM'. Required if recent is not provided.

  • recent (timedelta, int, or str, optional) – A datetime.timedelta, integer (representing minutes), or a duration string (e.g., ‘3h’) that specifies the period of data to retrieve prior to the current time. Required if start and end are not provided.

  • **station_selection – Station selection parameters such as stid, state, county, radius, bbox, vars, varsoperator, etc. Refer to the Synoptic API documentation for details.

  • token (str, optional) – Synoptic API token. Required if the SYNOPTIC_TOKEN environment variable and the config file entry are not set.

  • pmode ({'totals', 'intervals', 'last'}) – Precipitation mode. Default is “totals”.

  • interval (int | {'hour', 'day', 'week', 'month', 'year'}) – Integer hours, or string interval. Default is “day”.

  • interval_window (int) – Time window in hours

  • **optional_parameters – units, precip, qc, etc.

__init__(**params)[source]#

Methods

__init__(**params)

df()

Stations precipitation DataFrame.

df()[source]#

Stations precipitation DataFrame.

Return type:

DataFrame