-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request: Pacific Decadal Oscillation dataset #101
Comments
@reblake The data is indeed available, that server is just not one that is included in the search list. library(rerddap)
myURL <- 'https://oceanview.pfeg.noaa.gov/erddap/'
info <- info('cciea_OC_PDO', url = myURL)
info
<ERDDAP info> cciea_OC_PDO
Base URL: https://oceanview.pfeg.noaa.gov/erddap
Dataset Type: tabledap
Variables:
PDO:
Range: -3.6, 3.51
time:
Range: -2.2089888E9, 1.627776E9
Units: seconds since 1970-01-01T00:00:00Z
pdo <- tabledap('cciea_OC_PDO', url = myURL)
str(pdo)
Classes ‘tabledap’ and 'data.frame': 1460 obs. of 2 variables:
$ time: chr "1900-01-01T00:00:00Z" "1900-02-01T00:00:00Z" "1900-03-01T00:00:00Z" "1900-04-01T00:00:00Z" ...
$ PDO : num 0.04 1.32 0.49 0.35 0.77 0.65 0.95 0.14 -0.24 0.23 ...
- attr(*, "datasetid")= chr "cciea_OC_PDO"
- attr(*, "path")= chr "/Users/rmendels/Library/Caches/R/rerddap/e1e9bdd384a02460fe2c8a60d873f00d.csv"
- attr(*, "url")= chr "https://oceanview.pfeg.noaa.gov/erddap/tabledap/cciea_OC_PDO.csv?" You just have to point 'rerddap' to the correct server |
Wow @rmendels, thanks! That's great news, and saves me 15 lines of code. |
@reblake I am unclear on what you are saying. the 'tabletop()' function is indeed documented and one of the vignettes gives many examples of using it (https://docs.ropensci.org/rerddap/articles/Using_rerddap.html), including setting which ERDDAP the data is on (look at the IOOS Glider example). The vignettes are no longer included in the package because building them was creating too many problems with CRAN checks, but links to the vignettes are given. There are something like 90-100 ERDDAPs worldwide, so it is difficult to document how to find a particular dataset in all of those ERDDAPs. There is the site http://erddap.com/#search but being included in that is voluntary, and if you search for PDO there it does not come up. But that is why we (ERD) provide expensive support, though I can't say that any of us know all of the data on all of the ERDDAPs. If I am feeling motivated I may add a search capability that uses http://erddap.com/#search, but even more external access can make for difficulties with passing all of the CRAN tests. But can I point out that you did find the oceanview ERDDAP and that it had the PDO, so it was more a case of understanding how to use 'tabledap()' |
@rmendels, I'm sorry I wasn't clear. Let me try to rephrase my question from above. My second point about the documentation boils down to this. I couldn't find a a mention of Hope this is clearer. |
@reblake Thanks. As i said, there are some 90-100 ERDDAPs worldwide, each run by independent organizations. 'rerddap' will work with any ERDDAP if you have the URL. That of course begs the question of how to find the different ERDDAPs. The 'rerddap' functions that lists the institutions and servers include the ones we have permission to list. People have different reasons for not being included in the list, sometimes it is just because they haven't bothered to be included in the list. But either way we will not list a server without explicit permission. As for your statement "the data weren't available via the package", I am sorry that is a misleading statement. The package is not limited to the ERDDAP's listed in its functions, it works with any ERDDAP server, including the one at https://oceanview.pfeg.noaa.gov/erddap . That is a different question than how to find that ERDDAP. Clearly you did find it. I don't see that this discussion is going anywhere so I am closing the issue. |
I just installed this package because I was hoping to programmatically download a table dataset, Pacific Decadal Oscillation (PDO) data, from ERDDAP via this package. Sadly it's not listed as available when I searched with this code:
An example of the PDO data I'm looking for is here:
https://oceanview.pfeg.noaa.gov/erddap/tabledap/cciea_OC_PDO.htmlTable?&time%3E=1900-01-01&time%3C=2021-09-01
While it's possible to scrape this html (what I'm currently doing), it's not a very reproducible method because 1) it relies on the URL not breaking, and 2) updating the dates in the URL itself each time I want to scrape more data.
Hopefully this dataset can be made available via this package in the future.
Thanks!
The text was updated successfully, but these errors were encountered: