-
Notifications
You must be signed in to change notification settings - Fork 11
API design
Searvey deals with:
- metadata for sea stations managed by various providers across the globe
- the actual data from these stations
The functions that retrieve metadata should return a pandas DataFrame.
Searvey provides two APIs for metadata:
-
A high level API which allows you to retrieve the common subset of the metadata (regardless of the Provider).
-
A low level API which allows you to retrieve the full metadata/data from each provider.
The API consists of the following functions:
- high:
get_stations()
- low:
get_ioc_stations()
get_coops_stations()
When we want to add support for a new provider we need to:
- Add a function for the low-level API (e.g.
get_usgs_stations()
for USGS) - Update
get_stations()
so that it calls the low level function.
The functions that retrieve data should return xarray Datasets.
Ideally, we would like to have a high and a low level API for data, too. Nevertheless, we are not there yet. We currently only have the low level API:
get_ioc_data()
get_coops_data()
Creating the high level API for data retrieval requires to understand what each provider returns and think how to consolidate that into a single data structure. So, there is work to be done!