These are items associated with the development version of openairmaps.
Several “limit” arguments can now take one of three options: “fixed” (which forces all markers to share scales), “free” (which allows them to use different scales), or a numeric vector to define the scales. (#34) These arguments and their defaults include:
searchNetwork(), which allows users to find local air quality monitoring sites by specifying a target latitude and longitude. Function arguments allow the site metadata to be subset (for example, by site type, pollutants measured, or distance from the target).
The “data” argument of
addTrajPaths()and both the “before” and “after” arguments of
addPolarDiffMarkers()now default to
leaflet::getMapData(map). This makes their use less verbose when creating multiple polar plots with the same underlying data, which will likely be a common use-case. (#45)
networkMap()popups now contain links to the associated network websites. For example, the popup for London Marylebone Road in
networkMap("aurn")now contains a link to https://uk-air.defra.gov.uk/networks/site-info?site_id=MY1. All networks are supported with the exception of “europe”. (#39)
addPolarDiffMarkers()now have all of the “options” arguments of
leaflet::addMarkers(). This means that, for example, polar markers can be clustered (https://leafletjs.com/reference.html#marker). (#38)
CRAN release: 2023-03-31
This is a minor release adding a range of quality of life features, adding two new experimental functions, and fixing a few bugs.
facetarguments of all polar marker mapping functions (static and interactive) and trajectory mapping functions are now passed to
popupargument of all interactive polar marker mapping functions can now take a vector of column names. If more than one column is provided, it is automatically passed to
buildPopup()using its default values.
trajLevelMap()now has the
controlargument, which maps directly onto the
openair::trajLevel(). Like other
controlarguments elsewhere in openairmaps, this creates a “layer control” menu.
networkMap()now uses different coloured markers for different networks. If more than one network is specified, and
draw.legendis set to
TRUE, a legend will also be drawn for quick identification of different data sources. (#30)
Deprecations are now managed by the lifecycle package. This currently only applies to the
Fixed issues where multiple
addPolarMarkers()chained together would all show the same plot.
Fixed issue where
polarMapStatic()and others would turn factor facet levels into characters.
Fixed issue where
polarMapStatic()and others would error when trying to draw a legend.
CRAN release: 2023-02-09
This is a minor release containing several important new features that expand the scope of the package. This also comes with several minor breaking changes to improve consistency within openairmaps and with openair.
iconWidtharguments have been replaced with
d.icon. There are two main justifications behind this:
This ensures consistency across all of openairmaps, making it easier to switch between the static and HTML map types.
Polar markers are almost always going to be circular (i.e., width = height) so having one argument will streamline things. If users wish to have non-circular markers, a vector of length two in the form
c(width, height)will provide the same functionality.
BREAKING: The arguments in
addPolarMarkers()have been put in a more sensible order, leading with
Added “static” equivalents of all of the polar marker maps written in ggplot2. While interactive HTML maps are preferred, the static equivalents may be more appropriate for, e.g., academic publications. (#19)
diffMapStatic()which are to
openair::polarPlot()(#17). Also added
addPolarDiffMarkers(), which is the equivalent of
alphato work on both Windows and MacOS by forcing the use of the “cairo” device to save plots. (#14)
Polar marker maps and
addPolarMarkers()now show a progress bar when creating the markers takes more than a few seconds (most commonly in
annulusMap(), particularly with multiple pollutants/control groups).
CRAN release: 2023-01-09
- Functions now use Google’s “turbo” colour palette rather than “jet” by default. More about this palette and the advantages of using it over “jet” can be read at https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html.
Fixed issue with polar marker maps (e.g.,
polarMap()) and the generic
addPolarMarkers()function where lat/lon info in the Southern Hemisphere would misalign markers. Hat tip to Deanna Tuxford and James for noticing this issue. (#18)
Fixed an issue with
control = "variable"would fail to show all pollutants.
CRAN release: 2022-11-28
This is a minor release, mainly focusing on enhancing the ability for polar markers to have shared colour scales, but also incorporating new features for network visualisation.
All directional analysis maps can now have their limits provided (can be “limits”, “breaks”, “percentiles”, etc., depending on function). This was always possible through
..., but it is now explicitly listed as an option. (#12)
If limits are defined in a directional analysis function, a shared legend will now be drawn at the top-right of the map. This functionality can be disabled by setting
draw.legendto FALSE. (#12)
buildPopup()function, which allows users to easily construct HTML popups for use with the “popup” argument of directional analysis maps (or
leafletmaps more widely).
The default options for fig.width and fig.height are now
4. This appears to remove some visual artefacts and makes the axis labels more legible.
networkMap()now supports multiple sources. For example, using
source = c("aurn", "saqn")will show both the AURN and SAQN on one map. This may be useful if users are interested in air quality in a specific region of the UK (e.g., users may wish to locate AURN, AQE and locally managed sites near to a given urban centre). (#16)
source = "local".
Multiple basemap providers can now be used with
trajMap()and all polar directional analysis maps have gained the
collapse.controlargument, which controls whether the control menu starts collapsed or not. It defaults to
FALSE, which means the control menu is not collapsed.
All documentation has been improved; function parameters are more consistent between functions and arguments passed to
...are now explicitly listed.
CRAN release: 2022-10-20
This is a patch release designed to fix a major bug in v0.5.0.
CRAN release: 2022-10-19
This is a minor release centred around the addition of the
control argument, which allows for arbitrary columns to be used in “layer control” menus.
All functions now use latitude and longitude to distinguish between site types. Therefore, “type” is now deprecated. Maps using the old system will still render, but popups will not be displayed. For most users, to restore previous site labels simply rewrite
type = "site"as
popup = "site". (#10)
The default values for “pollutant” have all been removed. Any users relying on this default should update their code to explicitly state
pollutant = "nox".
All functions now possess the “control” argument, which allows users to create a “layer control” menu with any arbitrary column. Appropriate columns may be those produced using
openair::splitByDate(), or a user-defined
dplyr::if_else()column transformation. (#9)
All functions now possess the “popup” and “label” arguments, which control pop-up and hover-over labels, respectively. This allows users to define any popup or label column, even non-unique ones. For example, multiple sites can be labelled with identical site types. (#10)
Updated many error messages and warnings to use cli and be broadly more descriptive.
CRAN release: 2022-09-13
This is a patch release adding a small number of refinements.
trajLevelMap()now contains the
This is a patch release to fix a bug with
trajLevelMap()now works where
statistic = "frequency"without a “pollutant”.
This is the first CRAN release of openairmaps.
There are currently three streams of functionality in
There are two main classes of functions:
*Map()functions are easy-to-use functions which create leaflet maps from the ground-up. These are the most similar to
add*()functions are more flexible and allow users to add layers to existing leaflet maps. These are designed to be similar to the
leaflet“add” functions like