EarthLifeConsortium / pilot_api

Early pilot version of an API
MIT License
1 stars 0 forks source link

Add a`publications` method #3

Open SimonGoring opened 8 years ago

SimonGoring commented 8 years ago

To get more information about individual occurrences I'd like to be able to get from the occurrence information to publication data. To do this I would like to be able to pass in a comma separated string of occurrence IDs, or dataset IDs (in the case of Neotoma data), or both, and get back a formatted set of publications. Preferably in one of two styles:

  1. BibJSON (or Bibtex)
  2. Citation (APA, or whatever) . . .
/pubs?occ_id=1234,12345,2242&dataset_id=143

Currently the options aren't really available from Neotoma, but we can pass something that looks like it. . .

If you could also search for publiations associated with a spatial or temporal domain that would be cool, but I'm not sure what it would do.

Also, would we then have the reverse method for occurrences? A list of publications could be passed into the occurrence method to return all possible associated occurrences.

mmcclenn commented 8 years ago

I agree that we need one of these. In order to implement it, I will need to be able to query Neotoma for publications. I will talk to Mike Anderson about creating such an operation.

SimonGoring commented 8 years ago

In Neotoma the publications are all stored in the publications, but I only see a pubs table in the paleoDB, which has only 267 records (in my MariaDB version that @jpjenk sent me). It seems to me like we actually have different conceptions of how publications relate to occurrences/datasets.

Does each occurrence have some sort of authority for a published record somewhere else? If it doesn't, then maybe this is all moot.

mmcclenn commented 8 years ago

PBDB has the same concept, but we use a different name for it. In PBDB terminology, they are called "references" and are stored in the table named "refs" with key "reference_no". If you look at the other basic data tables (i.e. collections, occurrences, taxa) you will see that each one includes a "reference_no" column to indicate the publication from which the information was entered.

The "publications" table in PBDB instead stores information about publications that used PBDB data, a much smaller set.