ioos / notebooks_demos

Notebook demonstrations and examples
https://ioos.github.io/notebooks_demos/
MIT License
19 stars 19 forks source link

MBON Pole to Pole example #364

Closed MathewBiddle closed 3 years ago

MathewBiddle commented 4 years ago

Please provide a detailed description of the suggested example below: I'm not quite sure yet what we want to show, but MBON Pole to Pole has a bunch of data in OBIS. Maybe we can use the OBIS API to grab the data?

I'll investigate more and update when we have a better idea of where to take this.

ocefpaf commented 3 years ago

Are you planning on exploring the API with Python or using the existing R library?

MathewBiddle commented 3 years ago

I surveyed a small group and got a split response 50/50. Using the existing R library would probably be a more effective use of our time, and more applicable to the biology folks.

I did find pyobis. It looks like that was last contributed to in 2017, so it might be out of date, but it could be worth exploring/

ocefpaf commented 3 years ago

Agreed. We would do better by teaching folks how to call Python from R and vice-versa.

MathewBiddle commented 3 years ago

Add on: access the data including the extended measurement or facts tables from OBIS API.

MathewBiddle commented 3 years ago

In the API occurrence endpoint the mof parameter (true/false) has been added which determines if MeasurementOrFact records are included in the results or not. In addition, filters have been added to find data with specific measurement types, values or units. For now this is a simple text search and does not yet take into account relationships between vocabulary terms.   For example, this request finds mollusc occurrences with biomass measurements: https://api.obis.org/occurrence?scientificname=Mollusca&measurementtype=biomass&mof=true   To get MeasurementOrFact support in the R package, please install the latest version from GitHub (version 2.2.0 or above).

MathewBiddle commented 3 years ago

See https://github.com/ioos/notebooks_demos/pull/370/commits/279acdbbef43e5f304823975fa355336994692be

MathewBiddle commented 3 years ago

Some additional information about the obis api. Here is a list of all the measurements or facts currently in OBIS: https://reports.obis.org/moftypes/

If you are interested in seeing which dataset have a particular measurement you can get that from the API using the measurementTypeID- here is an example: https://api.obis.org/dataset?measurementtypeid=http://vocab.nerc.ac.uk/collection/P01/current/SDBIOL05/

You can also search using the measurementType: https://api.obis.org/dataset?measurementtype=weight

MathewBiddle commented 3 years ago

Maybe bring in seascapes data as well: https://github.com/eqmh/ERDDAP-extractions/blob/master/seascape_example.R

similarly: https://github.com/marinebon/p2p/blob/2557dc03abe8e5779f5392586eb470232f8aa604/_site_template.Rmd#L142-L178

See https://marinebon.org/p2p/z_usa-pumphouse-nahantma.html for example

MathewBiddle commented 3 years ago

moved to code lab. closing.