metR
Several functions and utilities that make R better for handling meteorological data in the tidy data paradigm.
https://github.com/eliocamp/metR
Category: Atmosphere
Sub Category: Meteorological Observation and Forecast
Keywords
atmospheric-science ggplot2 r r-package rstats visualization
Keywords from Contributors
visualisation
Last synced: about 19 hours ago
JSON representation
Repository metadata
Tools for Easier Analysis of Meteorological Fields
- Host: GitHub
- URL: https://github.com/eliocamp/metR
- Owner: eliocamp
- Created: 2017-07-05T20:09:40.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2026-11-07T14:50:58.000Z (8 days ago)
- Last Synced: 2026-11-14T15:13:09.167Z (about 19 hours ago)
- Topics: atmospheric-science, ggplot2, r, r-package, rstats, visualization
- Language: R
- Homepage: https://eliocamp.github.io/metR/
- Size: 547 MB
- Stars: 158
- Watchers: 3
- Forks: 26
- Open Issues: 19
- Releases: 23
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
README.md
metR
metR packages several functions and utilities that make R better for
handling meteorological data in the tidy data paradigm. It started
mostly sa a packaging of assorted wrappers and tricks that I wrote for
my day to day work as a researcher in atmospheric sciences. Since then,
it has grown organically and for my own needs and feedback from users.
Conceptually it’s divided into visualization tools and data tools.
The former are geoms, stats and scales that help with plotting using
ggplot2, such as
stat_contour_fill() or scale_y_level(), while the later are
functions for common data processing tools in the atmospheric sciences,
such as Derivate() or EOF(); these are implemented to work in the
data.table paradigm,
but also work with regular data frames.
Currently metR is in development but maturing. Most functions check
arguments and there are some tests. However, some functions might change
it’s interface, and functionality can be moved to other packages, so
please bear that in mind.
Installation
You can install metR from CRAN with:
install.packages("metR")
Or the development version with:
if (!requireNamespace("pak", quietly = TRUE)) {
install.packages("pak")
}
pak::pak("metR")
If you need to read netcdf files, you might need to install the netcdf
and udunits2 libraries. On Ubuntu and it’s derivatives this can be done
by typing
sudo apt install libnetcdf-dev netcdf-bin libudunits2-dev
Citing the package
If you use metR in your research, please consider citing it. You can get
citation information with
citation("metR")
#> To cite metR in publications use:
#>
#>
#>
#> A BibTeX entry for LaTeX users is
#>
#> @Manual{,
#> title = {metR: Tools for Easier Analysis of Meteorological Fields},
#> author = {Elio Campitelli},
#> year = {2021},
#> note = {R package version 0.19.0},
#> url = {https://eliocamp.github.io/metR/},
#> doi = {10.5281/zenodo.2593516},
#> }
Examples
In this example we easily perform Principal Components Decomposition
(EOF) on monthly geopotential height, then compute the geostrophic wind
associated with this field and plot the field with filled contours and
the wind with streamlines.
library(metR)
library(data.table)
#>
#> Attaching package: 'data.table'
#> The following object is masked from 'package:base':
#>
#> %notin%
library(ggplot2)
data(geopotential)
# Use Empirical Orthogonal Functions to compute the Antarctic Oscillation
geopotential <- copy(geopotential)
geopotential[, gh.t.w := Anomaly(gh)*sqrt(cos(lat*pi/180)),
by = .(lon, lat, month(date))]
aao <- EOF(gh.t.w ~ lat + lon | date, data = geopotential, n = 1)
aao$left[, c("u", "v") := GeostrophicWind(gh.t.w/sqrt(cos(lat*pi/180)),
lon, lat)]
# AAO field
binwidth <- 0.01
ggplot(aao$left, aes(lon, lat)) +
geom_contour_fill(aes(z = gh.t.w/sqrt(cos(lat*pi/180)),
fill = after_stat(level)), binwidth = binwidth,
xwrap = c(0, 360)) +
geom_streamline(aes(dx = dlon(u, lat), dy = dlat(v)),
linewidth = 0.4, L = 80, skip = 3, xwrap = c(0, 360)) +
scale_x_longitude() +
scale_y_latitude(limits = c(-90, -20)) +
scale_fill_divergent_discretised(name = "AAO pattern") +
coord_polar()
#> Warning in .check_wrap_param(list(...)): 'xwrap' and 'ywrap' will be
#> deprecated. Use ggperiodic::periodic insead.

