siphon.simplewebservice
¶
Contains functionality for retrieving simple web service data.
siphon.simplewebservice.wyoming
¶
Read upper air data from the Wyoming archives.
-
class
siphon.simplewebservice.wyoming.
WyomingUpperAir
[source]¶ Download and parse data from the University of Wyoming’s upper air archive.
-
classmethod
request_data
(time, site_id, **kwargs)[source]¶ Retrieve upper air observations from the Wyoming archive.
Parameters: - time (datetime) – The date and time of the desired observation.
- site_id (str) – The three letter ICAO identifier of the station for which data should be downloaded.
- kwargs – Arbitrary keyword arguments to use to initialize source
Returns: Return type: pandas.DataFrame
containing the data
-
classmethod
siphon.simplewebservice.iastate
¶
Read upper air data from the IA State archives.
-
class
siphon.simplewebservice.iastate.
IAStateUpperAir
[source]¶ Download and parse data from the Iowa State’s upper air archive.
-
classmethod
request_all_data
(time, pressure=None, **kwargs)[source]¶ Retrieve upper air observations from Iowa State’s archive for all stations.
Parameters: - time (datetime) – The date and time of the desired observation.
- pressure (float, optional) – The mandatory pressure level at which to request data (in hPa). If none is given, all the available data in the profiles is returned.
- kwargs – Arbitrary keyword arguments to use to initialize source
Returns: Return type: pandas.DataFrame
containing the data
-
classmethod
request_data
(time, site_id, **kwargs)[source]¶ Retrieve upper air observations from Iowa State’s archive for a single station.
Parameters: - time (datetime) – The date and time of the desired observation.
- site_id (str) – The three letter ICAO identifier of the station for which data should be downloaded.
- kwargs – Arbitrary keyword arguments to use to initialize source
Returns: Return type: pandas.DataFrame
containing the data
-
classmethod
siphon.simplewebservice.igra2
¶
Read upper air data from the Integrated Global Radiosonde Archive version 2.
-
class
siphon.simplewebservice.igra2.
IGRAUpperAir
[source]¶ Download and parse data from NCEI’s Integrated Radiosonde Archive version 2.
-
classmethod
request_data
(time, site_id, derived=False)[source]¶ Retreive IGRA version 2 data for one station.
Parameters: - site_id (str) – 11-character IGRA2 station identifier.
- time (datetime) – The date and time of the desired observation. If list of two times is given, dataframes for all dates within the two dates will be returned.
Returns: Return type: class:
pandas.DataFrame
containing the data.
-
classmethod
siphon.simplewebservice.acis
¶
Requests data from the ACIS Web Services API.
-
exception
siphon.simplewebservice.acis.
AcisApiException
[source]¶ This class handles exceptions raised by the acis_request function.
-
siphon.simplewebservice.acis.
acis_request
(method, params)[source]¶ Request data from the ACIS Web Services API.
Makes a request from the ACIS Web Services API for data based on a given method (StnMeta,StnData,MultiStnData,GridData,General) and parameters string. Information about the parameters can be obtained at: http://www.rcc-acis.org/docs_webservices.html
If a connection to the API fails, then it will raise an exception. Some bad calls will also return empty dictionaries.
ACIS Web Services is a distributed system! A call to the main URL can be delivered to any climate center running a public instance of the service. This makes the calls efficient, but also occasionaly results in failed calls when a server you are directed to is having problems. Generally, reconnecting after waiting a few seconds will resolve a problem. If problems are persistent, contact ACIS developers at the High Plains Regional Climate Center or Northeast Regional Climate Center who will look into server issues.
Parameters: Returns: Return type: A dictionary of data based on the JSON parameters
Raises: :class: `ACIS_API_Exception` – When the API is unable to establish a connection or returns unparsable data.
siphon.simplewebservice.ndbc
¶
Read data from the National Data Buoy Center.
-
class
siphon.simplewebservice.ndbc.
NDBC
[source]¶ Download and parse data from the National Data Buoy Center.
-
classmethod
buoy_data_types
(buoy)[source]¶ Determine which types of data are available for a given buoy.
Parameters: buoy (str) – Buoy name Returns: Return type: dict of valid file extensions and their descriptions
-
classmethod
latest_observations
()[source]¶ Retrieve the latest observations for all buoys from NDBC.
Returns: Return type: pandas.DataFrame
containing the data
-
classmethod
raw_buoy_data
(buoy, data_type='txt')[source]¶ Retrieve the raw buoy data contents from NDBC.
Parameters: - buoy (str) – Name of buoy
- data_type (str) – Type of data requested, must be one of ‘txt’ standard meteorological data ‘drift’ meteorological data from drifting buoys and limited moored buoy data mainly from international partners ‘cwind’ continuous winds data (10 minute average) ‘spec’ spectral wave summaries ‘data_spec’ raw spectral wave data ‘swdir’ spectral wave data (alpha1) ‘swdir2’ spectral wave data (alpha2) ‘swr1’ spectral wave data (r1) ‘swr2’ spectral wave data (r2) ‘adcp’ acoustic doppler current profiler ‘ocean’ oceanographic data ‘tide’ tide data ‘srad’ solar radiation data ‘dart’ water column height ‘supl’ supplemental measurements data ‘rain’ hourly rain data
Returns: Return type: Raw data string
-
classmethod
realtime_observations
(buoy, data_type='txt')[source]¶ Retrieve the realtime buoy data from NDBC.
Parameters: - buoy (str) – Name of buoy
- data_type (str) – Type of data requested, must be one of ‘txt’ standard meteorological data ‘drift’ meteorological data from drifting buoys and limited moored buoy data mainly from international partners ‘cwind’ continuous winds data (10 minute average) ‘spec’ spectral wave summaries ‘ocean’ oceanographic data ‘srad’ solar radiation data ‘dart’ water column height ‘supl’ supplemental measurements data ‘rain’ hourly rain data
Returns: Return type: Raw data string
-
classmethod