usa-npn / rnpn

R client for the National Phenology Network database API
https://rdrr.io/cran/rnpn/
Other
19 stars 9 forks source link

Add use case examples / unexpected error #8

Closed cboettig closed 3 years ago

cboettig commented 10 years ago

This whole package looks pretty amazing.

It seems like it wouldn't be too difficult to replicate some figures from the literature in order to illustrate this package use. For instance, I thought this one might make a splashy example:

http://www.nature.com/nature/journal/v394/n6696/abs/394839b0.html

After looking up the species id for the red lilac successfully, I tried:

out <- getallobssp(speciesid = 35, startdate="1960-01-01", enddate="1994-01-01")

and got this error

Error in data.frame(phenophase_id = "76", phenophase_name = "First leaf",  : 
  arguments imply differing number of rows: 1, 0

(Provided this works, it would be fun to update the original figure with data since 1994 as well...)

Some of Lizzie's papers might be nice potential examples too: https://www.usanpn.org/biblio?f[author]=4604

sckott commented 10 years ago

Hey @cboettig Nice, good idea on the use case for sure. Let's do that when this error is fixed. I'll open another issue for this error.

To be honest, I haven't worked on this in a while - I think I was waiting on some API changes or something. I'll check back in with the developer.

npnlee85 commented 3 years ago

Package has this error fixed, and includes vignettes with a number of examples not unlike the graph provided in the linked paper. Also it's now possible to use the package to pull the Spring Index values directly!