lair.synoptic.metadata#

lair.synoptic.metadata(token=None, timeout=120, **query)[source]#

Stations matching a query, one row each.

Parameters:
  • token (str, optional) – API token; defaults to $SYNOPTIC_TOKEN.

  • timeout (float) – Seconds to wait for the response.

  • **query – API query, e.g. bbox="-112.2,40.4,-111.7,40.9", stid="WBB,TRJO", vars="wind_speed", complete=1.

Returns:

pd.DataFrame – Indexed by stid: name, latitude, longitude, elevation_ft, network_id, status, record_start, record_end (UTC, naive).

Return type:

DataFrame

See also

timeseries

The observations of the stations it finds.

Examples

Needs a token and the internet:

>>> from lair.synoptic import metadata
>>> stations = metadata(bbox="-112.2,40.4,-111.7,40.9")
>>> stations[["name", "latitude", "longitude"]].head()