Skip to content

Releases: eliocamp/metR

metR 0.16.0

15 Oct 02:15
Compare
Choose a tag to compare

New features

  • EOF()'s rotate argument now will take a function to apply to the EOF loadings. rotate = TRUE is still supported but deprecated and will default to using function(x) stats::varimax(x, normalize = FALSE).

  • Contour functions gain a proj.latlon to decide if the projection needs to go to latlon coordinates or to projected coordinates.

Breaking changes

  • The GetSMNData() function is defunct. The functionality was a hack and hard to maintain and it's also very specific and should be out of scope for a general package.
  • The trans argument of scales has been renamed to transform following ggplot2's change.
  • scale_mag() internals are now much simpler and inherits all the functionality from common continuous scales. (thanks @teunbrand for the suggestion, #186)
  • The step computed variable in geom_streamline() now goes from 0 to the total number of steps instead of from negative half to positive half.

metR 0.15.0

09 Feb 14:55
Compare
Choose a tag to compare

New features

  • The contour functions gain a clip argument to only show contours in an area defined by a polygon.
  • The kriging argument of the contour functions now can be a numeric to control de number of pixels used.
  • Documentation of FitWave() and friends improved (#184, @pascaloettli).

Breaking changes

  • The proj argument in geom_contour_fill() and friends now operate over the isolines returned by the isoband package. This might break code that used a custom function to proj.

Bug Fixes

  • Guides are compatible with the new versions of ggplot2 (#117 and #185, @teunbrand).
  • Contour functions will work even if OutDec is not ".".

metR 0.14.1

30 Oct 20:45
Compare
Choose a tag to compare

Breaking Changes

  • The DivideTimeseries() function is now defunct.

New Features

  • FitLm() gains a new intercept argument that allows you to remove the intercept term that is automatically added.

Bug Fixes

  • Fixes error in Laplacian() when computing the laplacian of a single variable. (#170, Thanks @pascaloettli)
  • Removes dependencies on raster and gdal packages.

metR 0.14.0

25 Mar 14:03
Compare
Choose a tag to compare

New Features

  • Not really a new feature per se, but all geoms now support the new linewidth aesthetic. geom_relief() and geom_shadow() now don't have a size aesthetic, since they shouldn't have had it anyway.
  • The value of the maximum vector magnitude in scale_mag() is now chosen to be a "pretty" number close to the maximum. This will prevent guides with many unnecesary decimal places (thanks, @PanfengZhang #161).

Bug Fixes

  • Documents the correct default expand value in sale_x_longitude() and friends (thanks, @tamas-ferenci, #167).
  • Fixes inconsistencies in generic methods.

metR 0.13.0

06 Oct 22:45
Compare
Choose a tag to compare

New features

  • The new function Smooth2D() smooths a 2D field (hence the name). There are two smoothing methods. smooth_svd() computes the SVD of the field and reconstructs it keeping only the leading values that ensures a maximum variance lost. smooth_dct() computes the Discrete Cosine Transform of the field and sets a proportion of the components to zero.

Bug Fixes

  • Fixed a bug in geom_streamline() when plotting multiple fields on the same panel.

  • Fixes a bug with GetTopography() on Windows.

  • Updates documentation to use valid HTML5 per CRAN's new format.

  • Fixes the "The following aesthetics were dropped during statistical transformation" warning for contours.

  • Removes ReadNetCDF() file and URL checking because it didn't work in some cases.
    (#164, thanks @pascaloettli)

Breaking changes

  • Due to the udunits2 package being orphaned, ReadNetCDF() not longer uses it to parse dates and times. The homebrewed parser might be more limited, and the wild variety of netCDF files in the wild makes it hard to fully test. Please report any issues you have!

metR 0.12.0

15 Feb 13:51
Compare
Choose a tag to compare

New Features

  • Adds example of scale_y_level() (@paocorrales, #153).

  • ReadNetCDF() now should parse times correctly even if the use non-standard calendars.
    This now makes udunits2 and PCICt required to parse time.

  • Arrays returned by ReadNetCDF(…, out = "array") gain a "dimvalues" attribute which is analogous to dimnames but has the correct types (dates are dates, numerics are numerics, etc...).

  • EOF() gains a new engine argument to chose the function to compute the singular value decomposition.

Bug Fixes

  • Fixed wrong sdev component in EOF() when using base::svd() in some cases.
  • seasonally() now returns a Date object even if the input is datetime. This avoids issues when the time component of the input was not all the same.
  • Fixed a bug in ImputeEOF() in which the algorithm tried to compute 0 EOFs.

metR 0.11.0 - Cold front

20 Sep 15:32
Compare
Choose a tag to compare

New Features

  • geom_contour2() gains the ability to draw --and leave space for-- labels! This is finally proper labelling support without having to use a different geom (geom_text_contour()). Thanks to the isoband package for this.

  • Following isoband's naming convention, the family of functions that decide where to place labels have been renamed as label_placer_ and the corresponding argument is now label.placer. The label_placement_ family of functions will be deprecated in future releases.

metR 0.10.0 - Mesoscale convective system

07 Aug 13:23
Compare
Choose a tag to compare

New Features

  • discretised scales now work better when passing user-supplied limits.

  • New functions to use the International Standard Atmosphere to get height from pressure and vice versa, as well as to use as secondary axis.
    See ?standard_atmosphere.

  • scale_y_level() and scale_x_level() now print more breaks by default.
    These functions will probably use this transformation instead of the reverse log transformation in a future release.

  • Translation!
    Thanks to @MichaelChirico priceless guidance, metR messages are now translatable and already translated to Spanish.
    If you are using R in a Spanish locale you should be getting messages and error in Spanish.
    Partial translation to Portuguese is also included.

  • During the process of translating messages, many messages were improved and made more consistent.

  • New Function ResidLm() that returns the residuals of a linear fit.

  • New function Detrend() that, you guessed it, returns a (linearly) detrended version of the input vector.

  • In ReadNetCDF(), the "vars" argument now can take a function. (#142)

  • Discretised scales now support user-defined breaks.

Bugfixes

  • seasonally() result will be on the 15th of the centre month of each season instead of on the 1st. This makes the date more representative of the time span and also solves a bug in which dates on the 31st would return NA. This is a potentially breaking change.
  • ReadNetCDF() doesn't fail when reading variables with no dimensions (thanks to @paocorrales, #141).

metR 0.9.1

07 Feb 20:24
Compare
Choose a tag to compare

New Features

  • as.discretised_scale() is a quick way of created a discretised version of any
    continuous scale.

  • stroke.colour is now an accepted aesthetic for geom_text_contour().

Bugfixes

  • The computations in MixingRatio() were wrong. Now they are fixed.

  • I really wanted geom_arrow() to automatically add the arrow legend, but the
    workarounds I managed to write were brittle and couldn't handle even slight
    changes in people's code (see #130). The definitive
    answer is that this is simply not possible due to limitations on how ggplot2 works
    (see tidyverse/ggplot2#4291).
    This release, then, backtracks those workarounds and tries to accept the things I cannot change.

metR 0.9.0 - Cirrus fibratus

25 Nov 13:42
Compare
Choose a tag to compare

New Features

  • I'm very happy with discretised_scale(), which is a type of scale which takes a
    discrete values that are the result of some discretisation and treats them as
    continuous. It's, in a sense, the inverse of the new ggplot2::binned_scale().
    Whereas. ggplot2::binned_scale() takes continuous values and then discretises
    them, discretised_scale() takes discrete values which where the result of some
    discretisation procedure (such as the levels of geom_contour_fill()/ggplot2::geom_contour_filled())
    and allows you to treat them as continuous.

  • Related to that, geom_contour_fill() now gains a new computed aesthetic called level_d,
    which is the same as level but forces ggplot2 to automatically use the new discretised scale.

  • AnchorBreaks() gains a bins argument to mimic the default functionality of
    MakeBreaks().

  • New label_placement_minmax() to label contours at the maximum and minimum
    points of a contour (mimicking isoband's behaviour)

  • geom_contour_tanaka() now has a (rather experimental) argument smooth which allows to smooth
    the transition between segments.

Bugfixes

  • Fixes error introduced in previous version when geom_arrow() had mappings other
    than dx and dy. (Thanks Santiago!)

  • The level derived aesthetic from geom_contour_fill() now returns and ordered factor
    with the correct labels that can be interpreted by ggplot2::guide_colorsteps(). This might
    a breaking change!

  • geom_label_contour() lives! The previous release rewrote much of the way geom_text_contour()
    worked, but I messed up and didn't realised that the new code had broken geom_label_contour()
    (to be honest, I'd almost totally forgotten about it :P). (fixes #126, thanks @kongdd)