gliderpy API

Helper methods to fetch glider data from multiple ERDDAP serves.

class gliderpy.fetchers.DatasetList(server: str | None = 'https://gliders.ioos.us/erddap')[source]

Bases: object

Build a glider dataset ids list.

e
Type:

an ERDDAP server instance

TODO -> search_terms

Multiple terms will be combined as “AND.”

Type:

A list of terms to search the server for.

get_ids() list[source]

Return the allDatasets list for the glider server.

class gliderpy.fetchers.GliderDataFetcher(server: str | None = 'https://gliders.ioos.us/erddap')[source]

Bases: object

Instantiate the glider fetcher.

Args:

server: A glider ERDDAP server URL.

Attributes:

dataset_id: A dataset unique id. constraints: Download constraints, defaults same as query.

query(*, min_lat: Number | None = None, max_lat: Number | None = None, min_lon: Number | None = None, max_lon: Number | None = None, min_time: datetime | str = None, max_time: datetime | str = None, delayed: bool | None = False) DataFrame[source]

Add user supplied geographical and time constraints to the query.

Parameters:
  • min_lat – southernmost lat

  • max_lat – northermost lat

  • min_lon – westernmost lon (-180 to +180)

  • max_lon – easternmost lon (-180 to +180)

  • min_time – start time, can be datetime object or string

  • max_time – end time, can be datetime object or string

Returns:

search query with argument constraints applied

to_pandas() DataFrame[source]

Return data from the server as a pandas dataframe.

Returns:

pandas a dataframe with datetime UTC as index, multiple dataset_ids dataframes are stored in a dictionary

gliderpy.fetchers.standardise_df(glider_df: DataFrame, dataset_url: str) DataFrame[source]

Standardise variable names in a dataset and add column for URL.