forked from ropensci/pangaear
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
110 lines (78 loc) · 3.21 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
pangaear
========
```{r echo=FALSE}
knitr::opts_chunk$set(
comment = "#>",
collapse = TRUE,
warning = FALSE,
message = FALSE
)
```
[![cran checks](https://cranchecks.info/badges/worst/pangaear)](https://cranchecks.info/pkgs/pangaear)
[![R-check](https://github.com/ropensci/pangaear/workflows/R-check/badge.svg)](https://github.com/ropensci/pangaear/actions?query=workflow%3AR-check)
[![codecov](https://codecov.io/gh/ropensci/pangaear/branch/master/graph/badge.svg)](https://codecov.io/gh/ropensci/pangaear)
[![rstudio mirror downloads](https://cranlogs.r-pkg.org/badges/pangaear)](https://github.com/r-hub/cranlogs.app)
[![cran version](https://www.r-pkg.org/badges/version/pangaear)](https://cran.r-project.org/package=pangaear)
`pangaear` is a data retrieval interface for the World Data Center PANGAEA (https://www.pangaea.de/). PANGAEA archieves published Earth & Environmental Science data under the following subjects: agriculture, atmosphere, biological classification, biosphere, chemistry, cryosphere, ecology, fisheries, geophysics, human dimensions, lakes & rives, land surface, lithosphere, oceans, and paleontology.
This package offers tools to interact with the PANGAEA Database, including functions for searching for data, fetching datasets by dataset ID, and working with the PANGAEA OAI-PMH service.
## Info
* Pangaea [website](https://www.pangaea.de/).
* Pangaea [OAI-PMH docs](https://wiki.pangaea.de/wiki/OAI-PMH).
* [OAI-PMH Spec](http://www.openarchives.org/OAI/openarchivesprotocol.html)
## Package API
```{r echo=FALSE, comment=NA, results='asis'}
cat(paste(" -", paste(getNamespaceExports("pangaear"), collapse = "\n - ")))
```
## Installation
Stable version
```{r eval=FALSE}
install.packages("pangaear")
```
Dev version
```{r eval=FALSE}
remotes::install_github('ropensci/pangaear')
```
```{r}
library('pangaear')
```
## Search for data
This is a thin wrapper around the GUI search interface on the page <https://www.pangaea.de/>. Everything you can do there, you can do here.
```{r}
pg_search(query = 'water', bbox = c(-124.2, 41.8, -116.8, 46.1), count = 3)
```
## Get data
```{r}
res <- pg_data(doi = '10.1594/PANGAEA.807580')
res[[1]]
```
Search for data then pass DOI to data function.
```{r}
res <- pg_search(query = 'water', bbox = c(-124.2, 41.8, -116.8, 46.1), count = 3)
pg_data(res$doi[3])[1:3]
```
## OAI-PMH metadata
```{r eval=FALSE}
# Identify the service
pg_identify()
# List metadata formats
pg_list_metadata_formats()
# List identifiers
pg_list_identifiers(from = Sys.Date() - 2, until = Sys.Date())
# List sets
pg_list_sets()
# List records
pg_list_records(from = Sys.Date() - 1, until = Sys.Date())
# Get a record
pg_get_record(identifier = "oai:pangaea.de:doi:10.1594/PANGAEA.788382")
```
## Contributors (reverse alphabetical)
* Naupaka Zimmerman
* Kara Woo
* Gavin Simpson
* Andrew MacDonald
* Scott Chamberlain
## Meta
* Please [report any issues or bugs](https://github.com/ropensci/pangaear/issues).
* License: MIT
* Get citation information for `pangaear` in R doing `citation(package = 'pangaear')`
* Please note that this package is released with a [Contributor Code of Conduct](https://ropensci.org/code-of-conduct/). By contributing to this project, you agree to abide by its terms.