ramlegacy

R :package: to download, cache and read in different versions of the RAM Legacy Stock Assessment Data Base, an online compilation of stock assessment results for commercially exploited marine populations from around the world.

https://github.com/ropensci/ramlegacy

Science Score: 33.0%

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

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: wiley.com, zenodo.org
  • Committers with academic emails
    1 of 3 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (21.2%) to scientific vocabulary

Keywords

fisheries marine-biology r r-package ramlegacy ropensci rstats stock-assessment

Keywords from Contributors

genome
Last synced: 10 months ago · JSON representation

Repository

R :package: to download, cache and read in different versions of the RAM Legacy Stock Assessment Data Base, an online compilation of stock assessment results for commercially exploited marine populations from around the world.

Basic Info
Statistics
  • Stars: 5
  • Watchers: 3
  • Forks: 6
  • Open Issues: 2
  • Releases: 0
Topics
fisheries marine-biology r r-package ramlegacy ropensci rstats stock-assessment
Created almost 8 years ago · Last pushed over 6 years ago
Metadata Files
Readme Contributing License Code of conduct

README.Rmd

---
output: github_document
---



```{r setup, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
```
ramlegacy
=============
[![CRAN status](https://www.r-pkg.org/badges/version/ramlegacy)](https://cran.r-project.org/package=ramlegacy)
[![Travis Build Status](https://travis-ci.com/ropensci/ramlegacy.svg?branch=master)](https://travis-ci.com/ropensci/ramlegacy) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/ropensci/ramlegacy?branch=master&svg=true)](https://ci.appveyor.com/project/kshtzgupta1/ramlegacy) [![Coverage status](https://codecov.io/gh/ropensci/ramlegacy/branch/master/graph/badge.svg)](https://codecov.io/github/ropensci/ramlegacy) 
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
 [![](https://badges.ropensci.org/264_status.svg)](https://github.com/ropensci/software-review/issues/264)



- **Authors**: Kshitiz Gupta, [Carl Boettiger](https://www.carlboettiger.info/)
- **License**: [MIT](https://opensource.org/licenses/MIT)
- [Package source code on Github](https://github.com/ropensci/ramlegacy)
- [**Submit Bugs and feature requests**](https://github.com/ropensci/ramlegacy/issues)

`ramlegacy` is an R package that supports caching and reading in different versions of the RAM Legacy Stock Assessment Data Base, an online compilation of stock assessment results for commercially exploited marine populations from around the world. More information about the database can be found [here.](https://www.ramlegacy.org/)


## What does `ramlegacy` do?

  - Provides a function `download_ramlegacy()`, to download all the available versions
    of the RAM Legacy Stock Assessment Excel Database and cache them on the user's computer
    as serialized RDS objects. This way once a version has been downloaded it doesn't need
    to be re-downloaded for subsequent analysis.
  - Supports reading in specified tables or all tables from a cached version of the database through a 
    function `load_ramlegacy()`
  - Provides a function `ram_dir()` to view the path of the location where the downloaded database was cached.

## Installation
You can install the development version from [Github](https://github.com/ropensci/ramlegacy) with:

```{r, eval = FALSE, echo = TRUE}
install.packages("devtools")
library(devtools)
install_github("ropensci/ramlegacy")
```

To ensure that the vignette is installed along with the package make sure to remove `--no-build-vignettes` from the `build_opts` in `install_github`

## Usage
Please see the ramlegacy [vignette](https://docs.ropensci.org/ramlegacy/articles/ramlegacy.html) for more detailed examples and additional package functionality. 

Start by loading the package using `library`.

```{r load, echo = TRUE, eval = FALSE}
library(ramlegacy)
```

### download_ramlegacy

`download_ramlegacy()` downloads the specified version of **RAM Legacy Stock Assessment Excel Database** and then saves it as an RDS object in user’s application data directory as detected by the [rappdirs](https://CRAN.R-project.org/package=rappdirs) package. This location is also where `load_ramlegacy()` by default will look for the downloaded database. 

```{r, download_ramlegacy example1, eval = F, echo = T}
# downloads version 4.44
download_ramlegacy(version = "4.44")
```

If version is not specified then `download_ramlegacy` defaults to downloading current latest version (4.44) :

```{r, download_ramlegacy_example2, eval = F, echo = T}
# downloads current latest version 4.44
download_ramlegacy()
```

The latest versions of the RAM Legacy Database are [archived in Zenodo](https://zenodo.org/communities/rlsadb/) but the older versions (v4.3, v3.0, v2.5, v2.0, v1.0) are not. To ensure access to these older versions of the database `download_ramlegacy` supports downloading them from this [Github repository](https://www.github.com/kshtzgupta1/ramlegacy-assets/):

```{r, download_ramlegacy_example3, eval = F, echo = T}
# downloads older version 4.3
download_ramlegacy(version = "4.3")
```

### load_ramlegacy
After the specified version of the database has been downloaded and cached on your local machine through `download_ramlegacy` you can call `load_ramlegacy` to obtain a list of specific tables/all the tables from that version of the database. If version is not specified but tables is then `load_ramlegacy` defaults to returning a list containing the specified dataframes from the latest version (currently 4.44). If both version and tables are not specified then `load_ramlegacy` defaults to returning a list containing all the dataframes in the latest version (currently 4.44)

```{r, load_ramlegacy example1, eval = F, echo = T}
# get a list containing area and bioparams tables from
# version 4.3 of the database
load_ramlegacy(version = "4.3", tables = c("area", "bioparams"))

# get a list containing area and bioparams tables from version 4.44
# of the database
load_ramlegacy(version = "4.44", tables = c("area", "bioparams"))

# if tables is specified but version is not then the function defaults
# to returning a list containing the specified tables from the current
# latest version 4.44
load_ramlegacy(tables = c("area", "bioparams"))

# since both tables and version are not specified the function returns
# a list containing all the tables from the current latest version 4.44
load_ramlegacy()
```

To learn more about the different tables present in the database, what the various acronyms mean and the different stock summaries accompanying the databases please see this [page.](https://docs.ropensci.org/ramlegacy/articles/tables_description.html)


### ram_dir
To view the exact path where a certain version of the database was downloaded and cached by `download_ramlegacy` you can run `ram_dir(vers = 'version')`, specifying the version number inside the function call:
```{r, ram_dir_example1, eval = F, echo = T}
# download version 4.44
download_ramlegacy(version = "4.44")

# view the location where version 4.44 of the database was
# downloaded and cached
ram_dir(vers = "4.44")
```

## Similar Projects

1. [`ramlegacy`](https://github.com/seananderson/ramlegacy) 
Sean Anderson has a namesake package that appears to be a stalled project on Github (last updated 9 months ago). However, unlike this package which supports downloading and reading in the Excel version of the database, Sean Anderson's project downloads the Microsoft Access version and converts it to a local sqlite3 database. 
 

2. [`RAMlegacyr`](https://github.com/ashander/RAMlegacyr)
`RAMlegacyr` is an older package last updated in 2015. Similar to Sean Anderson's project, the package seems to be an R interface for the Microsoft Access version of the RAM Legacy Stock Assessment Database and provides a set of functions using RPostgreSQL to connect to the database.

## Citation
Current and older versions of the RAM Legacy Database are [archived in Zenodo](https://zenodo.org/communities/rlsadb/), each version with its own unique DOI. The suggested format for citing data is:

RAM Legacy Stock Assessment Database. 2018. Version 4.44-assessment-only. Released 2018-12-22. Accessed [Date accessed YYYY-MM-DD]. Retrieved from [DOI:10.5281/zenodo.2542919.](https://zenodo.org/record/2542919#.XE-rFs9KjBI)

The primary publication describing the RAM Legacy Stock Assessment Database, and suggested citation for general use is:

Ricard, D., Minto, C., Jensen, O.P. and Baum, J.K. (2012) Evaluating the knowledge base and status of commercially exploited marine species with the RAM Legacy Stock Assessment Database. Fish and Fisheries 13 (4) 380-398. [DOI: 10.1111/j.1467-2979.2011.00435.x](https://onlinelibrary.wiley.com/doi/abs/10.1111/j.1467-2979.2011.00435.x)

Several [publications](https://sites.uw.edu/ramlegac/publications/) have relied on the RAM Legacy Stock Assessment Database.

[![ropensci_footer](https://ropensci.org/public_images/ropensci_footer.png)](https://ropensci.org)

Owner

  • Name: rOpenSci
  • Login: ropensci
  • Kind: organization
  • Email: info@ropensci.org
  • Location: Berkeley, CA

GitHub Events

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

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 179
  • Total Committers: 3
  • Avg Commits per committer: 59.667
  • Development Distribution Score (DDS): 0.011
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Kshitiz Gupta k****1@b****u 177
rOpenSci Bot m****t@g****m 1
Jeroen Ooms j****s@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 6
  • Total pull requests: 2
  • Average time to close issues: 30 days
  • Average time to close pull requests: about 1 month
  • Total issue authors: 3
  • Total pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • 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
  • cboettig (3)
  • kshtzgupta1 (2)
  • maelle (1)
Pull Request Authors
  • kshtzgupta1 (2)
Top Labels
Issue Labels
help wanted (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 104 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: ramlegacy

Download and Read RAM Legacy Stock Assessment Database

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 104 Last month
Rankings
Forks count: 9.6%
Stargazers count: 23.6%
Dependent repos count: 23.8%
Dependent packages count: 28.6%
Average: 32.1%
Downloads: 75.0%
Maintainers (1)
Last synced: about 1 year ago

Dependencies

DESCRIPTION cran
  • R >= 2.10 depends
  • cli >= 1.0.0 imports
  • crayon >= 1.3.4 imports
  • httr >= 1.3.1 imports
  • rappdirs >= 0.3.1 imports
  • readxl >= 1.1.0 imports
  • covr * suggests
  • httptest * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • testthat * suggests