ropensci / prism

Download data from the Oregon PRISM climate data project http://www.prism.oregonstate.edu/
https://docs.ropensci.org/prism
Other
56 stars 25 forks source link

get_prism_station_md not working #87

Closed mirizarry-ortiz closed 4 years ago

mirizarry-ortiz commented 4 years ago

Hi!

I am getting this error stainfo=get_prism_station_md(type="ppt",minDate="1981-01-01",maxDate="1981-12-31") Error in get_prism_station_md(type = "ppt", minDate = "1981-01-01", maxDate = "1981-12-31") : None of the requested dates are available.

rabutler-usbr commented 4 years ago

Hi @mirizarry-ortiz -

Have you downloaded the daily data using get_prism_dailys()?

It should work if you download the data first.

In the next release, we'll update the help page to make that clear. Additionally, it looks like there is an error message that tells you the data needs to be downloaded first that is not printing entirely. We'll also address that.

mirizarry-ortiz commented 4 years ago

Hi there! Thanks so much for the quick response. Yes, that is the problem, that I did not use get_prism_dailys() first. Thank you so much @rabutler-usbr !

rabutler-usbr commented 4 years ago

Great, glad that resolved it!

rabutler-usbr commented 4 years ago

The error message did fully print in my tests. Additionally, the doc page does indicate the data should be downloaded first.

However, I did make a few changes. bolded the help page, and formatted the error message. I also updated so that a warning message is posted if some dates exist, but others don't. Before, as long as one date exists, a df is returned and you have no idea that some dates were missing.