argodata

argodata: An R interface to oceanographic data from the International Argo Program - Published in JOSS (2021)

https://github.com/argocanada/argodata

Science Score: 93.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README and JOSS metadata
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software
Last synced: 6 months ago · JSON representation

Repository

Download Argo Ocean Float Data

Basic Info
Statistics
  • Stars: 9
  • Watchers: 5
  • Forks: 4
  • Open Issues: 3
  • Releases: 1
Created over 5 years ago · Last pushed about 4 years ago
Metadata Files
Readme Contributing License Code of conduct

README.Rmd

---
output: github_document
---



```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%",
  dpi = 300
)

library(argodata)
library(tidyverse)

argo_set_cache_dir("cache-dev")
options(argodata.max_global_cache_age = Inf)
options(argodata.max_data_cache_age = Inf)

argo_global_prof()
```

# argodata


[![R build status](https://github.com/ArgoCanada/argodata/workflows/R-CMD-check/badge.svg)](https://github.com/ArgoCanada/argodata/actions)
[![Codecov test coverage](https://codecov.io/gh/ArgoCanada/argodata/branch/master/graph/badge.svg)](https://codecov.io/gh/ArgoCanada/argodata?branch=master)


The goal of argodata is to provide a data frame-based interface to data generated by the [Argo floats program](https://argo.ucsd.edu) ([doi:10.17882/42182](https://doi.org/10.17882/42182)). This package provides low-level access to all variables contained within Argo NetCDF files; for a higher-level interface with built-in visualization and quality control, see the [argoFloats package](https://github.com/ArgoCanada/argoFloats).

## Installation

You can install the development version from [GitHub](https://github.com/) using:

``` r
# install.packages("remotes")
remotes::install_github("ArgoCanada/argodata")
```

The argodata package downloads files from the [FTP and HTTPS mirrors](http://www.argodatamgt.org/Access-to-data/Argo-GDAC-ftp-and-https-servers), caches them, and loads them into R. You can set the mirror using `argo_set_mirror()` and the cache directory using `argo_set_cache_dir()`:

```{r, eval = FALSE}
argo_set_mirror("https://data-argo.ifremer.fr/")
argo_set_cache_dir("my/argo/cache")
```

Optionally, you can set `options(argodata.cache_dir = "my/argo/cache")` in your .Rprofile to persist this value between R sessions (see `usethis::edit_r_profile()`). Cached files are used indefinitely by default because of the considerable time it takes to refresh them. If you do use a persistent cache, you should update the index files regularly using `argo_update_global()` (data files are also updated occasionally; update these using `argo_update_data()`).

## Example

The main workflow supported by argodata is:

- Start with `argo_global_prof()`, `argo_global_traj()`, `argo_global_meta()`, `argo_global_bio_prof()`, `argo_global_bio_prof()`, or `argo_global_synthetic_prof()`. These functions return data frames that contain meta information about each data file in Argo.
- Use `argo_filter_radius()`, other `argo_filter_*()` functions, or `dplyr::filter()` to subset the index using search criteria.
- Use extractor functions like `argo_prof_levels()`, `argo_traj_measurement()`, `argo_meta_config_param()`, and `argo_tech_tech_param()` to read information for all files in the index subset.

```{r example}
library(tidyverse)
library(argodata)

# filter profile index using search criteria
prof_lab_may_2020 <- argo_global_prof() %>%
  argo_filter_rect(50, 60, -60, -50) %>% 
  filter(
    lubridate::year(date) == 2020, 
    lubridate::month(date) == 5
  )

# download, cache, and load NetCDF files
levels_lab_may_2020 <- prof_lab_may_2020 %>% 
  argo_prof_levels()

# plot!
levels_lab_may_2020 %>% 
  filter(psal_qc == 1) %>% 
  ggplot(aes(x = psal, y = pres, col = temp)) +
  geom_point() +
  scale_y_reverse() +
  theme_bw()
```

See the reference for `argo_prof_levels()` for more ways to load Argo profiles from `argo_global_prof()`, `argo_global_bio_prof()` and `argo_global_synthetic_prof()`; see `argo_traj_measurement()` for ways to load Argo trajectories from `argo_global_traj()` or `argo_global_bio_traj()`; see `argo_meta_missions()` for ways to load float meta from `argo_global_meta()`; see `argo_tech_tech_param()` for ways to load float technical information from `argo_global_tech()`; and see `argo_info()` and `argo_vars()` for ways to load global metadata from Argo NetCDF files.

## Advanced

The argodata package also exports the low-level readers it uses to produce tables from Argo NetCDF files. You can access these using `argo_read_*()` functions.

```{r}
prof_file <- system.file(
  "cache-test/dac/csio/2900313/profiles/D2900313_000.nc",
  package = "argodata"
)

argo_read_prof_levels(prof_file)
```

## Code of Conduct
  
Please note that argodata is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.

Owner

  • Name: Argo Canada
  • Login: ArgoCanada
  • Kind: organization
  • Location: Canada

Code and tools developed and used for the Canadian contribution to the global Argo program (http://www.argo.net/) through Fisheries and Oceans Canada

JOSS Publication

argodata: An R interface to oceanographic data from the International Argo Program
Published
December 16, 2021
Volume 6, Issue 68, Page 3659
Authors
Dewey Dunnington ORCID
Fisheries and Oceans Canada, Bedford Institute of Oceanography, Dartmouth, NS, Canada
Jaimie Harbin ORCID
Fisheries and Oceans Canada, Bedford Institute of Oceanography, Dartmouth, NS, Canada
Dan E. Kelley ORCID
Department of Oceanography, Dalhousie University, Halifax, NS, Canada
Clark Richards ORCID
Fisheries and Oceans Canada, Bedford Institute of Oceanography, Dartmouth, NS, Canada
Editor
Kristen Thyng ORCID
Tags
oceanography measurement Argo float

GitHub Events

Total
  • Watch event: 1
  • Fork event: 1
Last Year
  • Watch event: 1
  • Fork event: 1

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 230
  • Total Committers: 3
  • Avg Commits per committer: 76.667
  • Development Distribution Score (DDS): 0.117
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Dewey Dunnington d****n@d****a 203
Dewey Dunnington d****y@f****t 26
Chris Gordon C****n@d****a 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 35
  • Total pull requests: 13
  • Average time to close issues: 19 days
  • Average time to close pull requests: about 3 hours
  • Total issue authors: 5
  • Total pull request authors: 2
  • Average comments per issue: 2.06
  • Average comments per pull request: 0.15
  • Merged pull requests: 13
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • paleolimbot (24)
  • KimBaldry (5)
  • catsch (4)
  • pasqualina-vonlanthendinenna (1)
  • j-harbin (1)
Pull Request Authors
  • paleolimbot (12)
  • cgrdn (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

DESCRIPTION cran
  • R >= 2.10 depends
  • RNetCDF * imports
  • curl * imports
  • fs * imports
  • glue * imports
  • progress * imports
  • rlang * imports
  • stringr * imports
  • tibble * imports
  • vctrs * imports
  • vroom * imports
  • dplyr * suggests
  • testthat * suggests
  • tidyr * suggests