# AAO signal
ggplot(aao$right, aes(date, gh.t.w)) +
geom_line() +
geom_smooth(span = 0.4)
#> `geom_smooth()` using method = 'loess' and formula = 'y ~ x'

You can read more in the vignettes: Visualization
tools
and Working with
data.
Owner metadata
- Name: Elio Campitelli
- Login: eliocamp
- Email:
- Kind: user
- Description: Research Fellow at Monash University
- Website:
- Location: Melbourne, Australia
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/8617595?u=0a35e19e70d548ee941960abf40efd92f2209972&v=4
- Repositories: 181
- Last ynced at: 2026-11-11T13:33:11.600Z
- Profile URL: https://github.com/eliocamp
GitHub Events
Total
- Create event: 6
- Delete event: 1
- Fork event: 5
- Issue comment event: 21
- Issues event: 23
- Pull request event: 6
- Pull request review comment event: 2
- Pull request review event: 2
- Push event: 82
- Release event: 4
- Watch event: 12
Last Year
- Create event: 1
- Fork event: 1
- Issue comment event: 5
- Issues event: 6
- Pull request event: 1
- Pull request review comment event: 1
- Push event: 21
- Release event: 1
- Watch event: 1
Committers metadata
Last synced: 3 days ago
Total Commits: 1,171
Total Committers: 8
Avg Commits per committer: 146.375
Development Distribution Score (DDS): 0.021
Commits in past year: 51
Committers in past year: 3
Avg Commits per committer in past year: 17.0
Development Distribution Score (DDS) in past year: 0.157
| Name | Commits | |
|---|---|---|
| Elio Campitelli | e****i@g****m | 1146 |
| Teun van den Brand | 4****d | 10 |
| Breeze-Hu | 1****7@q****m | 7 |
| olivroy | o****1@h****m | 4 |
| Paul Murrell | p****l@s****z | 1 |
| Paola Corrales | p****s | 1 |
| Matt | 3****r | 1 |
| Hadley Wickham | h****m@g****m | 1 |
Committer domains:
- stat.auckland.ac.nz: 1
- qq.com: 1
Issue and Pull Request metadata
Last synced: 2 days ago
Total issues: 193
Total pull requests: 24
Average time to close issues: 6 months
Average time to close pull requests: 14 days
Total issue authors: 49
Total pull request authors: 9
Average comments per issue: 1.07
Average comments per pull request: 0.96
Merged pull request: 14
Bot issues: 0
Bot pull requests: 0
Past year issues: 4
Past year pull requests: 2
Past year average time to close issues: 14 days
Past year average time to close pull requests: 2 months
Past year issue authors: 3
Past year pull request authors: 2
Past year average comments per issue: 1.25
Past year average comments per pull request: 1.5
Past year merged pull request: 2
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- eliocamp (120)
- paocorrales (6)
- pascaloettli (5)
- lemuscanovas (5)
- fipoucat (4)
- m-saenger (3)
- chrisdane (3)
- PanfengZhang (3)
- Breeze-Hu (2)
- delie0512 (2)
- rsbivand (2)
- galenholt (1)
- schckngs (1)
- symbalex (1)
- WMueller11 (1)
Top Pull Request Authors
- eliocamp (10)
- teunbrand (4)
- olivroy (4)
- raymondben (1)
- m-saenger (1)
- paocorrales (1)
- hadley (1)
- pmur002 (1)
- Breeze-Hu (1)
Top Issue Labels
- enhancement (27)
- bug (11)
- Derivatives (4)
- decision (3)
- questionable (3)
- reprex needed (1)
Top Pull Request Labels
- hacktoberfest-accepted (1)
Package metadata
- Total packages: 4
-
Total downloads:
- cran: 5,906 last-month
- Total docker downloads: 42,058
- Total dependent packages: 23 (may contain duplicates)
- Total dependent repositories: 31 (may contain duplicates)
- Total versions: 81
- Total maintainers: 1
cran.r-project.org: metR
Tools for Easier Analysis of Meteorological Fields
- Homepage: https://eliocamp.github.io/metR/
- Documentation: http://cran.r-project.org/web/packages/metR/metR.pdf
- Licenses: GPL-3
- Latest release: 0.19.0 (published about 1 month ago)
- Last Synced: 2026-11-13T14:31:38.292Z (2 days ago)
- Versions: 24
- Dependent Packages: 21
- Dependent Repositories: 31
- Downloads: 5,906 Last month
- Docker Downloads: 42,058
-
Rankings:
- Stargazers count: 3.083%
- Dependent packages count: 3.45%
- Forks count: 3.518%
- Average: 4.43%
- Dependent repos count: 4.838%
- Downloads: 7.259%
- Maintainers (1)
proxy.golang.org: github.com/eliocamp/metr
- Homepage:
- Documentation: https://pkg.go.dev/github.com/eliocamp/metr#section-documentation
- Licenses:
- Latest release: v0.19.0 (published about 1 month ago)
- Last Synced: 2026-11-13T14:31:51.915Z (2 days ago)
- Versions: 22
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.459%
- Average: 5.642%
- Dependent repos count: 5.825%
proxy.golang.org: github.com/eliocamp/metR
- Homepage:
- Documentation: https://pkg.go.dev/github.com/eliocamp/metR#section-documentation
- Licenses:
- Latest release: v0.19.0 (published about 1 month ago)
- Last Synced: 2026-11-13T14:31:59.880Z (2 days ago)
- Versions: 22
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.459%
- Average: 5.642%
- Dependent repos count: 5.825%
conda-forge.org: r-metr
- Homepage: https://github.com/eliocamp/metR
- Licenses: GPL-3.0-only
- Latest release: 0.13.0 (published about 4 years ago)
- Last Synced: 2026-07-24T19:58:10.310Z (4 months ago)
- Versions: 13
- Dependent Packages: 2
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 19.506%
- Stargazers count: 28.45%
- Average: 29.179%
- Dependent repos count: 34.025%
- Forks count: 34.734%
Dependencies
- R >= 2.10 depends
- Formula * imports
- RCurl * imports
- checkmate * imports
- data.table * imports
- digest * imports
- fields * imports
- formula.tools * imports
- ggplot2 >= 3.0.0 imports
- grid * imports
- gtable * imports
- isoband * imports
- lubridate * imports
- memoise * imports
- plyr * imports
- purrr * imports
- scales * imports
- sp * imports
- stringr * imports
- PCICt * suggests
- covr * suggests
- gridExtra * suggests
- here * suggests
- irlba * suggests
- knitr * suggests
- kriging * suggests
- maps * suggests
- maptools * suggests
- ncdf4 * suggests
- pkgdown * suggests
- proj4 * suggests
- raster * suggests
- reshape2 * suggests
- rgdal * suggests
- rmarkdown * suggests
- testthat >= 2.1.0 suggests
- udunits2 * suggests
- vdiffr * suggests
- viridis * suggests
- actions/cache v2 composite
- actions/checkout v2 composite
- actions/upload-artifact main composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite
- actions/cache v2 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v1 composite
- r-lib/actions/setup-r v1 composite
- actions/checkout v4 composite
- actions/upload-artifact v4 composite
- codecov/codecov-action v5 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
Score: 18.035047439185345