https://github.com/bluegreen-labs/igrf

International Geomagnetic Reference Field (IGRF) R package

https://github.com/bluegreen-labs/igrf

Science Score: 49.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 7 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.0%) to scientific vocabulary

Keywords

geomagnetic-field movement-ecology rstats
Last synced: 7 months ago · JSON representation

Repository

International Geomagnetic Reference Field (IGRF) R package

Basic Info
Statistics
  • Stars: 5
  • Watchers: 2
  • Forks: 0
  • Open Issues: 0
  • Releases: 2
Topics
geomagnetic-field movement-ecology rstats
Created over 4 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog License

README.md

International Geomagnetic Reference Field

R-CMD-check codecov CRAN\_Status\_Badge DOI

The 14th Generation International Geomagnetic Reference Field (IGRF) implemented as an R package. The igrf package provides an R version of the of the original IGRF model in Fortran published by Alken et al. 2021 (available on the NOAA website https://www.ncei.noaa.gov/products/international-geomagnetic-reference-field). R outputs have been verified to correspond with the original Fortran code and can be considere equivalent with the exception that values in the R are not rounded before output. For all intents and purposes the data can be considered equivalent.

For full model details I refer to Alken et al. 2021, and the project website where both the original code and a brief model description can be found. The authors of both the R package and the original Fortran code take no responsibility regarding the use of these data within a professional context. For caveats on model use I refer to the health warning on the original project website (https://www.ncei.noaa.gov/products/international-geomagnetic-reference-field/health-warning).

How to cite this package in your article

Koen Hufkens. (2022). bluegreen-labs/igrf: IGRF CRAN release v1.0 (v1.0). Zenodo. https://doi.org/10.5281/zenodo.6527638

Installation

stable release

To install the current stable release use a CRAN repository:

r install.packages("igrf") library("igrf")

development release

To install the development releases of the package run the following commands:

r if(!require(remotes)){install.packages("remotes")} remotes::install_github("bluegreen-labs/igrf") library("igrf")

Vignettes are not rendered by default, if you want to include additional documentation please use:

r if(!require(remotes)){install.packages("remotes")} remotes::install_github("bluegreen-labs/igrf", build_vignettes = TRUE) library("igrf")

Use

Single coordinates

IGRF values can be calculated for a single point using the below call. This will generate a data frame with model values. The routine is relatively fast so looping over a time vector will generate time series fairly quickly. To calculate grids a simple function is provided (see below).

r df <- igrf( field = "main", year = 2000, altitude = 2, latitude = 0, longitude = 0 )

Regular grid

You may generate global maps of the IGRF using the igrf_grid() function, setting similar parameters as above while specifying a resolution as decimal degrees of the global grid. Keep in mind that values under 1 (fractions) will take an increasing amount of time and space to store the data.

r grid <- igrf::igrf_grid( field = "main", year = 2000, altitude = 2, resolution = 5 )

A resulting map can be generated from this data using contour lines from the metR package. The full code on how to generate the below figure is provided in the vignette.

Licensing

The igrf package is distributed under a AGPLv3 license, while the IGRF model code resides in the public domain (CC0) made available by Alken et al. (2021). I'm indebted to the the original authors for making model interoperability easy.

References

Owner

  • Name: BlueGreen Labs
  • Login: bluegreen-labs
  • Kind: organization
  • Email: info@bluegreenlabs.org
  • Location: Melsele, Belgium

BlueGreen open science labs & consulting, providing environmental research infrastructure and editorial solutions.

GitHub Events

Total
  • Issues event: 1
  • Watch event: 1
  • Push event: 5
Last Year
  • Issues event: 1
  • Watch event: 1
  • Push event: 5

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 45
  • Total Committers: 1
  • Avg Commits per committer: 45.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 10
  • Committers: 1
  • Avg Commits per committer: 10.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Koen Hufkens k****s@g****m 45

Issues and Pull Requests

Last synced: 8 months ago

All Time
  • Total issues: 5
  • Total pull requests: 1
  • Average time to close issues: about 2 months
  • Average time to close pull requests: about 2 hours
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.8
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 1
  • Average time to close issues: about 2 months
  • Average time to close pull requests: about 2 hours
  • Issue authors: 1
  • 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
Top Authors
Issue Authors
  • khufkens (5)
Pull Request Authors
  • khufkens (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 235 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 2
  • Total maintainers: 1
cran.r-project.org: igrf

International Geomagnetic Reference Field

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 235 Last month
Rankings
Stargazers count: 26.2%
Forks count: 28.8%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Average: 41.4%
Downloads: 87.0%
Maintainers (1)
Last synced: 8 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.6 depends
  • covr * suggests
  • ggplot2 * suggests
  • knitr * suggests
  • metR * suggests
  • rmarkdown * suggests
  • rnaturalearth * suggests
  • rnaturalearthdata * suggests
  • testthat * suggests
.github/workflows/check-package.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact main composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
.github/workflows/deploy_docs.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite